fastapiutils/fastapi-utils
소개
FastAPI에서 재사용할 수 있는 유틸리티
웹 및 앱 개발What you can do
- Resource Class: Create CRUD with ease the OOP way with Resource base class that lets you implement methods quick.
- Class Based Views: Stop repeating the same dependencies over and over in the signature of related endpoints.
- Repeated Tasks: Easily trigger periodic tasks on server startup
- Timing Middleware: Log basic timing information for every request
측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- -1
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalQuicker FastApi developing tools
Documentation: https://fastapiutils.github.io/fastapi-utils/
Source Code: https://github.com/dmontagu/fastapi-utils
FastAPI is a modern, fast web framework for building APIs with Python 3.8+.
But if you're here, you probably already knew that!
Features
This package includes a number of utilities to help reduce boilerplate and reuse common functionality across projects:
- Resource Class: Create CRUD with ease the OOP way with
Resourcebase class that lets you implement methods quick. - Class Based Views: Stop repeating the same dependencies over and over in the signature of related endpoints.
- Repeated Tasks: Easily trigger periodic tasks on server startup
- Timing Middleware: Log basic timing information for every request
- OpenAPI Spec Simplification: Simplify your OpenAPI Operation IDs for cleaner output from OpenAPI Generator
- SQLAlchemy Sessions: The
FastAPISessionMakerclass provides an easily-customized SQLAlchemy Session dependency
It also adds a variety of more basic utilities that are useful across a wide variety of projects:
- APIModel: A reusable
pydantic.BaseModel-derived base class with useful defaults - APISettings: A subclass of
pydantic.BaseSettingsthat makes it easy to configure FastAPI through environment variables - String-Valued Enums: The
StrEnumandCamelStrEnumclasses make string-valued enums easier to maintain - CamelCase Conversions: Convenience functions for converting strings from
snake_casetocamelCaseorPascalCaseand back - GUID Type: The provided GUID type makes it easy to use UUIDs as the primary keys for your database tables
See the docs for more details and examples.
Requirements
This package is intended for use with any recent version of FastAPI (depending on pydantic>=1.0), and Python 3.8+.
Installation
pip install fastapi-utils # For basic slim package :)
pip install fastapi-utils[session] # To add sqlalchemy session maker
pip install fastapi-utils[all] # For all the packages
License
This project is licensed under the terms of the MIT license.
관련 프로젝트 살펴보기
불러오는 중…