Active Collab library in Python

by jaymz on 16/02/2011

We use active collab at work to manage our various projects and track issues on sites we’re building. It comes complete with a REST API which returns results in XML. So I’ve written some code that abstracts out the process of making a request and displaying the returned data. It’s, predictably, on github.

Here’s an example based on the 0.2.0 code which is simply outputting data for now allowing me to check on open tickets easily from code. Remember, to enable write methods to work (setting a ticket to complete for example) you need to have Write Access enabled via the config.php file.

In [1]: from activecollab.library import ACRequest
 
In [2]: req = ACRequest('projects')
 
In [3]: req.execute()
34: AC 101: http://my.ac-site.com/projects/34
# More results trimmed
 
In [4]: req = ACRequest('projects', item_id=34, subcommand='tickets')
 
In [5]: req.execute()
2208: ie6 error when zooming on map: http://my.ac-site.com/projects/34/tickets/1: 1
2216: new user accounts for testing: http://my.ac-site.com/projects/34/tickets/3: 3

I’ve also blogged about this over at our udox company site.

jaymzcd@googlemail.com

Comments are closed.