Skip to content

cham11ng/fastapi-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fastapi-starter

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.

Features

  • 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.

Getting Started

To get started with the fastapi-starter project, follow these steps:

  1. Clone the repository: git clone https://github.com/your-username/fastapi-starter.git
  2. Install the dependencies: pip install -r requirements.txt
  3. Configure the MongoDB connection in the config.py file.
  4. Run the application: python main.py
  5. Access the API documentation at http://localhost:8000/docs.

For more detailed instructions and examples, please refer to the project's documentation.

Happy coding!