This repository contains a web API built using FastAPI, a modern, fast (high-performance) web framework for building APIs with Python 3.7+ based on standard Python type hints.
- High performance: FastAPI is one of the fastest Python frameworks available.
- Interactive API documentation: Automatic generation of interactive API documentation using Swagger UI and ReDoc.
- Dependency Injection: Easily manage dependencies.
- Data validation: Utilizes Pydantic for robust data validation.
- Python 3.7+
- FastAPI
- Uvicorn (ASGI server for running FastAPI)
-
Clone the repository:
git clone https://github.com/Ideas2IT/fastapi-foundation.git cd fastapi-foundation
-
Create and activate a virtual environment:
python3 -m venv env source env/bin/activate # On Windows use `env\Scripts\activate`
-
Install the dependencies:
pip install -r requirements.txt
-
Start the Uvicorn server:
uvicorn main:app --reload
-
Open your browser and navigate to
http://127.0.0.1:8000
to see the API documentation.
fastapi-foundation/
├── app/
│ ├── __init__.py
│ ├── main.py # Main entry point for the application
│ ├── models/ # Pydantic models
│ ├── routes/ # API routes
├── .gitignore
├── requirements.txt # Python dependencies
└── README.md
This README should provide a clear and structured overview of your FastAPI project, guiding users through installation, running the application, and contributing.