sharepoint4py


Namesharepoint4py JSON
Version 0.1.1 PyPI version JSON
download
home_pagehttps://github.com/dianasoares/sharepoint4py
SummaryPython SharePoint Library
upload_time2024-03-15 18:03:53
maintainer
docs_urlNone
authorDiana Soares
requires_python
licenseMIT
keywords sharepoint
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            sharepoint4py
==========

This is a continuation of deprecated project SharePlum from Jason Rollins

(THE DOCUMENTATION BELOW IS MOST FROM THE LEGACY LIBRARY AND WILL SOON BE UPDATED)


sharepoint4py is an easier way to work with SharePoint services. 
It handles all of the messy parts of dealing with SharePoint and allows you to write clean and Pythonic code.



Usage
-----

::

    from sharepoint4py import Site
    from requests_ntlm import HttpNtlmAuth

    auth = HttpNtlmAuth('DIR\\username', 'password')
    site = Site('https://abc.com/sites/MySharePointSite/', auth=auth)
    sp_list = site.List('list name')
    data = sp_list.GetListItems('All Items', row_limit=200)

Authenticate to Office365 Sharepoint
------------------------------------

::

    from sharepoint4py import Site
    from sharepoint4py import Office365

    authcookie = Office365('https://abc.sharepoint.com', username='username@abc.com', password='password').GetCookies()
    site = Site('https://abc.sharepoint.com/sites/MySharePointSite/', authcookie=authcookie)
    sp_list = site.List('list name')
    data = sp_list.GetListItems('All Items', row_limit=200)


Access REST API
------------------------------------

::

    from sharepoint4py import Site
    from sharepoint4py import Office365
    from sharepoint4py.site import Version

    authcookie = Office365('https://abc.sharepoint.com', username='username@abc.com', password='password').GetCookies()
    site = Site('https://abc.sharepoint.com/sites/MySharePointSite/', version=Version.v2016, authcookie=authcookie)
    folder = site.Folder('Shared Documents/This Folder')
    folder.upload_file('Hello', 'new.txt')
    folder.get_file('new.txt')
    folder.check_out('new.txt')
    folder.check_in('new.txt', "My check-in comment")
    folder.delete_file('new.txt')


Features
--------

- Reading and writing data to SharePoint lists using Python Dictionaries.
- Automatic conversion between SharePoint internal names and displayed names.
- Using Queries to filter data when retrieving List Items.
- Automatic conversion of data types.
- Supports Users datatype.
- Supports Office365 Sharepoint sites.
- Supports Folder and File operations with the REST API. (Requires SharePoint 2013 or newer)

Documentation
-------------

`Read the Docs <http://sharepoint4py.readthedocs.org/en/latest/>`_

Contribute
----------

- `Issue Tracker <https://github.com/dianasoares/sharepy/issues>`_
- `Source Code <https://github.com/dianasoares/sharepy>`_

Unit Tests
^^^^^^^^^^

This package uses python unittest.
To run the unit tests, first copy tests/test_settings.py as tests/local_test_seetings.py and edit the contents to point at your sharepoint.
Second export your sharepoint password as an environment variable 'TEST_PASSWORD'
Then from the root folder run:

::

    python -m unittest disover  # all tests
    python -m unittest tests.test_site  # all site tests

License
-------

