Downloads a Jira project to a SQLite database file using modern Python tools.
This project uses uv for dependency management and virtual environments.
- Python 3.9+
- uv package manager
- Clone the repository:
git clone <repository-url>
cd jira-to-sqlite- Create virtual environment and install dependencies:
uv venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
uv pip install -r requirements.txtAlternatively, use uv sync for a complete setup:
uv syncSet the following environment variables:
export JIRA_SERVER_URL="https://your-company.atlassian.net"
export JIRA_USERNAME="your-email@company.com" # Not used with token auth, but kept for reference
export JIRA_API_TOKEN="your-api-token"
export JIRA_PROJECT_KEY="PROJ"- Go to Atlassian Account Settings
- Click "Create API token"
- Give it a label and copy the generated token
- The script uses bearer token authentication (not basic auth) for better security
Run the script to fetch all issues:
python main.pyThe script supports several command-line options:
python main.py --helpAvailable options:
--limit N: Fetch only the N most recent issues (useful for testing)--project PROJ: Specify project key (overrides JIRA_PROJECT_KEY env var)--db-path PATH: Specify database file path (default: jira_issues.db)
Fetch only the 10 most recent issues for testing:
python main.py --limit 10Fetch all issues from a specific project:
python main.py --project MYPROJFetch 5 recent issues and save to custom database:
python main.py --limit 5 --db-path my_issues.dbOr if installed as a package:
uv run jira-to-sqlite --limit 10The script will:
- Connect to your Jira instance
- Fetch issues from the specified project (ordered by creation date, newest first)
- Store them in a SQLite database
The SQLite database contains a jira_issues table with the following fields:
key: Jira issue identifier (e.g., PROJ-123)title: Issue title/summarydescription: Issue description textstatus: Current issue statusassignee: Person assigned to the issuecreator: Person who created the issuecreation_time: When the issue was createdfix_version: Target fix version for the issue
Install development dependencies:
uv sync --group devRun tests:
uv run pytestFormat code:
uv run black .Type checking:
uv run mypy main.py