Giter Site home page Giter Site logo

northpowered / fastapi-boilerplate Goto Github PK

View Code? Open in Web Editor NEW
17.0 1.0 3.0 790 KB

Custom FastAPI boilerplate with Piccolo ORM, JWT auth, config file and Hashicorp Vault support

Home Page: https://northpowered.github.io/fastapi-boilerplate/

License: MIT License

Python 100.00%
fastapi piccolo python3 fastapi-template hashicorp-vault jwt-authentication

fastapi-boilerplate's Introduction

CodeFactor Quality Gate Status CI codecov

FastAPI boilerplate

Version: 1.1.2

Work in progress, please read issues

Full documentation is available on Github pages

Another FastAPI Boilerplate with:

  • FastAPI as a base ASGI app
  • Piccolo ORM for a database operations
  • Piccolo Admin GUI for a convenient database management
  • Hashicorp Vault integration for DB credentials (with auto-rotating), JWT secrets and other
  • Custom Accounting CRUD application for managing
    • Users
    • Roles
    • Groups
    • Permissions
    • Security policies
  • JWT autehntication
  • API versioning
  • PyDantic-based flexible configfile parcer (toml and yaml formats supports)
  • Typer-based CLI management
  • Prometheus endpoint based on Starlette exporter
  • OpenTelemetry collector
  • Request ID propagation for logger, Request and Response (injection to Headers)
  • CI pipeline for linting and testing (with coverage)

Usage

Base usage

Usage: main.py [OPTIONS] COMMAND [ARGS]...

Options:
  --help                          Show this message and exit.

Commands:
  aaa  Operations with users and other AAA objects
  db   Operations with DB
  run  Run application in uvicorn server with defined config file

All CLI commands with descriptions are placed here

Installation

We`re strongly reccomend to use Poetry

Create new virtual environment or enter to an existing one

poetry shell

Install all dependencies from pyproject.toml

poetry install

Run your app

python3 main.py run

fastapi-boilerplate's People

Contributors

dependabot[bot] avatar northpowered avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

fastapi-boilerplate's Issues

Cache integration

Unified API inside of FastAPI app for caching

Priority on Redis

Special API for db models:
request -> object API8 -> pull from cache -> if not, pull from db and push to cache

OpenTelemetry integration

ToDO:

  1. Native FastAPI profiling for endpoints
  2. Context manager for child spans
  3. Integration with Piccolo profiling
  4. Fully-configurated from config.ini file

Priority on Jaeger

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.