{ "info": { "author": "Andreas Jung", "author_email": "info@zopyx.com", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "zopyx.sharepoint\n================\n\n``zopyx.sharepoint`` allows to interact Python-based application with\nSharepoint ``lists`` through the Sharepoint SOAP API (tested against\nMicrosoft Sharepoint Services 3.0).\n\nFeatures\n--------\n\n* retrieve Sharepoint list definitions\n* retrieve all list items\n* add list items\n* delete list items\n* update list items\n* generic queries\n* authentication over NTLM \n\nUsage\n-----\n\nIn order to connect to Sharepoint you need the following parameters\n\n- the Lists WSDL URL\n- the ID/Name of the related Sharepoint list you want to interact with\n- a valid Sharepoint username and password (having the related rights)\n\nAPI usage\n---------\n\nConnecting to sharepoint\n++++++++++++++++++++++++\n\nIn order to connect to Sharepoint you need to import the ``Connector``\nmethod which is a factory return a ``ListEndPoint`` instance::\n\n\n > from zopyx.sharepoint import Connector\n > url = 'http://sharepoint/bereiche/onlineschulungen/'\n > username = 'YourDomain\\\\account'\n > password = 'secret'\n > list_id = '60e3f442-6faa-4b49-814d-2ce2ec88b8d5'\n > service = Connector(url, username, password, list_id)\n\n\nSharepoint list model introspection\n+++++++++++++++++++++++++++++++++++\n\nThe internals of the list schema is available through the ``model`` property\nof the ``ListEndPoint`` instance::\n\n > fields = service.model\n\nThe primary key of the list is exposed through the ``primary_key`` property::\n\n > primary_key = service.primary_key\n\nThe lists of all required field names and all fields is available through::\n\n > all_fields = service.all_fields\n > required_fields = service.required_fields\n\nList item deletion\n++++++++++++++++++\n\nIn order to delete list items by their primary key values, you can use\nthe ``deleteItems()`` method::\n\n > result = service.deleteItems('54', '55')\n > print result\n > print result.result\n > print result.ok\n\nThe ``result`` object is an instance of ``ParsedSoapResult`` providing a\nflag ``ok`` (True|False) indicating the overall success or overall failure \nof the operation. The individual error codes are available by iterating over the \n``result`` property of the ``ParsedSoapResult`` instance.\n\nUpdating list items\n+++++++++++++++++++\n\nYou can update existing list items by passing one or multiple dictionaries\nto ``updateItems()``. Each dict must contain the value of the related primary key\n(in this case the ``ID`` field)::\n\n > data = dict(ID='77', Title=u'Ruebennase', FirstName=u'Heinz')\n > result = service.updateItems(data)\n > print result\n > print result.result\n > print result.ok\n\n``updateItems()`` will not raise any exception. Instead you need to\ncheck the ``ok`` property of the result object and if needed the individual\nitems of the ``result`` property::\n\n # update an item (non-existing ID)\n > data = dict(ID='77000', Title=u'Becker')\n > result = service.updateItems(data)\n > print result\n > print result.result\n > print result.ok\n\nAdding items to a list\n++++++++++++++++++++++\n\nThe ``addItems()`` method works like the ``updateItems()`` method \nexcept that do not have pass in a primary key (since it is not known\non the client side). The assigned primary key value after adding\nthe item to the list should be available from the ``result`` object::\n\n > data = dict(Title=u'Ruebennase', FirstName=u'Heinz')\n > result = service.addItems(data)\n > print result\n > print result.result\n > print result.ok\n > print 'assigned ID:', result.result[0]['row']._ows_ID\n\nRetrieving a single list item\n+++++++++++++++++++++++++++++\n\n``getItem()`` will return a single item by its primary key value::\n\n > data = service.getItem('77') \n\nRetrieving all list items\n+++++++++++++++++++++++++\n\n``getItems()`` will return all list items (use with care!)::\n\n > items = service.getItems()\n\nGeneric query API\n+++++++++++++++++\n\n``query(**kw)`` can be used to query the list with arbitrary query parameters\nwhere each subquery must perform an exact match. All subqueries are combined\nusing a logical AND::\n\n > items = service.query(FirstName='Heinz', Title='Becker')\n\nThe result is returned a Python list of dictified list items.\nAll query parameters must represent a valid field name of the list (ValueError\nexception raised otherwise).\n\nIn order to perform a substring search across _all_ query parameter you may\npass the ``mode='contains'`` parameter. To specify a prefix search across\nall query parameters, use ``mode='beginswith'``.\n\nView support\n++++++++++++\n\n``zopyx.sharepoint`` supports list views of Sharepoint. You can either\nset a default view used for querying Sharepoint like::\n\n > service.setDefaultView('{D9DF14B-21F2-4D75-B796-EA74647C30C6'}')\n\nor you select the view on a per-query basis by passing the view name\nas ``viewName`` method parameter (applies to ``getItem()``, \n``getItems()`` and ``query()``)::\n\n > items = service.getItems(viewName='{D9DF14B-21F2-4D75-B796-EA74647C30C6'}')\n \n\n\nCommand line usage\n------------------\n\n``zopyx.sharepoint`` comes with a small ``sharepoint-inspector`` commandline utility::\n\n sharepoint-inspector --url --list --username --password --cmd \n\nwhere is either ``fields`` or ``items`` \n\n\n\nRequirements\n------------\n\n* Python 2.4 or higher (no support for Python 3.X)\n\nTested\n------\n* tested with Python 2.4-2.6\n* suds 0.4.1 beta or checkout of the suds trunk (https://fedorahosted.org/suds/). suds 0.4.0 is _not_ sufficient!\n* python-ntlm 1.0\n* Microsoft Sharepoint Services 3.0 API\n\nAuthor\n------\n\nWritten for Haufe-Lexware GmbH, Freiburg, Germany.\n\n| ZOPYX Limited\n| Andreas Jung\n| Charlottenstr. 37/1\n| D-72070 Tuebingen\n| www.zopyx.com\n| info@zopyx.com\n\nChangelog\n=========\n\n0.2.0 - 2011/01/07\n------------------\n* code fork\n\n0.1.9 - 2011/06/03\n------------------\n* fixed some documentation glitches\n* added logging at connection time\n\n0.1.8 - 2011/05/30\n------------------\n* fixed improper parameter usage in exception\n\n\n0.1.7 - 2011/05/24\n------------------\n* applied third-party patch containing minor fixes\n\n0.1.6 - 2011/05/04\n------------------\n* better connection error handling\n* WSDL url prefix automatically added to the Sharepoint URL\n* fixed issue in getItems() with empty result sets\n\n0.1.5 - 2011/02/23\n------------------\n* added checkin_file(), checkout_file()\n* the connection ``timeout`` is now configurable through the Connector() API\n* add setDefaultView() API\n\n0.1.4 - 2011/02/22\n------------------\n* support for exact|substring|prefix search through\n the query() API\n\n0.1.3 - 2011/02/22\n------------------\n* added generic query() API\n\n0.1.2 - 2011/02/21\n------------------\n* implemented getItem() in a proper way\n\n0.1.1 - 2011/02/18\n------------------\n\n* minor fixes\n* documentation updated\n\n0.1 - 2011/02/17\n----------------\n\n* Initial release", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://pypi.python.org/pypi/zopyx.sharepoint", "keywords": "Sharepoint", "license": "ZPL", "maintainer": null, "maintainer_email": null, "name": "zopyx.sharepoint", "package_url": "https://pypi.org/project/zopyx.sharepoint/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/zopyx.sharepoint/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://pypi.python.org/pypi/zopyx.sharepoint" }, "release_url": "https://pypi.org/project/zopyx.sharepoint/0.2.0/", "requires_dist": null, "requires_python": null, "summary": "Experimental Python-Sharepoint connector", "version": "0.2.0" }, "last_serial": 802424, "releases": { "0.2.0": [ { "comment_text": "", "digests": { "md5": "6d35558842be48fc358773d0ecfa1729", "sha256": "2bb04183bff1e405c3c6626df35603be949448bc77442b4b82326e60eff17028" }, "downloads": -1, "filename": "zopyx.sharepoint-0.2.0.zip", "has_sig": false, "md5_digest": "6d35558842be48fc358773d0ecfa1729", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19862, "upload_time": "2011-07-01T13:05:06", "url": "https://files.pythonhosted.org/packages/5c/79/1c7149572da6d123347d80f43ef4b6530d98ee045b80f9779a9c696883b9/zopyx.sharepoint-0.2.0.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6d35558842be48fc358773d0ecfa1729", "sha256": "2bb04183bff1e405c3c6626df35603be949448bc77442b4b82326e60eff17028" }, "downloads": -1, "filename": "zopyx.sharepoint-0.2.0.zip", "has_sig": false, "md5_digest": "6d35558842be48fc358773d0ecfa1729", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19862, "upload_time": "2011-07-01T13:05:06", "url": "https://files.pythonhosted.org/packages/5c/79/1c7149572da6d123347d80f43ef4b6530d98ee045b80f9779a9c696883b9/zopyx.sharepoint-0.2.0.zip" } ] }