{ "info": { "author": "Tiziano Lattisi", "author_email": "tiziano@axiastudio.it", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta" ], "description": "A ligthweight python library based on the Alfresco RESTful web services.\r\n\r\nSample usage::\r\n\r\n from alfREST import RESTHelper\r\n path = \"/Sites/mysite/documentLibrary/test\"\r\n\r\n # login\r\n rh = RESTHelper()\r\n rh.login(login, password, host, port)\r\n\r\n # createDocument (sio could be a file object...)\r\n from StringIO import StringIO\r\n sio = StringIO()\r\n sio.write(\"Well, that's all folks.\")\r\n sio.seek(0)\r\n sio.name = \"test.txt\"\r\n tkns = path.split(\"/\")\r\n siteId = tkns[2]\r\n containerId = tkns[3]\r\n uploadDirectory = \"/\".join(tkns[4:])\r\n idObject = rh.fileUpload(sio, siteId, containerId, \"/%s\" % uploadDirectory)\r\n sio.close()\r\n\r\n # get properties\r\n props = rh.getProperties(\"%s/test.txt\" % path)\r\n assert props[\"cmis:createdBy\"] == login\r\n\r\n # get content\r\n content = rh.getContent(\"%s/test.txt\" % path)\r\n assert content == \"Well, that's all folks.\"\r\n\r\n # add a tag to the document\r\n rh.addTag(\"workspace\", \"SpacesStore\", idObject, \"tag_test\")\r\n assert \"tag_test\" in rh.getNodeTags(\"workspace\", \"SpacesStore\", idObject)\r\n\r\n # list document in folder\r\n children = rh.getChildren(path)\r\n assert children[0][\"cmis:name\"] == \"test.txt\"\r\n\r\n # create a group and apply a policy to the test folder\r\n rh.addRootGroup(u\"GROUP_TEST\")\r\n acl = {}\r\n acl[u'GROUP_TEST'] = [([u\"{http://www.alfresco.org/model/content/1.0}cmobject.Consumer\",], True),]\r\n rh.applyACL(path, acl)\r\n\r\n # create a new user, insert the user in the group \r\n rh.addPerson(\"supermario\", \"mario\", \"super\", \"supermario@nintendo.com\", \"imsuper\")\r\n rh.addGroupOrUserToGroup(u\"supermario\", u\"GROUP_TEST\")\r\n\r\n # some check\r\n users = rh.listChildAuthorities(u\"GROUP_TEST\")\r\n assert len(users) == 1\r\n assert users[0]['fullName'] == \"supermario\"\r\n\r\n # restore initial status\r\n rh.removeAuthorityFromGroup(u\"supermario\", u\"GROUP_TEST\")\r\n rh.deletePerson(\"supermario\")\r\n acl = {}\r\n rh.applyACL(path, acl)\r\n rh.deleteRootGroup(u\"GROUP_TEST\")\r\n\r\n # remove tag from the file object\r\n rh.deleteTag(\"workspace\", \"SpacesStore\", idObject, \"tag_test\")\r\n assert \"tag_test\" not in rh.getNodeTags(\"workspace\", \"SpacesStore\", idObject)\r\n\r\n # delete the file object\r\n rh.deleteObject(idObject)\r\n\r\n # logout\r\n rh.logout()\r\n\r\n**Changelogs 0.9.3**\r\n\r\n- addTag\r\n- deleteTag\r\n\r\n**Changelogs 0.9.2c (bugfix: upload binary files works)**\r\n\r\n- createFolder\r\n- getNodeTags (get all the tags for a node)\r\n\r\n**Changelogs 0.9.1**\r\n\r\n- upload (upload file content and meta-data into repository)\r\n- delete file (delete the specified object)\r\n- getChildren (gets the list of child objects contained in the specified folder)\r\n- getContent (gets the content stream for the specified document)\r\n- getProperties (gets the properties for the object)\r\n\r\n**Road to 1.0**\r\n\r\n- Create / Move a Folder or Document (createDocument, createFolder, createPolicy, moveObject)\r\n- Write Content (setContent)\r\n- Delete Content (deleteContent)\r\n- Get Content (getContent)\r\n- Get Folder Children (getChildren)\r\n\r\n\r\n**Road to 1.1**\r\n\r\n- Get Checked Out Documents (getCheckedOutDocs)\r\n- Checkout Document (checkOut)\r\n- Cancel Checkout (cancelCheckout)\r\n- Checkin Private Working Copy (checkin)\r\n\r\n\r\n**Contacts**\r\n\r\nFor more info and requests: tiziano [at] axiastudio.it", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://www.axiastudio.it", "keywords": "alfresco REST RESTful web API", "license": "", "maintainer": "Tiziano Lattisi", "maintainer_email": "tiziano@axiastudio.it", "name": "alfREST", "package_url": "https://pypi.org/project/alfREST/", "platform": "", "project_url": "https://pypi.org/project/alfREST/", "project_urls": { "Homepage": "http://www.axiastudio.it" }, "release_url": "https://pypi.org/project/alfREST/0.9.3/", "requires_dist": null, "requires_python": null, "summary": "Alfresco REST web services client library for python", "version": "0.9.3" }, "last_serial": 726880, "releases": { "0.9": [ { "comment_text": "", "digests": { "md5": "6de0fc7923d1c745b26ebf0e0c4c713a", "sha256": "28ed4e0d350a6039b95d22810c213967d848feb2d8ff160b93fde3bff6dde1b1" }, "downloads": -1, "filename": "alfREST-0.9.tar.gz", "has_sig": false, "md5_digest": "6de0fc7923d1c745b26ebf0e0c4c713a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17872, "upload_time": "2012-02-02T16:41:00", "url": "https://files.pythonhosted.org/packages/a9/f3/b3c2ec90a867f27ee68129d3feba4dfca659f4830322a8acfa64b8d604ed/alfREST-0.9.tar.gz" } ], "0.9.1": [ { "comment_text": "", "digests": { "md5": "f9dfe9a52bf371c189bf788147e0db97", "sha256": "bec73f27720fb9b93acbba555a0a8250cac4535e9408622a110e191a0d4f61d8" }, "downloads": -1, "filename": "alfREST-0.9.1.tar.gz", "has_sig": false, "md5_digest": "f9dfe9a52bf371c189bf788147e0db97", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19887, "upload_time": "2012-03-19T11:05:13", "url": "https://files.pythonhosted.org/packages/71/e1/843b8eaffa92821b598b236cf94a825a31d2d780719648ab729eb1668ca4/alfREST-0.9.1.tar.gz" } ], "0.9.2": [ { "comment_text": "", "digests": { "md5": "7ec6d1594196ff33ce25f6366b7143cc", "sha256": "c6c284f5f91d228faed46db1cddee4b3d4be99516522eb4a526b7c81511b07ac" }, "downloads": -1, "filename": "alfREST-0.9.2c.tar.gz", "has_sig": false, "md5_digest": "7ec6d1594196ff33ce25f6366b7143cc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20693, "upload_time": "2012-07-05T10:43:44", "url": "https://files.pythonhosted.org/packages/61/8d/f602853fbf5f037795d849f69788a51869864be99a347811371b439f2911/alfREST-0.9.2c.tar.gz" } ], "0.9.3": [ { "comment_text": "", "digests": { "md5": "c7e272ea586712bf4b278e5b169bed49", "sha256": "0b4372a0f1ecd2333dfd41c1e6c5f74f9e403cd5205da11547557b34c0686e51" }, "downloads": -1, "filename": "alfREST-0.9.3b.tar.gz", "has_sig": false, "md5_digest": "c7e272ea586712bf4b278e5b169bed49", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21004, "upload_time": "2012-11-12T14:19:21", "url": "https://files.pythonhosted.org/packages/69/93/ecb4310b259c72702b11d217770dc925604f6ee48c5c3b8eb4365684a26c/alfREST-0.9.3b.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c7e272ea586712bf4b278e5b169bed49", "sha256": "0b4372a0f1ecd2333dfd41c1e6c5f74f9e403cd5205da11547557b34c0686e51" }, "downloads": -1, "filename": "alfREST-0.9.3b.tar.gz", "has_sig": false, "md5_digest": "c7e272ea586712bf4b278e5b169bed49", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21004, "upload_time": "2012-11-12T14:19:21", "url": "https://files.pythonhosted.org/packages/69/93/ecb4310b259c72702b11d217770dc925604f6ee48c5c3b8eb4365684a26c/alfREST-0.9.3b.tar.gz" } ] }