This project provides a FastAPI server that interfaces with the Jira API to help generate a release list.
Ensure you have Python 3.7 or above installed. You can check your Python version using:
python --version
Before you run the API, it's recommended to set up a virtual environment. This helps to manage dependencies and ensure that there aren't any conflicts with other Python projects.
- Install
virtualenv
if it's not installed:
pip install virtualenv
- Navigate to your project directory and set up the virtual environment:
virtualenv venv
- Activate the virtual environment:
- Linux/macOS:
source venv/bin/activate
- Windows:
source ./venv/Scripts/activate
You'll know you're in the virtual environment when you see (venv)
before your command prompt.
With the virtual environment active, install the required dependencies:
pip install -r requirements.txt
This project utilizes environment variables to securely manage sensitive configuration, like Jira API credentials. These environment variables are stored in an .env
file.
- Locate the
.env
file:
In the root directory of the project, you should find an .env
file. If it doesn't exist, create one.
- Update the
.env
file:
Create a .env
file in your preferred text editor and set your configuration variables:
JIRA_URL=YOUR_JIRA_URL
JIRA_USERNAME=YOUR_USERNAME_HERE
JIRA_API_TOKEN=YOUR_API_TOKEN_HERE
Replace YOUR_JIRA_URL
with your Jira domain's base url, YOUR_USERNAME_HERE
with your Jira username, and YOUR_API_TOKEN_HERE
with your Jira API token.
Generate API token here https://id.atlassian.com/manage-profile/security/api-tokens
- Save and Close:
After updating the values, save the .env
file and close your text editor.
Important: Always keep your .env
file private. Never expose sensitive credentials in your version control or other public places.
Once you've installed the dependencies, run the FastAPI server:
python index.py
Visit http://127.0.0.1:8305
or http://127.0.0.1:8305/docs
in your browser to access the documentation.
After you're done, deactivate the virtual environment:
deactivate