Skip to main content

Python Wrapper for Atlassian REST API

Project description

PyPI Documentation Code Coverage PyPI - Python Version Commit Check

Overview

A Python wrapper for the Atlassian REST API, supporting JIRA, Bitbucket, and Confluence.

It streamlines integration with Atlassian products.

📘 Documentation: atlassian-api-py.readthedocs.io

Installation

To install the package, run the following command:

$ pip install atlassian-api-py

To upgrade to the latest version, use:

$ pip install atlassian-api-py --upgrade

Usage

You can authenticate using either username/password or a personal access token. Credentials can be provided directly or loaded from a configuration file.

Using username and password

from atlassian import Jira
jira = Jira(url='https://jira.company.com', username="your_username", password="your_password")

Using a token

from atlassian import Jira
jira = Jira(url='https://jira.company.com', token="your_token")

Alternatively, load credentials from config.ini file:

[jira]
url = https://jira.company.com
username = your_username
password = your_password
# Alternatively
token = your_token
import configparser
config = configparser.ConfigParser()
config.read('config.ini')

jira_url = config['jira']['url']
jira_usr = config['jira']['username']
jira_psw = config['jira']['password']
# Alternatively
jira_token = config['jira']['token']

Jira Usage

Getting issue fields

issue = jira.issue("TEST-1")
print(issue.fields.status.name)      # e.g. "Triage"
print(issue.fields.description)      # e.g. "This is a demo Jira ticket"
print(issue.fields.issuetype.name)   # e.g. "Bug"

Get additional issue details

print(issue.id)                      # e.g. 1684517
print(issue.key)                     # e.g. "TEST-1"
print(issue.fields.assignee.key)     # e.g. "xpshen"
print(issue.fields.summary)          # e.g. "Jira REST API Unit Test Example"

More about Jira, Bitbucket, and Confluence API usage can be found in the documentation

License

This project is released under the MIT License.

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

If you're not sure about the file name format, learn more about wheel file names.

atlassian_api_py-0.8.0-py3-none-any.whl (19.2 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for atlassian_api_py-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 863a2de68b374205db381d4e41011c164e8582759540d95aad3ab91b6a0afffb
MD5 af6615f4a448d3c47ced31962a64b539
BLAKE2b-256 2c6bcf2a6cfd974e2678b59071560f91fe7bd3d2dfff6332cc64a2868ba0e059

See more details on using hashes here.

Supported by

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