SharePlum


NameSharePlum JSON
Version 0.5.1 PyPI version JSON
download
home_pagehttps://github.com/jasonrollins/shareplum
SummaryPython SharePoint Library
upload_time2020-04-22 01:12:16
maintainer
docs_urlNone
authorJason Rollins
requires_python
licenseMIT
keywords sharepoint
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            SharePlum
==========

SharePlum 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 shareplum 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', rowlimit=200)

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

::

    from shareplum import Site
    from shareplum 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', rowlimit=200)


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

::

    from shareplum import Site
    from shareplum import Office365
    from shareplum.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://shareplum.readthedocs.org/en/latest/>`_

Contribute
----------

- `Issue Tracker <http://github.com/jasonrollins/shareplum/issues>`_
- `Source Code <http://github.com/jasonrollins/shareplum>`_

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/jasonrollins/shareplum",
    "name": "SharePlum",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "SharePoint",
    "author": "Jason Rollins",
    "author_email": "jason.c.rollins@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/db/86/2152ac9cc7230fa7d5b93b4f9e0776773f4959a4f1a2f9ca4622dae932c8/SharePlum-0.5.1.tar.gz",
    "platform": "",
    "description": "SharePlum\n==========\n\nSharePlum 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.\n\nUsage\n-----\n\n::\n\n    from shareplum import Site\n    from requests_ntlm import HttpNtlmAuth\n\n    auth = HttpNtlmAuth('DIR\\\\username', 'password')\n    site = Site('https://abc.com/sites/MySharePointSite/', auth=auth)\n    sp_list = site.List('list name')\n    data = sp_list.GetListItems('All Items', rowlimit=200)\n\nAuthenticate to Office365 Sharepoint\n------------------------------------\n\n::\n\n    from shareplum import Site\n    from shareplum import Office365\n\n    authcookie = Office365('https://abc.sharepoint.com', username='username@abc.com', password='password').GetCookies()\n    site = Site('https://abc.sharepoint.com/sites/MySharePointSite/', authcookie=authcookie)\n    sp_list = site.List('list name')\n    data = sp_list.GetListItems('All Items', rowlimit=200)\n\n\nAccess REST API\n------------------------------------\n\n::\n\n    from shareplum import Site\n    from shareplum import Office365\n    from shareplum.site import Version\n\n    authcookie = Office365('https://abc.sharepoint.com', username='username@abc.com', password='password').GetCookies()\n    site = Site('https://abc.sharepoint.com/sites/MySharePointSite/', version=Version.v2016, authcookie=authcookie)\n    folder = site.Folder('Shared Documents/This Folder')\n    folder.upload_file('Hello', 'new.txt')\n    folder.get_file('new.txt')\n    folder.check_out('new.txt')\n    folder.check_in('new.txt', \"My check-in comment\")\n    folder.delete_file('new.txt')\n\n\nFeatures\n--------\n\n- Reading and writing data to SharePoint lists using Python Dictionaries.\n- Automatic conversion between SharePoint internal names and displayed names.\n- Using Queries to filter data when retrieving List Items.\n- Automatic conversion of data types.\n- Supports Users datatype.\n- Supports Office365 Sharepoint sites.\n- Supports Folder and File operations with the REST API. (Requires SharePoint 2013 or newer)\n\nDocumentation\n-------------\n\n`Read the Docs <http://shareplum.readthedocs.org/en/latest/>`_\n\nContribute\n----------\n\n- `Issue Tracker <http://github.com/jasonrollins/shareplum/issues>`_\n- `Source Code <http://github.com/jasonrollins/shareplum>`_\n\nUnit Tests\n^^^^^^^^^^\n\nThis package uses python unittest.\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.\nSecond export your sharepoint password as an environment variable 'TEST_PASSWORD'\nThen from the root folder run:\n\n::\n\n    python -m unittest disover  # all tests\n    python -m unittest tests.test_site  # all site tests\n\nLicense\n-------\n\nThis project is licensed under the MIT license.\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python SharePoint Library",
    "version": "0.5.1",
    "project_urls": {
        "Homepage": "https://github.com/jasonrollins/shareplum"
    },
    "split_keywords": [
        "sharepoint"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4e13665e4610516dcb28aaf1c085ef94dc01da99a813c96491ddd29074b896d9",
                "md5": "1a090aebacb4dfac41c26ed2a4db0c77",
                "sha256": "e7450aafeb84d529f8fba2cac7057ab393ad921c4596ac411cf1c84af1a48a68"
            },
            "downloads": -1,
            "filename": "SharePlum-0.5.1-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1a090aebacb4dfac41c26ed2a4db0c77",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 25830,
            "upload_time": "2020-04-22T01:12:14",
            "upload_time_iso_8601": "2020-04-22T01:12:14.761184Z",
            "url": "https://files.pythonhosted.org/packages/4e/13/665e4610516dcb28aaf1c085ef94dc01da99a813c96491ddd29074b896d9/SharePlum-0.5.1-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "db862152ac9cc7230fa7d5b93b4f9e0776773f4959a4f1a2f9ca4622dae932c8",
                "md5": "d91c6ea36ac9bbcda99aa46f01b83b74",
                "sha256": "07a45d48920450092e56c33846fe17768d4611dc83a7314ef0140e57dee52966"
            },
            "downloads": -1,
            "filename": "SharePlum-0.5.1.tar.gz",
            "has_sig": false,
            "md5_digest": "d91c6ea36ac9bbcda99aa46f01b83b74",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 14731,
            "upload_time": "2020-04-22T01:12:16",
            "upload_time_iso_8601": "2020-04-22T01:12:16.445390Z",
            "url": "https://files.pythonhosted.org/packages/db/86/2152ac9cc7230fa7d5b93b4f9e0776773f4959a4f1a2f9ca4622dae932c8/SharePlum-0.5.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2020-04-22 01:12:16",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jasonrollins",
    "github_project": "shareplum",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "shareplum"
}
        
Elapsed time: 0.14759s