Skip to main content

Quicker FastApi developing tools

Build CI Coverage
Package version Python versions License


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 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
  • OpenAPI Spec Simplification: Simplify your OpenAPI Operation IDs for cleaner output from OpenAPI Generator
  • SQLAlchemy Sessions: The FastAPISessionMaker class 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.BaseSettings that makes it easy to configure FastAPI through environment variables
  • String-Valued Enums: The StrEnum and CamelStrEnum classes make string-valued enums easier to maintain
  • CamelCase Conversions: Convenience functions for converting strings from snake_case to camelCase or PascalCase and 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.

Release files for fastapi-utils 0.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fastapi-utils 0.8.0
File Size Uploaded
fastapi_utils-0.8.0.tar.gz 16.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fastapi-utils 0.8.0
File Interpreter ABI Platform
fastapi_utils-0.8.0-py3-none-any.whl Python 3 none any Details

Total release size: 35.0 kB

Release files / fastapi_utils-0.8.0.tar.gz

Download URL fastapi_utils-0.8.0.tar.gz
Size 16.5 kB
Tags Source
SHA-256 checksum
How to use checksums
eca834e80c09f85df30004fe5e861981262b296f60c93d5a1a1416fe4c784140
BLAKE2b-256 checksum
How to use checksums
ddaf57c949675176acf389d94fbccd369b486579a952637fc6fb104f1bc3d0c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.4 CPython/3.10.12 Linux/5.15.153.1-microsoft-standard-WSL2

Release files / fastapi_utils-0.8.0-py3-none-any.whl

Download URL fastapi_utils-0.8.0-py3-none-any.whl
Size 18.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6c4d507a76bab9a016cee0c4fa3a4638c636b2b2689e39c62254b1b2e4e81825
BLAKE2b-256 checksum
How to use checksums
438bcef8cfed7ed77d52fc772b1c7b966ba019a3f50b65a2b3625a0f3b7f6f53
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.4 CPython/3.10.12 Linux/5.15.153.1-microsoft-standard-WSL2

Release history Release notifications | RSS feed

This release

0.8.0 This release

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page