This project is licensed under the MIT license.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/dianasoares/sharepoint4py",
    "name": "sharepoint4py",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "SharePoint",
    "author": "Diana Soares",
    "author_email": "soaresd32@hotmail.com",
    "download_url": "https://files.pythonhosted.org/packages/8c/68/6a118220264bb0cd9297b569f37f82b5a06d7f8426a7c9eb2e53557f3840/sharepoint4py-0.1.1.tar.gz",
    "platform": null,
    "description": "sharepoint4py\r\n==========\r\n\r\nThis is a continuation of deprecated project SharePlum from Jason Rollins\r\n\r\n(THE DOCUMENTATION BELOW IS MOST FROM THE LEGACY LIBRARY AND WILL SOON BE UPDATED)\r\n\r\n\r\nsharepoint4py is an easier way to work with SharePoint services. \r\nIt handles all of the messy parts of dealing with SharePoint and allows you to write clean and Pythonic code.\r\n\r\n\r\n\r\nUsage\r\n-----\r\n\r\n::\r\n\r\n    from sharepoint4py import Site\r\n    from requests_ntlm import HttpNtlmAuth\r\n\r\n    auth = HttpNtlmAuth('DIR\\\\username', 'password')\r\n    site = Site('https://abc.com/sites/MySharePointSite/', auth=auth)\r\n    sp_list = site.List('list name')\r\n    data = sp_list.GetListItems('All Items', row_limit=200)\r\n\r\nAuthenticate to Office365 Sharepoint\r\n------------------------------------\r\n\r\n::\r\n\r\n    from sharepoint4py import Site\r\n    from sharepoint4py import Office365\r\n\r\n    authcookie = Office365('https://abc.sharepoint.com', username='username@abc.com', password='password').GetCookies()\r\n    site = Site('https://abc.sharepoint.com/sites/MySharePointSite/', authcookie=authcookie)\r\n    sp_list = site.List('list name')\r\n    data = sp_list.GetListItems('All Items', row_limit=200)\r\n\r\n\r\nAccess REST API\r\n------------------------------------\r\n\r\n::\r\n\r\n    from sharepoint4py import Site\r\n    from sharepoint4py import Office365\r\n    from sharepoint4py.site import Version\r\n\r\n    authcookie = Office365('https://abc.sharepoint.com', username='username@abc.com', password='password').GetCookies()\r\n    site = Site('https://abc.sharepoint.com/sites/MySharePointSite/', version=Version.v2016, authcookie=authcookie)\r\n    folder = site.Folder('Shared Documents/This Folder')\r\n    folder.upload_file('Hello', 'new.txt')\r\n    folder.get_file('new.txt')\r\n    folder.check_out('new.txt')\r\n    folder.check_in('new.txt', \"My check-in comment\")\r\n    folder.delete_file('new.txt')\r\n\r\n\r\nFeatures\r\n--------\r\n\r\n- Reading and writing data to SharePoint lists using Python Dictionaries.\r\n- Automatic conversion between SharePoint internal names and displayed names.\r\n- Using Queries to filter data when retrieving List Items.\r\n- Automatic conversion of data types.\r\n- Supports Users datatype.\r\n- Supports Office365 Sharepoint sites.\r\n- Supports Folder and File operations with the REST API. (Requires SharePoint 2013 or newer)\r\n\r\nDocumentation\r\n-------------\r\n\r\n`Read the Docs <http://sharepoint4py.readthedocs.org/en/latest/>`_\r\n\r\nContribute\r\n----------\r\n\r\n- `Issue Tracker <https://github.com/dianasoares/sharepy/issues>`_\r\n- `Source Code <https://github.com/dianasoares/sharepy>`_\r\n\r\nUnit Tests\r\n^^^^^^^^^^\r\n\r\nThis package uses python unittest.\r\nTo run the unit tests, first copy tests/test_settings.py as tests/local_test_seetings.py and edit the contents to point at your sharepoint.\r\nSecond export your sharepoint password as an environment variable 'TEST_PASSWORD'\r\nThen from the root folder run:\r\n\r\n::\r\n\r\n    python -m unittest disover  # all tests\r\n    python -m unittest tests.test_site  # all site tests\r\n\r\nLicense\r\n-------\r\n\r\nThis project is licensed under the MIT license.\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python SharePoint Library",
    "version": "0.1.1",
    "project_urls": {
        "Homepage": "https://github.com/dianasoares/sharepoint4py"
    },
    "split_keywords": [
        "sharepoint"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "71a9e16ebfd2646057887aacf0de330e18f3eaa5b6a497bf8a2de65ea666878a",
                "md5": "db9d27770ba0d814569a3c11e81d6f03",
                "sha256": "3f3911cf08ba14b6709a49d45ab45b33c9b8fe640532f2869e24216b7e1f7725"
            },
            "downloads": -1,
            "filename": "sharepoint4py-0.1.1-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "db9d27770ba0d814569a3c11e81d6f03",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 20079,
            "upload_time": "2024-03-15T18:03:51",
            "upload_time_iso_8601": "2024-03-15T18:03:51.220147Z",
            "url": "https://files.pythonhosted.org/packages/71/a9/e16ebfd2646057887aacf0de330e18f3eaa5b6a497bf8a2de65ea666878a/sharepoint4py-0.1.1-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8c686a118220264bb0cd9297b569f37f82b5a06d7f8426a7c9eb2e53557f3840",
                "md5": "67a689ff3e624be5e4897083abec033c",
                "sha256": "9ca5714a90dbd0ae21546765cdee69156c07b38be4d0525cc93d385ec46c397b"
            },
            "downloads": -1,
            "filename": "sharepoint4py-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "67a689ff3e624be5e4897083abec033c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 20549,
            "upload_time": "2024-03-15T18:03:53",
            "upload_time_iso_8601": "2024-03-15T18:03:53.070254Z",
            "url": "https://files.pythonhosted.org/packages/8c/68/6a118220264bb0cd9297b569f37f82b5a06d7f8426a7c9eb2e53557f3840/sharepoint4py-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-15 18:03:53",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "dianasoares",
    "github_project": "sharepoint4py",
    "github_not_found": true,
    "lcname": "sharepoint4py"
}
        
Elapsed time: 0.20890s