Using the REST API with Python¶
Here is the two well-known options for using REST API with python.
PyActiveResource example:¶
1# Importing pyactiveresource
2from pyactiveresource.activeresource import ActiveResource
3
4class Issue(ActiveResource):
5 _site = 'http://redmine.foo.org'
6 _user = 'username'
7 _password = 'password'
8
9# Get issues
10issues = Issue.find()
11
12# Get a specific issue, from its id
13issue = Issue.find(1345)
14
15# Issue attributes
16
17# Updating an attribute
18