An API using Python and FastAPI
-
Clone the repository: Use the following command to clone the repository from GitHub:
git clone <repository_url> -
Virtual Environment: Create a virtual environment in the cloned directory:
-
On Windows:
python -m venv venv .\venv\Scripts\activate -
On macOS and Linux:
python3 -m venv venv source venv/bin/activate
-
Install Dependencies: Install dependencies from the
requirements.txtfile using the command:pip install -r requirements.txt -
Configure Environment Variables: Copy the
.env.examplefile to create.envand configure appropriate values for environment variables, such as database connection information. -
Project Execution: Use the command to run the project (example with FastAPI and Uvicorn):
uvicorn app:app --host $HOST --port $PORT -
Access the Application: Access the URL specified in Uvicorn (by default, http://localhost:8000) to interact with the application.
Note: Make sure you have Python and Git configured on your system before starting the installation process.