Skip to main content

Join the Gitter chat Latest PyPI version Python versions Latest Travis CI build status Test coverage Code Climate License

A module for using the Taiga REST API. Documentation: https://python-taiga.readthedocs.io/

Install

pip install python-taiga

Contribute to python-taiga

  • If you want to contribute to python-taiga with small fixes or updates please open a PR on Github

  • If you want to start working on a big feature please let’s discuss it together, opening a new issue

  • If you want to contribute to python-taiga’s documentation use the generate_docs.sh script to build the official documentation and send a PR (We use sphinx http://sphinx-doc.org/)

Getting Started

Getting started with the Taiga API couldn’t be easier. Create a TaigaAPI and you’re ready to go.

API Credentials

The TaigaAPI needs your Taiga credentials. You can pass these directly to the auth method (see the code below).

from taiga import TaigaAPI

api = TaigaAPI()

api.auth(
    username='user',
    password='psw'
)

Alternately, you can pass a token to the constructor TaigaAPI constructor.

from taiga import TaigaAPI

api = TaigaAPI(token='mytoken')

You can also specify a different host if you use Taiga somewhere else

from taiga import TaigaAPI

api = TaigaAPI(
    host='http://taiga.my.host.org'
)

Get projects, user stories, task and issues

You can get projects, user stories, tasks and issues using the primary key or using slug/ref

new_project = api.projects.get_by_slug('nephila')
print (new_project.get_issue_by_ref(1036))
print (new_project.get_userstory_by_ref(1111))
print (new_project.get_task_by_ref(1112))

Create a project

new_project = api.projects.create('TEST PROJECT', 'TESTING API')

Create a new user story

userstory = new_project.add_user_story(
    'New Story', description='Blablablabla'
)

You can also create a milestone and pass it to a story

jan_feb_milestone = new_project.add_milestone(
    'MILESTONE 1', '2015-01-26', '2015-02-26'
)

userstory = new_project.add_user_story(
    'New Story', description='Blablablabla',
    milestone=jan_feb_milestone.id
)

To add a task to your user story just run

userstory.add_task(
    'New Task 2',
    new_project.task_statuses[0].id
)

Create an issue

newissue = new_project.add_issue(
    'New Issue',
    new_project.priorities.get(name='High').id,
    new_project.issue_statuses.get(name='New').id,
    new_project.issue_types.get(name='Bug').id,
    new_project.severities.get(name='Minor').id,
    description='Bug #5'
)

Create a custom attribute

new_project.add_issue_attribute(
    'Device', description='(iPad, iPod, iPhone, Desktop, etc.)'
)
newissue.set_attribute('1', 'Desktop')

List elements

projects = api.projects.list()
stories = api.user_stories.list()

You can also specify filters

tasks = api.tasks.list(project=1)

Attach a file

You can attach files to issues, user stories and tasks

newissue.attach('README.md', description='Read the README in Issue')

Play with instances

Instances can have actions, for example you can star a project just calling

new_project = api.projects.create('TEST PROJECT', 'TESTING API')
new_project.star()

Any instance can be updated and deleted

new_project.name = 'New name for my project'
new_project.update()
new_project.delete()

History

You can access the history of issues, tasks, userstories and wiki pages:

history = api.history.user_story.get(user_story.id)

You can find a complete example in demo.py.

Metadata

Release files for python-taiga 0.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for python-taiga 0.9.0
File Size Uploaded Provenance Actions
python-taiga-0.9.0.tar.gz 18.7 kB Without provenance Details for python-taiga-0.9.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for python-taiga 0.9.0
File Interpreter ABI Platform Actions
python_taiga-0.9.0-py2.py3-none-any.whl Python 2, Python 3 none any Details for python_taiga-0.9.0-py2.py3-none-any.whl

Total release size: 39.3 kB

Release files / python-taiga-0.9.0.tar.gz

Download URL python-taiga-0.9.0.tar.gz
Size 18.7 kB
Tags Source
SHA-256 checksum
How to use checksums
ee615f82aecaea2f2612f2098f02b375f119994f9a933c0dfc1a50204b30192c
BLAKE2b-256 checksum
How to use checksums
8cba0e8fd01a15be201a7697cdc6fd77bb7344b95fd572307092e98830bc8546
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / python_taiga-0.9.0-py2.py3-none-any.whl

Download URL python_taiga-0.9.0-py2.py3-none-any.whl
Size 20.6 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
fd98c474ab1d78d7ea75f26a473f802cd03416468e0c931da24d4e423ae68ab9
BLAKE2b-256 checksum
How to use checksums
e7db42896fadd5e69f7071544a355f102dc28c539c4a4b824f89df400352d34e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for python-taiga 0.9.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page