Project

General

Profile

Actions

Rest api ẅith python » History » Revision 7

« Previous | Revision 7/18 (diff) | Next »
Javier Hernandez, 2010-11-09 10:15


Using the REST API with Python

Here is the two well-known options for using REST API with python.

  1. PyActiveResource
  2. Python library

PyActiveResource example:

# Importing pyactiveresource
from pyactiveresource.activeresource import ActiveResource

class Issue(ActiveResource):
    _site = 'http://redmine.foo.org'
    _user = 'username'
    _password = 'password'

# Get issues
issues = Issue.find()

# Get a specific issue, from its id
issue = Issue.find(1345)

# Issue attributes

# Updating an attribute

Updated by Javier Hernandez over 13 years ago · 7 revisions