collection of biblical humans and their family relations
Project description
README.md Content
# jira_api_client
A Python package for interacting with the Jira REST API, providing a simple function to fetch data from Jira endpoints.
## Installation
Install the package using pip:
```bash
pip install jira_api_client
This will automatically install the required dependency (requests>=2.25.1).
Requirements
- Python 3.6 or higher
- Access to a Jira instance with valid credentials (username and API token)
Usage
The package provides a main function, fetch_jira_data, to retrieve data from Jira REST API endpoints.
Example: Fetch Issue Details
from jira_api.jira_client import fetch_jira_data, HTTP_SUCCESS
# Define the Jira URL, authentication, and parameters
url = "https://your-jira-instance.atlassian.net/rest/api/2/issue/JIGY-29"
auth = ("your_username", "your_api_token") # Use your Jira username and API token
params = {"fields": "summary,status,comment,worklog"}
# Fetch data
data = fetch_jira_data(url, auth, params)
# Check if the request was successful
if data and data.get('status_code', HTTP_SUCCESS) == HTTP_SUCCESS:
print("Issue data:", data)
else:
print("Failed to fetch data")
Function Details
fetch_jira_data(url, auth, params=None):- Parameters:
url(str): The Jira REST API endpoint (e.g.,/rest/api/2/issue/{issueKey}).auth: A tuple of (username, password) or (username, API token) for authentication.params(dict, optional): Query parameters for the API request (e.g.,{"fields": "summary"}).
- Returns:
dict: JSON response data if the request is successful (status code 200).None: If the request fails, with an error message printed.
- HTTP_SUCCESS: Constant for status code 200, imported as
HTTP_SUCCESS.
- Parameters:
Example: Fetch Sprint Issues
from jira_api.jira_client import fetch_jira_data, HTTP_SUCCESS
url = "https://your-jira-instance.atlassian.net/rest/agile/1.0/sprint/123/issue"
auth = ("your_username", "your_api_token")
params = {"jql": "status in (Done, Closed, Resolved)", "maxResults": 500, "fields": "key,customfield_10111"}
data = fetch_jira_data(url, auth, params)
if data:
issues = data.get('issues', [])
for issue in issues:
print(f"Issue {issue['key']}: {issue.get('fields', {}).get('customfield_10111', 'No story points')}")
Version History
- 0.1.0 (2025-04-20): Initial release with
fetch_jira_datafunction for Jira API calls.
### Notes
- **Customization**: Replace placeholders like `your-jira-instance.atlassian.net`, `your_username`, `your_api_token`, `Your Name`, and `your.email@example.com` with actual values.
- **Examples**: The usage examples demonstrate fetching issue details and sprint issues, aligning with your `calculate_velocity.py` use case.
- **License**: Add a `LICENSE` file (e.g., MIT) if you plan to distribute the package. The `README.md` references it.
- **Version History**: Reflects the initial release date as April 20, 2025, based on our current interaction.
- **Development Section**: Includes instructions for building and uploading, useful for you and potential contributors.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
jira_veya-0.0.1.tar.gz
(14.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
jira_veya-0.0.1-py3-none-any.whl
(14.9 kB
view details)
File details
Details for the file jira_veya-0.0.1.tar.gz.
File metadata
- Download URL: jira_veya-0.0.1.tar.gz
- Upload date:
- Size: 14.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ebeb19ab347bfee7783aac8fc52fbfb5107f88d3b8edf29c9bafdd2b1713fee
|
|
| MD5 |
6a5b593adb0c514052f018d0b3a41e97
|
|
| BLAKE2b-256 |
910bb86bb7bc82fff806b7dbc80bb37dd7507e29f0fee701bc3bdc57c5572738
|
File details
Details for the file jira_veya-0.0.1-py3-none-any.whl.
File metadata
- Download URL: jira_veya-0.0.1-py3-none-any.whl
- Upload date:
- Size: 14.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a0ad519683269d4f66e8224a452356285437cbef41e550f15daadd084c55a497
|
|
| MD5 |
8d8b9e8669a860b384281113f2526f39
|
|
| BLAKE2b-256 |
275fa43597bb6833e0c545cb7f0ace9cd3538740373eae87b24e17ffe81147fa
|