Alfresco REST web services client library for python
Project description
A ligthweight python library based on the Alfresco RESTful web services.
Sample usage:
from alfREST import RESTHelper path = "/Sites/mysite/documentLibrary/test" # login rh = RESTHelper() rh.login(login, password, host, port) # create a group and apply a policy to the test folder rh.addRootGroup(u"GROUP_TEST") acl = {} acl[u'GROUP_TEST'] = [([u"{http://www.alfresco.org/model/content/1.0}cmobject.Consumer",], True),] rh.applyACL(path, acl) # create a new user, insert the user in the group rh.addPerson("supermario", "mario", "super", "supermario@nintendo.com", "imsuper") rh.addGroupOrUserToGroup(u"supermario", u"GROUP_TEST") # some check users = rh.listChildAuthorities(u"GROUP_TEST") assert len(users) == 1 assert users[0]['fullName'] == "supermario" # restore initial status rh.removeAuthorityFromGroup(u"supermario", u"GROUP_TEST") rh.deletePerson("supermario") acl = {} rh.applyACL(path, acl) rh.deleteRootGroup(u"GROUP_TEST") # logout rh.logout()
Road to 1.0
Create / Move a Folder or Document (createDocument, createFolder, createPolicy, moveObject)
Write Content (setContent)
Delete Content (deleteContent)
Get Content (getContent)
Get Folder Children (getChildren)
Road to 1.1
Get Checked Out Documents (getCheckedOutDocs)
Checkout Document (checkOut)
Cancel Checkout (cancelCheckout)
Checkin Private Working Copy (checkin)
Contacts
For more info and requests: tiziano [at] axiastudio.it
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
alfREST-0.9.tar.gz
(17.9 kB
view hashes)