The fastapi-starter project is a Python-based starter template for building web applications using the FastAPI framework and MongoDB as the database. It provides a solid foundation for developing scalable and high-performance APIs.
- FastAPI: FastAPI is a modern, fast (high-performance) web framework for building APIs with Python 3.7+ based on standard Python type hints.
- MongoDB: MongoDB is a popular NoSQL database that provides high scalability, flexibility, and performance for storing and retrieving data.
- Authentication and Authorization: The starter template includes built-in support for user authentication and authorization using JWT (JSON Web Tokens).
- API Documentation: FastAPI's automatic interactive API documentation is integrated into the starter template, making it easy to explore and test the API endpoints.
- Validation and Serialization: FastAPI leverages Python type hints to automatically validate request data and serialize response data, reducing boilerplate code.
- Dependency Injection: FastAPI supports dependency injection, allowing you to easily manage and inject dependencies into your application components.
- Testing: The starter template includes a testing framework and sample test cases to help you write robust and reliable tests for your API endpoints.
- Docker Support: The project is Docker-ready, making it easy to containerize and deploy your application.
To get started with the fastapi-starter project, follow these steps:
- Clone the repository:
git clone https://github.com/your-username/fastapi-starter.git
- Install the dependencies:
pip install -r requirements.txt
- Configure the MongoDB connection in the
config.py
file. - Run the application:
python main.py
- Access the API documentation at
http://localhost:8000/docs
.
@cham11ng