Skip to main content

Dump JIRA issues to a dictionary / JSON.

Project description

Jira to Json

A Python library to convert Jira issues to Json.

GitHub branch checks state PyPI PyPI - Python Version codecov

The library is based on the Jira REST API, and uses the Requests library.

It contacts the Jira server, downloads the issues according to the specified JQL query, and converts them to Json. An API is provided to access the issues and their fields and for further processing.

Supports Jira Datacenter.

Installation

Install the library with pip:

pip install jira2json[dotenv]

The dotenv extra installs the python-dotenv library, which is used to load the Jira server's url and the authentication token from a .env file.

Usage

The library can be used as a command line tool or as a Python library.

Command line tool

The command line tool is called jira2json and is installed with the library.

Run jira2json --help for usage information.

Python library

The library exports the following functions:

  • iterate_jira_issues: iterates over the issues returned by a JQL query.
  • prase_issues: applies parsers on the issue's data.
  • save_jsons_to_file: saves the issues to a file.

Typical usage:

from jira2json import iterate_jira_issues, prase_issues, save_jsons_to_file

# Iterate over the issues returned by the JQL query
issues = iterate_jira_issues(
    base_url='https://jira.atlassian.com',
    jql='project=JRA',
    token='mytoken',
)

# Parse the jsons and convert them to a more usable format
issues = prase_issues(issues)

# Save the issues to a file
with open('issues.json', 'w') as f:
    save_jsons_to_file(issues, f)

Development

Install the dev extra:

pip install -e .[dev,dotenv]

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

jira2json-0.1.1-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file jira2json-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: jira2json-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for jira2json-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7f05f0250b664b13bbf1355d4f740c926a6b2775079db4d7feb36aac3dc15700
MD5 0f1b64b4f09d5b02717cbbf47f22b7b3
BLAKE2b-256 04bb31403f765ca0059c87d32474f509c94413a9fdf386156d494fde939427a4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page