Skip to content

JiraAPI

The main entry point for all Jira operations.

Constructor

from jira2py import JiraAPI

jira = JiraAPI(
    url: str | None = None,
    username: str | None = None,
    api_token: str | None = None,
    max_retries: int = 4,
    max_retry_delay: float = 30.0,
)
Parameter Default Description
url None Jira instance URL. Falls back to JIRA_URL env var.
username None Atlassian account email. Falls back to JIRA_USER env var.
api_token None API token. Falls back to JIRA_API_TOKEN env var.
max_retries 4 Max retry attempts on HTTP 429.
max_retry_delay 30.0 Max delay between retries in seconds.

See Configuration for credential resolution and Rate Limiting for retry behavior.

Properties

Property Type Description
issues Issues Issue operations
search IssueSearch JQL search
comments IssueComments Issue comments
fields IssueFields System and custom fields
issue_links IssueLinks Issue link operations
projects Projects Project search
attachments Attachments Attachment metadata
users Users User search

Usage

from jira2py import JiraAPI

jira = JiraAPI()

# Access any module through the facade
issue = jira.issues.get_issue("PROJ-123")
results = jira.search.enhanced_search("project = PROJ")
fields = jira.fields.get_fields()
projects = jira.projects.search_projects()