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.6.2-py3-none-any.whl (16.5 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for atlassian_api_py-0.6.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f005041a812c18ae0c141dfc4c5ce337f5dfb2c51e00f4e1dd46983f65026509
MD5 a02158143542ab2dba81de2d314bca5c
BLAKE2b-256 333d16a20633404200e4b76da06f63afb44d7cb341f0d9aa7e310e5e140728c1

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