For first time setup of the project, follow the steps below:
- python 3.12+
- pip (please upgrade to the latest version)
python -m pip install --upgrade pip
-
Clone the repo
-
Create a virtual environment
python -m venv venv
-
Activate the virtual environment
source venv/bin/activate -
Install the libraries
pip install -r requirements.txt
For any libraries updates, please run the following command
pip freeze > requirements.txt -
Create a
.envfile in the root directory and add the environment variables (please ask for the variables from the team)
You're all set! 🚀 To start the development server, follow the next section.
-
Activate the virtual environment
source venv/bin/activate -
Run the server
uvicorn app.main:app --port 8001 --reload
or run with the main file (no real-time reload)
python -m app.main
-
To access the API documentation, visit
- 📜 Swagger UI (interactive) → http://127.0.0.1:8001/docs
- API KEY is needed in order to call any endpoints
- This server's API KEY allows access to every endpoint
- 🔥 ReDoc UI (read-only) → http://127.0.0.1:8001/redoc
- 📜 Swagger UI (interactive) → http://127.0.0.1:8001/docs
-
To terminate the server, press
Ctrl + Cin the terminal -
To deactivate the virtual environment, run
deactivate
- please format the all codes in app folder by running command below before committing
black app/ isort app/ flake8 app/
- colorlog → https://pypi.org/project/colorlog/