ljmerza / jira-release

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FastAPI Jira Project

This project provides a FastAPI server that interfaces with the Jira API to help generate a release list.

Prerequisites

Ensure you have Python 3.7 or above installed. You can check your Python version using:

python --version

Setting Up a Virtual Environment

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.

  1. Install virtualenv if it's not installed:
pip install virtualenv
  1. Navigate to your project directory and set up the virtual environment:
virtualenv venv
  1. 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.

Installing Dependencies

With the virtual environment active, install the required dependencies:

pip install -r requirements.txt

Configuring Environment Variables

This project utilizes environment variables to securely manage sensitive configuration, like Jira API credentials. These environment variables are stored in an .env file.

  1. Locate the .env file:

In the root directory of the project, you should find an .env file. If it doesn't exist, create one.

  1. 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

  1. 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.

Running the FastAPI Server

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.

Deactivating the Virtual Environment

After you're done, deactivate the virtual environment:

deactivate

About


Languages

Language:HTML 41.8%Language:Svelte 22.2%Language:Python 18.5%Language:CSS 9.8%Language:JavaScript 4.8%Language:TypeScript 2.9%