/fastapi-template

Template for FastAPI applications. Typed with mypy, tested with pytest and logged with loguru.

Primary LanguagePythonMIT LicenseMIT

FastAPI Project Template with Loguru

Code style: black Formatted with: isort Checked with mypy Tested with pytest

About 📘

This repository serves as a template for a minimal FastAPI project with enhanced logging using Loguru. It's managed with Poetry for efficient dependency resolution, ensuring a robust and maintainable codebase.

Features 🌟

  • FastAPI Framework: Utilizes the latest FastAPI framework for high performance and ease of development.
  • Loguru Integration: Includes pre-configured Loguru for superior logging capabilities.
  • Poetry for Dependency Management: Employs Poetry to simplify package management and dependency resolution.
  • Black Code Style: Adheres to the Black code style for consistent and clean Python code.
  • isort for Import Sorting: Ensures imports are neatly organized and consistent using isort.
  • mypy for Static Type Checking: Incorporates mypy to catch errors and ensure type safety in your codebase.
  • pytest for Testing: Leverages pytest for comprehensive and efficient testing of your application.

Usage 🛠️

To use this template, simply press the button on GitHub to create a new repository based on this template. Next, rename the project and docker image in following files

Installation 💻

poetry install

Running 🏃‍♂️

poetry shell
poetry run app

Troubleshooting 🔍

For any issues or troubleshooting queries, please refer to the Issues section of this GitHub repository.

Contribution 👥

Contributions are welcome. Please fork the repository, make your changes, and submit a pull request.

License 📜

This project is open-sourced under the MIT License.