Skip to main content
Help improve PyPI by participating in a 5-minute user interface survey!

Library for communicating with a Redmine project management application

Project Description

https://badge.fury.io/py/python-redmine.png https://pypip.in/d/python-redmine/badge.png https://travis-ci.org/maxtepkeev/python-redmine.png?branch=master https://coveralls.io/repos/maxtepkeev/python-redmine/badge.png?branch=master

Python Redmine is a library for communicating with a Redmine project management application. Redmine exposes some of it’s data via REST API for which Python Redmine provides a simple but powerful Pythonic API inspired by a well-known Django ORM:

>>> from redmine import Redmine

>>> redmine = Redmine('http://demo.redmine.org', username='foo', password='bar')
>>> project = redmine.project.get('vacation')

>>> project.id
30404

>>> project.identifier
'vacation'

>>> project.created_on
datetime.datetime(2013, 12, 31, 13, 27, 47)

>>> project.issues
<redmine.resultsets.ResourceSet object with Issue resources>

>>> project.issues[0]
<redmine.resources.Issue #34441 "Vacation">

>>> dir(project.issues[0])
['assigned_to', 'author', 'created_on', 'description', 'done_ratio',
'due_date', 'estimated_hours', 'id', 'priority', 'project', 'relations',
'start_date', 'status', 'subject', 'time_entries', 'tracker', 'updated_on']

>>> project.issues[0].subject
'Vacation'

>>> project.issues[0].time_entries
<redmine.resultsets.ResourceSet object with TimeEntry resources>

Features

  • Supports 100% of Redmine API features
  • Supports Python 2.6 - 3.3
  • Extensively documented
  • Provides ORM-style Pythonic API

Dependencies

Python Redmine relies heavily on great Requests library by Kenneth Reitz for all the http(s) calls.

Installation

To install Python Redmine, simply:

$ pip install python-redmine

or:

$ easy_install python-redmine

Documentation

Documentation is available at http://python-redmine.readthedocs.org.

Contact and Support

I will be glad to get your feedback, pull requests, issues, whatever. Feel free to contact me for any questions.

Donations

If you like this project and want to support it, please GITTIP it’s author.

Changelog

0.5.0 (2014-02-09)

  • Added: An ability to create custom resources which allow to easily redefine the behaviour of existing resources (see docs for details)
  • Added: An ability to add/remove watcher to/from issue (see docs for details)
  • Added: An ability to add/remove users to/from group (see docs for details)

