Collection of Python scripts for interacting with Jira tickets.
Project description
jps-jira-utils
A clean, modular, production-grade toolkit for Jira power users
Built with Typer, rich logging, and full test coverage.
Features
add_comment.py— Add rich comments (with optional file attachments) to any Jira issue- Interactive multiline input (ends on two blank lines)
- Load comment from file (
--comment-file) - Attach files with pre-canned or custom notes (STDOUT, STDERR, log file, README, etc.)
- Final confirmation table before posting
- Full logging with structured output
- Secure credential loading via
~/.jira.env(never in code or CLI) - Clean, maintainable, fully tested codebase using modern Python best practices
- Zero external runtime dependencies beyond
requests,typer, andpython-dotenv
Installation
From source (recommended for development)
git clone https://github.com/jai-python3/jps-jira-utils.git
cd jps-jira-utils
make install # creates .venv and installs in editable mode
From PyPI (coming soon)
pip install jps-jira-utils
Prerequisites
Create a ~/.jira.env file with your Jira Cloud credentials:
JIRA_BASE_URL=https://your-company.atlassian.net
JIRA_EMAIL=your.email@company.com
JIRA_API_TOKEN=your_api_token_here
Generate your API token at: https://id.atlassian.com/manage-profile/security/api-tokens
Usage
Add a comment interactively
jps-add-comment JPS-1234
Add a comment from a file + attach a log
jps-add-comment JPS-1234 \
--comment-file results.txt \
--attach-file test-run.log
Full help
jps-add-comment --help
Development
# Format, lint, and fix everything
make fix
make format
make lint
Run tests with coverage
make test
Run pre-commit hooks (recommended)
pre-commit run --all-files
Project Structure
src/jps_jira_utils/
├── add_comment.py # Typer CLI entrypoint
├── jira_helper.py # Credential loading
├── logging_helper.py # Structured logging setup
└── prompt_helper.py # Interactive input utilities
tests/ # Includes coverage, darglint-compliant
Contributing
Contributions are welcome! Please:
Use pre-commit hooks Write tests for new features Follow Google-style docstrings Keep the codebase clean and modular
License
MIT License © Jaideep Sundaram
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
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
File details
Details for the file jps_jira_utils-0.7.0.tar.gz.
File metadata
- Download URL: jps_jira_utils-0.7.0.tar.gz
- Upload date:
- Size: 17.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0fb282764e0651473e288d02686095d4cb593284039e46dddb6ba339baf08e0
|
|
| MD5 |
c665bbf8342f8c5c623bfc17c79c506f
|
|
| BLAKE2b-256 |
1254ea66a39ab051197dd6acfd9a9b8df5d14000d9eeda2a334f8b5cada31012
|
File details
Details for the file jps_jira_utils-0.7.0-py3-none-any.whl.
File metadata
- Download URL: jps_jira_utils-0.7.0-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f81ef368f787f0162eccefc40a924cd1fa45a51d76346ec2cbf79aff333d28c
|
|
| MD5 |
4988ce6145e51cd198649a96733d1611
|
|
| BLAKE2b-256 |
5f2a7d69f05789a623fae44faa7b70ecaaa18720129442c07d5258c8032d45c9
|