<< Project Overview >>
- Swagger Documentation: Explore the API using the Swagger UI.
- Feature 1: Feature 1 description.
- Feature 2: Feature 2 description.
- Python 3.10 or higher
- Poetry for dependency management
-
Clone the Repository:
git clone <<repo-url>> cd api-python-flask-template
-
Install Poetry:
Poetry is a tool for dependency management and packaging in Python. To install Poetry, follow the instructions on the official website.
-
Install Dependencies with Poetry:
Run the following command to install project dependencies:
poetry install
-
Environment Variables:
-
Create a
.env
file based on the.env.example
.cp .env.example .env
-
Fill in the necessary details like
ENV
,HOST
, andPORT
.
-
-
Activate the Virtual Environment:
Poetry creates a virtual environment for your project. Activate it with:
poetry shell
-
Start the API Service:
python run.py
-
Access the API:
- The API will be available at
http://localhost:[Project_APP_PORT]
. - Explore the API using the Swagger UI at
http://localhost:[Project_APP_PORT]/
.
- The API will be available at
-
Making a Call:
- Use the
/api/<<resource>>
endpoint to initiate an API Call.
- Use the
Swagger-based documentation is available at http://localhost:[Project_APP_PORT]/
. This provides detailed information about all the API endpoints, their expected parameters, and response formats.