Welcome to Atlassian Python API’s documentation!

Build status PyPI version PyPI - Downloads License Codacy Badge Documentation Status

Getting started

Install package using pip:

pip install atlassian-python-api

Add a connection:

from atlassian import Jira
from atlassian import Confluence
from atlassian import Bitbucket
from atlassian import ServiceDesk

jira = Jira(
    url='http://localhost:8080',
    username='admin',
    password='admin')

confluence = Confluence(
    url='http://localhost:8090',
    username='admin',
    password='admin')

bitbucket = Bitbucket(
    url='http://localhost:7990',
    username='admin',
    password='admin')

service_desk = ServiceDesk(
    url='http://localhost:8080',
    username='admin',
    password='admin')

Key/Cert Based authentication

Add a connection using key/cert based authentication:

from atlassian import Jira
from atlassian import Confluence
from atlassian import Bitbucket
from atlassian import ServiceDesk

jira = Jira(
    url='http://localhost:8080',
    key='/path/to/key',
    cert='/path/to/cert')

confluence = Confluence(
    url='http://localhost:8090',
    key='/path/to/key',
    cert='/path/to/cert')

bitbucket = Bitbucket(
    url='http://localhost:7990',
    key='/path/to/key',
    cert='/path/to/cert')

service_desk = ServiceDesk(
    url='http://localhost:8080',
    key='/path/to/key',
    cert='/path/to/cert')

Alternatively OAuth can be used:

oauth_dict = {
    'access_token': 'access_token',
    'access_token_secret': 'access_token_secret',
    'consumer_key': 'consumer_key',
    'key_cert': 'key_cert'}

jira = Jira(
    url='http://localhost:8080',
    oauth=oauth_dict)

confluence = Confluence(
    url='http://localhost:8090',
    oauth=oauth_dict)

bitbucket = Bitbucket(
    url='http://localhost:7990',
    oauth=oauth_dict)

service_desk = ServiceDesk(
    url='http://localhost:8080',
    oauth=oauth_dict)

Or Kerberos (installation with kerberos extra necessary):

kerberos_service = 'HTTP/jira.localhost@YOUR.DOMAIN.COM'

jira = Jira(
    url='http://localhost:8080',
    kerberos=kerberos_service)

confluence = Confluence(
    url='http://localhost:8090',
    kerberos=kerberos_service)

bitbucket = Bitbucket(
    url='http://localhost:7990',
    kerberos=kerberos_service)

service_desk = ServiceDesk(
    url='http://localhost:8080',
    kerberos=kerberos_service)