Welcome to the FastAPI Template project! This repository provides a simple yet powerful template for building APIs with Python using FastAPI. It's designed to be easy to set up and scale for your projects. 🌱
- FastAPI: The core framework for building fast APIs with Python.
- uv: A package manager to manage dependencies and create a virtual environment.
- Pydantic Validation: Validation of request data using Pydantic models.
- Swagger UI: Built-in interactive API documentation with Swagger UI.
- Python 3.12+ 🐍
- uv package manager 🔧
-
Clone the repository:
git clone https://github.com/literally-bug-creator/fastapi-template.git
cd fastapi-template
-
Install the dependencies using
uv
:If you haven't already installed
uv
, you can install it via pip:pip install uv
-
Create and sync the virtual environment:
uv sync
-
Activate the virtual environment:
source .venv/bin/activate
-
Run the application:
To start the API, run
main.py
:python main.py
The API will be available at
http://localhost:8000
.- For API documentation, go to:
http://localhost:8000/docs
📜 - For ReDoc documentation:
http://localhost:8000/redoc
📖
- For API documentation, go to:
We welcome contributions to improve this project! Please fork the repository, create a branch, and submit a pull request.
- Make sure to follow the existing code style for consistency.
This project is licensed under the MIT License - see the LICENSE file for details.