{ "info": { "author": "IT Services, University of Oxford", "author_email": "opendata@oucs.ox.ac.uk", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: Information Technology", "Intended Audience :: System Administrators", "Operating System :: OS Independent", "Topic :: Internet :: WWW/HTTP", "Topic :: Office/Business :: Groupware" ], "description": "python-sharepoint\n=================\n\nA Python library and command-line utility for gettting data out of SharePoint.\n\nIf you're more a Perl person, you might also want to try `SharePerltopus\n`_.\n\n\nInstallation\n------------\n\nEither install the latest development from ``git``::\n\n $ git clone git://github.com/ox-it/python-sharepoint.git\n $ cd python-sharepoint\n $ sudo python setup.py install\n\n... or, install the latest stable version using ``pip``::\n\n $ pip install sharepoint\n\nYou will need `lxml `_, which you can install using your\npackage manager or ``pip``. Run one of the following if it's not already\ninstalled::\n\n $ sudo apt-get install python-lxml # Debian, Ubuntu\n $ sudo yum install python-lxml # RedHat, Fedora\n $ sudo pip install lxml # pip\n\n\nUsage\n-----\n\nFirst, you need to create a ``SharePointSite`` object. We'll assume you're\nusing basic auth; if you're not, you'll need to create an appropriate `urllib2\nOpener `_\nyourself.\n\n.. code::\n\n from sharepoint import SharePointSite, basic_auth_opener\n\n server_url = \"http://sharepoint.example.org/\"\n site_url = server_url + \"sites/foo/bar\"\n\n opener = basic_auth_opener(server_url, \"username\", \"password\")\n\n site = SharePointSite(site_url, opener)\n\n\nLists\n~~~~~\n\nFirst, get a list of SharePoint lists available::\n\n for sp_list in site.lists:\n print sp_list.id, sp_list.meta['Title']\n\nYou can look up lists by ID, or by name::\n\n # By ID, without braces\n print site.lists['1EF5668C-0AB4-4020-98EF-26325E412C3C']\n # By ID, with braces\n print site.lists['{1EF5668C-0AB4-4020-98EF-26325E412C3C}']\n # By name\n print site.lists['ListName']\n\nGiven a list, you can iterate over its rows::\n\n sp_list = site.lists['ListName']\n for row in sp_list.rows:\n print row.id, row.FieldName\n\n``rows`` is a list, which doesn't help you if you want to find rows by their\nSharePoint row IDs. For this use a list's ``rows_by_id`` attribute, which\ncontains a mapping from row ID to row.\n\nYou can assign to fields as one would expect. Values will be coerced in\nmostly-sensible ways. Once you're done, you'll want to sync your changes\nusing the list's ``save()`` method::\n\n sp_list = site.lists['ListName']\n \n # Set both the URL and the text\n sp_list.rows[5].Web_x0020_site = {'url': 'http://example.org/',\n 'text': 'Example Website'}\n # Set the URL; leave the text blank\n sp_list.rows[6].Web_x0020_site = 'http://example.org/'\n # Clear the field\n sp_list.rows[7].Web_x0020_site = None\n \n sp_list.save()\n\nConsult the ``descriptor_set()`` methods in ``sharepoint.lists.types`` module\nfor more information about setting SharePoint list fields.\n\n\nDocument libraries\n~~~~~~~~~~~~~~~~~~\n\nSupport for document libraries is limited, but ``SharePointListRow`` objects do\nsupport a ``is_file()`` method and an ``open()`` method for accessing file\ndata.\n\n\nCommand-line utility\n~~~~~~~~~~~~~~~~~~~~\n\nHere's how to get a list of lists from a SharePoint site::\n\n $ sharepoint lists -s http://sharepoint.example.org/sites/foo/bar \\\n -u username -p password\n\nAnd here's how to get one or more lists as XML::\n\n $ sharepoint exportlists -s http://sharepoint.example.org/sites/foo/bar \\\n -l FirstListName -l \"Second List Name\" \\\n -u username -p password\n\nYou can also specify a file containing username and password in the format\n'username:password'::\n\n $ sharepoint --credentials=path/to/credentials [...]\n\nIf you want to manipulate SharePoint sites from a Python shell, use the\n``shell`` command::\n\n $ sharepoint shell -s http://sharepoint.example.org/sites/foo/bar \\\n -u username -p password\n\n\nOnce you're in the Python shell, there will be a ``site`` variable for the\nsite you specified. See above for things to do with your site.\n\nFor help (including to see more options to configure the output, use ``-h``::\n\n $ sharepoint -h", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ox-it/python-sharepoint", "keywords": "SharePoint", "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "sharepoint", "package_url": "https://pypi.org/project/sharepoint/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/sharepoint/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/ox-it/python-sharepoint" }, "release_url": "https://pypi.org/project/sharepoint/0.4.2/", "requires_dist": null, "requires_python": null, "summary": "Module and command-line utility to get data out of SharePoint", "version": "0.4.2" }, "last_serial": 1665295, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "b03f823ba1ecfa576cf0c4852e609336", "sha256": "26e40c0ed1a13c2b9005319647b021bf8d67fa5c4cc5f9b12e45c98d51c66e92" }, "downloads": -1, "filename": "sharepoint-0.1.tar.gz", "has_sig": false, "md5_digest": "b03f823ba1ecfa576cf0c4852e609336", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5765, "upload_time": "2012-11-13T09:38:18", "url": "https://files.pythonhosted.org/packages/d6/22/fd8dd7183111e28cda2ce483dd6232f86817517b7287d52e5cae1d13c776/sharepoint-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "14ae426c3af383f8f1d0ae1686a630a7", "sha256": "eadb603d6cadf703fb246430f64691594956897974a0e2eb432b4005d82ef696" }, "downloads": -1, "filename": "sharepoint-0.2.tar.gz", "has_sig": false, "md5_digest": "14ae426c3af383f8f1d0ae1686a630a7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7108, "upload_time": "2012-11-16T09:58:43", "url": "https://files.pythonhosted.org/packages/c8/06/0aa08c17af978b9c48b9b367a1299fe6d1df5c867472e9b007d541d29e0a/sharepoint-0.2.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "7abac45161e8249ade755248ae45a4f6", "sha256": "f4688422124891e301232e691b4dc293b433942108273a70c62d30dee7d17a94" }, "downloads": -1, "filename": "sharepoint-0.2.1.tar.gz", "has_sig": false, "md5_digest": "7abac45161e8249ade755248ae45a4f6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7112, "upload_time": "2012-11-16T11:42:26", "url": "https://files.pythonhosted.org/packages/29/88/e0a1109bffbb336ee98671daf8c5568393bc87374900497b1c1b370650a0/sharepoint-0.2.1.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "57ecbf144cdee30e8cc3c8d46d5a0955", "sha256": "9b11abea45b5622939b55cfa8a351d4927a400fbd224e3ea37580bef17419260" }, "downloads": -1, "filename": "sharepoint-0.3.tar.gz", "has_sig": false, "md5_digest": "57ecbf144cdee30e8cc3c8d46d5a0955", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12720, "upload_time": "2013-01-14T10:05:42", "url": "https://files.pythonhosted.org/packages/6c/2e/71f98b5640307fc83b1bb9a0944f5f20f252f8aaec465dcc04ba7b8cd139/sharepoint-0.3.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "12a82d322a6e4e71f75b1d6d03760ed3", "sha256": "39bfc66d62857362634a3f56a94c28c9e75242ffaf9663b42cd0def0625d8c1f" }, "downloads": -1, "filename": "sharepoint-0.3.1.tar.gz", "has_sig": false, "md5_digest": "12a82d322a6e4e71f75b1d6d03760ed3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13928, "upload_time": "2013-02-22T10:45:15", "url": "https://files.pythonhosted.org/packages/4f/a1/7c956e91ea89d98ae9570c7ad534c701658eef972f5549518762daec4ea8/sharepoint-0.3.1.tar.gz" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "306413ce22cf58e8c95ce55c4f7cdb5f", "sha256": "706ff6034add1282a7bf678bc2a293c473018efcf3f3eac03e2a305a1f97d6e7" }, "downloads": -1, "filename": "sharepoint-0.3.2.tar.gz", "has_sig": false, "md5_digest": "306413ce22cf58e8c95ce55c4f7cdb5f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14296, "upload_time": "2013-04-29T12:23:56", "url": "https://files.pythonhosted.org/packages/75/cb/f2fd0fe58de8de72787d0e784d1f42429e7676b7710a8ae17bd4a075aa72/sharepoint-0.3.2.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "50758b3f780e3ffa5be7831e0a968d27", "sha256": "e229989f4535d56ca2a11e035485222e17cc574bd60b6bf50628c441dbd928d3" }, "downloads": -1, "filename": "sharepoint-0.4.1.tar.gz", "has_sig": false, "md5_digest": "50758b3f780e3ffa5be7831e0a968d27", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15911, "upload_time": "2014-06-27T12:43:28", "url": "https://files.pythonhosted.org/packages/0f/12/fadd46948a228bdcfd521857e15032e4c893cab56488350c226e5c15a420/sharepoint-0.4.1.tar.gz" } ], "0.4.2": [ { "comment_text": "", "digests": { "md5": "441581716ad3e86782608184a5967ae2", "sha256": "ae2221f88488a3be62faba07e7253c4e29192dac3e696175b3286a1427d1c979" }, "downloads": -1, "filename": "sharepoint-0.4.2.tar.gz", "has_sig": false, "md5_digest": "441581716ad3e86782608184a5967ae2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17272, "upload_time": "2015-08-05T12:32:50", "url": "https://files.pythonhosted.org/packages/61/5a/4844e097e8c934c621f6d92915cfaf474a6a2fa4b7646bf09923fa6577e0/sharepoint-0.4.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "441581716ad3e86782608184a5967ae2", "sha256": "ae2221f88488a3be62faba07e7253c4e29192dac3e696175b3286a1427d1c979" }, "downloads": -1, "filename": "sharepoint-0.4.2.tar.gz", "has_sig": false, "md5_digest": "441581716ad3e86782608184a5967ae2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17272, "upload_time": "2015-08-05T12:32:50", "url": "https://files.pythonhosted.org/packages/61/5a/4844e097e8c934c621f6d92915cfaf474a6a2fa4b7646bf09923fa6577e0/sharepoint-0.4.2.tar.gz" } ] }