
Product
Redesigned Repositories Page: A Faster Way to Prioritize Security Risk
Our redesigned Repositories page adds alert severity, filtering, and tabs for faster triage and clearer insights across all your projects.
This package is a Python wrapper for the Atlassian REST API, currently supporting JIRA and Bitbucket. It simplifies the implementation of integration with these tools.
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
Establish connection
You can connect to JIRA using a username and password or a token.
Using Username and Password
>>> from atlassian import Jira
>>> jira = Jira(url='https://jira.company.com', username="username", password="password")
Using a Token
>>> from atlassian import Jira
>>> jira = Jira(url='https://jira.company.com', token="yourToken")
Using a Configuration File
Alternatively, you can store your credentials in a config.ini
file:
[jira]
url = https://jira.company.com
username = username
password = password
# Or
token = yourToken
Then, you can use the configuration file to establish a connection:
>>> 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_token = config['jira']['token']
Next, you can get the issue's fields as follow:
>>> 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
>>> print(issue.id)
1684517
>>> print(issue.key)
TEST-1
>>> print(issue.fields.assignee.key)
xpshen
>>> print(issue.fields.summary)
Jira REST API Unit Test Example
>>> ...
This project is released under the MIT License.
FAQs
Python Wrapper for Atlassian REST API
We found that atlassian-api-py demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Our redesigned Repositories page adds alert severity, filtering, and tabs for faster triage and clearer insights across all your projects.
Security News
Multiple deserialization flaws in PyTorch Lightning could allow remote code execution when loading untrusted model files, affecting versions up to 2.4.0.
Security News
NVD now marks all pre-2018 CVEs as "Deferred," signaling it will no longer enrich older vulnerabilities, further eroding trust in its data.