0.4.0 (2014-02-08)

  • Added: New exceptions:
    • ConflictError
    • ReadonlyAttrError
    • ResultSetTotalCountError
    • CustomFieldValueError
  • Added: Update functionality via update() and save() methods for resources (see docs for details):
    • User
    • Group
    • IssueCategory
    • Version
    • TimeEntry
    • ProjectMembership
    • WikiPage
    • Project
    • Issue
  • Added: Limit/offset support via all() and filter() methods for resources that doesn’t support that feature via Redmine:
    • IssueRelation
    • Version
    • WikiPage
    • IssueStatus
    • Tracker
    • Enumeration
    • IssueCategory
    • Role
    • Group
    • CustomField
  • Added: On demand includes, e.g. in addition to redmine.group.get(1, include='users') users for a group can also be retrieved on demand via group.users if include wasn’t set (see each resource docs for details)
  • Added: total_count attribute to ResourceSet object which holds the total number of resources for the current resource type available in Redmine (thanks to Andrei Avram)
  • Added: An ability to return None instead of raising a ResourceAttrError for all or selected resource objects via raise_attr_exception kwarg on Redmine object (see docs for details or Issue #6)
  • Added: pre_create(), post_create(), pre_update(), post_update() resource object methods which can be used to execute tasks that should be done before/after creating/updating the resource through save() method
  • Added: Allow to create resources in alternative way via new() method (see docs for details)
  • Added: Allow daterange TimeEntry resource filtering via from_date and to_date keyword arguments (thanks to Antoni Aloy)
  • Added: An ability to retrieve Issue version via version attribute in addition to fixed_version to be more obvious
  • Changed: Documentation for resources rewritten from scratch to be more understandable
  • Fixed: Saving custom fields to Redmine didn’t work in some situations
  • Fixed: Issue’s fixed_version attribute was retrieved as dict instead of Version resource object
  • Fixed: Resource relations were requested from Redmine every time instead of caching the result after first request
  • Fixed: Issue #2 (limit/offset as keyword arguments were broken)
  • Fixed: Issue #5 (Version resource status attribute was converted to IssueStatus resource by mistake) (thanks to Andrei Avram)
  • Fixed: A lot of small fixes, enhancements and refactoring here and there

0.3.1 (2014-01-23)

  • Added: An ability to pass Requests parameters as a dictionary via requests keyword argument on Redmine initialization, i.e. Redmine(‘http://redmine.url’, requests={}).
  • Fixed: Issue #1 (unable to connect to Redmine server with invalid ssl certificate).

0.3.0 (2014-01-18)

  • Added: Delete functionality via delete() method for resources (see docs for details):
    • User
    • Group
    • IssueCategory
    • Version
    • TimeEntry
    • IssueRelation
    • ProjectMembership
    • WikiPage
    • Project
    • Issue
  • Changed: ResourceManager get() method now raises a ValidationError exception if required keyword arguments aren’t passed

0.2.0 (2014-01-16)

  • Added: New exceptions:
    • ServerError
    • NoFileError
    • ValidationError
    • VersionMismatchError
    • ResourceNoFieldsProvidedError
    • ResourceNotFoundError
  • Added: Create functionality via create() method for resources (see docs for details):
    • User
    • Group
    • IssueCategory
    • Version
    • TimeEntry
    • IssueRelation
    • ProjectMembership
    • WikiPage
    • Project
    • Issue
  • Added: File upload support, see upload() method in Redmine class
  • Added: Integer representation to all resources, i.e. __int__()
  • Added: Informal string representation to all resources, i.e. __str__()
  • Changed: Renamed version attribute to redmine_version in all resources to avoid name intersections
  • Changed: ResourceManager get() method now raises a ResourceNotFoundError exception if resource wasn’t found instead of returning None in previous versions
  • Changed: reimplemented fix for __repr__() from 0.1.1
  • Fixed: Conversion of issue priorities to enumeration resource object didn’t work

0.1.1 (2014-01-10)

  • Added: Python 2.6 support
  • Changed: WikiPage resource refresh() method now automatically determines it’s project_id
  • Fixed: Resource representation, i.e. __repr__(), was broken in Python 2.7
  • Fixed: dir() call on a resource object didn’t work in Python 3.2

0.1.0 (2014-01-09)

  • Initial release

Release history Release notifications

History Node

2.0.2

History Node

2.0.1

History Node

2.0.0

History Node

1.5.1

History Node

1.5.0

History Node

1.4.0

History Node

1.3.0

History Node

1.2.0

History Node

1.1.2

History Node

1.1.1

History Node

1.1.0

History Node

1.0.3

History Node

1.0.2

History Node

1.0.1

History Node

1.0.0

History Node

0.9.0

History Node

0.8.4

History Node

0.8.3

History Node

0.8.2

History Node

0.8.1

History Node

0.8.0

History Node

0.7.2

History Node

0.7.1

History Node

0.7.0

History Node

0.6.2

History Node

0.6.1

History Node

0.6.0

This version
History Node

0.5.0

History Node

0.4.0

History Node

0.3.1

History Node

0.3.0

History Node

0.2.0

History Node

0.1.1

History Node

0.1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
python-redmine-0.5.0.tar.gz (14.1 kB) Copy SHA256 hash SHA256 Source None Feb 9, 2014

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page