Welcome to the project setup guide! Follow these instructions to get your project up and running.
- Python: Ensure you have Python 3.11 installed on your system. If you don't, you can download it from the official Python website.
A virtual environment is crucial for managing the dependencies of the project separately from your global Python installation.
- Windows:
python -m venv venv
- macOS/Linux:
python3 -m venv venv
Activating the virtual environment will ensure that all Python and pip commands apply only to this specific environment.
- Windows:
source venv\Scripts\activate
- macOS/Linux:
source venv/bin/activate
Install all required packages for the project as specified in the requirements.txt
file.
pip install -r requirements.txt
Create a .env
file in the root directory of the project. Add the following variables:
USERNAME={your_username}
PASSWORD={your_password}
Replace your_username
and your_password
with appropriate values.
Run the server using the following command:
uvicorn main:app --reload
This command will start the FastAPI application with live reloading enabled.
After starting the server, you can access the application by navigating to http://127.0.0.1:8000/docs
in your web browser.
- Always ensure that the virtual environment is activated when working on the project.
- Keep the
.env
file secure and avoid committing it to public version control repositories. - If you make changes to the
.env
file, you will need to restart the server to apply these changes.