This project explores two popular Python web frameworks for building APIs: FastAPI and Flask. It includes sample code and documentation for each framework, allowing you to compare and contrast their features and capabilities.
config.py
: Configuration file for storing sensitive information (e.g., database URIs, API keys).fast-api.py
: Sample code and documentation for a FastAPI-based API.flask-api.py
: Sample code and documentation for a Flask-based API.
-
Clone the repository:
git clone https://github.com/PytechAcademy/Python_API_Frameworks.git
-
Install project dependencies:
pip install -r requirements.txt
-
Explore the FastAPI-based API:
right click on file name and run
Access the documentation at http://localhost:8000/docs.
-
Explore the Flask-based API:
right click on file name and run
Access the documentation at http://localhost:5000/.