Skip to main content

Atlassian REST API Python Wrapper.

Project description

Atlassian REST API Python Wrapper

PyPI CodeFactor PyPI - Downloads

What is this?

This package is a wrapper of Atlassian Rest APIs written in Python, currently it supports Atlassian products: JIRA and Bitbucket.

This API package was created to bring ease of implementation for integration with JIRA and Bitbucket.

QuickStart

>>> from atlassian import Jira

>>> jira = Jira(url='https://jira.company.com', username="username", password="password")
>>> issue = jira.issue('TEST-1')
>>> print(issue.fields.status.name)
Triage
>>> print(issue.fields.description)
this is a demo jira ticket
>>> print(issue.fields.status.name)
Triage
>>> print(issue.fields.issuetype.name)
Bug

Put your username and password in a configuration file config.ini, for example:

[jira]
url = https://jira.company.com
username = username
password = password

Then get the credential information though the configuration file config.ini

>>> import configparser
>>> config = configparser.ConfigParser()
>>> config.read('config.ini')

>>> jira_url = config['jira']['url']
>>> jira_usr = config['jira']['username']
>>> jira_psw = config['jira']['password']

>>> jira = Jira(url=jira_url, username=jira_usr, password=jira_psw)
>>> issue = jira.issue('TEST-1')
>>> print(issue.fields.status.name)
Triage
>>> print(issue.fields.description)
this is a demo jira ticket
>>> print(issue.fields.status.name)
Triage
>>> print(issue.fields.issuetype.name)
Bug

Install from PyPI

# install
$ pip install atlassian-api-py

# upgrade
$ pip install atlassian-api-py --upgrade

Unittest and Coverage

Run unittest

cd tests
python -m unittest

Run coverage

cd tests
coverage run -m unittest
coverage report -m              # to report on the results
coverage html                   # to get annotated HTML

FAQ

Q1: Which Jira/BitBucket version I used to develop?

For Jira I used Jira v8.5.9 and Jira Cloud.

For BitBucket I used Bitbucket v5.13.1. not support Bitbucket cloud for now.

Q2: Are there any major changes?

From v0.2.0 (3/9/2021), convert Get JIra API data from dict to object, no longer compatible with past old versions.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

atlassian_api_py-0.2.2-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file atlassian_api_py-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: atlassian_api_py-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 9.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.7

File hashes

Hashes for atlassian_api_py-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 de3770c22f3cbacbe96bbc3afe2e12a6ac0d2f0b86506ddc86bed1b131f1ff00
MD5 6ca6f66c4a22c7a124b22784cc6c5cf5
BLAKE2b-256 6ff70051b738f79bcc34bf1f6a49ee47368b42a47e69bee47988e299c19db37c

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page