Git Product home page Git Product logo

jira-client's Introduction

Jira Client

This project provides a client library for working with Jira boards, epics, sprints and issues.

Installation

pip install jira-client

Connecting to Jira

# Import the JiraClient module
from jiraclient.jiraclient import JiraClient

# Initialize the Jira client using the host name, username and password
client = JiraClient("contoso.atlassian.net", "username", "password")

Some companies host their local Jira instance on a path like /jira, in that case you need to provide the path as well.

client = JiraClient("jira.contoso.com/jira", "username", "password")

What if I'm behind a proxy?

Specify the proxy host, port and (Windows) credentials to the client.

from jiraclient.jiraclient import JiraClient

# Initialize the Jira client
client = JiraClient("contoso.atlassian.net", "username", "password")

# Specify the host, port and username/password for your proxy
client.set_proxy("proxy.contoso.com", 8080, "username", "password")

Boards

Returns all boards. This only includes boards that you have permission to view.

from jiraclient.jiraclient import JiraClient

# Initialize the Jira client
client = JiraClient("contoso.atlassian.net", "username", "password")

# Get all the boards
boards = client.get_boards()

# Iterate through the list of boards
for board in boards:
    print(board.name)

Returns the board for the given board identifier. This board will only be returned if you have permission to view it.

board_id = 12345
board = client.get_board(board_id)

print(board.name)

Epics

Returns all epics from the board, for the given board identifier. This only includes epics that you have permission to view. Note, if you don't have permission to view the board, no epics will be returned at all.

# Initialize the Jira client
client = JiraClient("contoso.atlassian.net", "username", "password")

# Specify a board id, start index and max results
board_id = 12345
start_at = 0
max_results = 50

# Get the (first 50) epics
epics = client.get_epics(board_id, start_at, max_results)

# Iterate the list of epics
for epic in epics:
    print(epic.name)

Sprints

Returns the sprints for a given board identifier.

client = JiraClient("contoso.atlassian.net", "username", "password")
        
board_id = 12345
sprints = client.get_sprints_for_board(board_id)

# Iterate the list of sprints
for sprint in sprints:
    print('{}: {} - {}'.format(sprint.name, sprint.start_date, sprint.end_date))

Returns the active sprint for a given board identifier.

client = JiraClient("contoso.atlassian.net", "username", "password")
        
board_id = 12345
active_sprint = client.get_active_sprint(board_id)
print(active_sprint.goal)

Returns the sprint for a given sprint identifier.

client = JiraClient("contoso.atlassian.net", "username", "password")
        
sprint_id = 123
sprint = client.get_sprint(sprint_id)
print(sprint.name)

jira-client's People

Contributors

rcoenmans avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.