Skip to main content

FastAPI Extension Suite


Project Overview

fastapi_extra is a feature-rich enhancement extension library for FastAPI (Python >= 3.12, BSD-3-Clause license) designed to provide an out-of-the-box, enterprise-grade framework on top of FastAPI. [Documentation]


Key Features

  • Performance Optimization — Uses monkey-patching on FastAPI's internal argument parsing and router matching logic with built-in caching; rewrites APIRoute.handle with a per-route handler cache to skip repeated handler construction on every request; includes Cython-native implementations for Snowflake ID generation and high-speed URL/Content-Type parsing.
  • Content-Type Aware Body Parsing — A rewritten request handler decodes request bodies by media type: JSON, plain text, and raw bytes out of the box, plus MessagePack (application/msgpack, requires msgpack) and XML (application/xml, requires xmltodict) for multi-format APIs; unrecognized application/* sub-types return 415 Unsupported Media Type.
  • Complete ORM Layer — Built on top of SQLModel (SQLAlchemy + Pydantic) with a SQLBase base class that incorporates Snowflake IDs, optimistic locking (versioning), soft deletes, and automatic timestamps.
  • Unified API Responses — Features an Alibaba Cloud-style ResultEnum (120+ pre-defined status codes) and generic APIResult[T] response models for standardized API outputs.
  • SQL Template Engine — Supports external .sql files with an @Mapped decorator for annotation-driven query execution (execute, fetch_all, fetch_one).
  • Dependency Injection Architecture — Provides AbstractComponent and AbstractService abstractions with singleton management and ContextVar context passing, seamlessly integrating with FastAPI's Depends.
  • Redis Cache Integration — Async connection pool management with ready-to-use Redis dependency injection.
  • Scheduled Tasks — Integrated async task runner built on APScheduler, supporting decorator-based job registration with full dependency injection support inside task functions.
  • TOML-Driven Configuration — Multi-layered settings loading (TOML > Env > Defaults > Secrets) powered by pydantic-settings.

Tech Stack

  • Python >= 3.12
  • FastAPI >= 0.141.0
  • SQLModel >= 0.0.39
  • Pydantic Settings >= 2.15.0
  • Cython (for performance-critical modules)

Target Use Case

Ideal for building high-performance RESTful API services in enterprise environments, offering a complete end-to-end toolkit covering database connection pooling, ORM operations, caching, scheduled jobs, and standardized API responses.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fastapi_extra-0.9.3.tar.gz (28.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fastapi_extra-0.9.3-cp312-cp312-win_amd64.whl (79.7 kB view details)

Uploaded CPython 3.12Windows x86-64

File details

Details for the file fastapi_extra-0.9.3.tar.gz.

File metadata

  • Download URL: fastapi_extra-0.9.3.tar.gz
  • Upload date:
  • Size: 28.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for fastapi_extra-0.9.3.tar.gz
Algorithm Hash digest
SHA256 728883f9f7a9ba4d102a03f69e56e34633100fb959713b27e944eaaddedc00db
MD5 4670e7139228fa3a611e96559ba5254d
BLAKE2b-256 8a33c1ed2a264a87f73434fc97a9f9a268058ccc1f60566dfa685e75e4139fdc

See more details on using hashes here.

File details

Details for the file fastapi_extra-0.9.3-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for fastapi_extra-0.9.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 b09d2064f77c161c11e27db0d9da115c0566844bf04480b6eb88c7ebc74039b7
MD5 5436297165b45e327bce69faf19ea8c2
BLAKE2b-256 6639514b0dcd325dc4338d9ca350a18f3b347ae65edea2d0a1651ab1a07b1a68

See more details on using hashes here.

Release history Release notifications | RSS feed

0.9.4

2 files

This release

0.9.3 This release

2 files

0.9.2

2 files

0.9.1

2 files

0.9.0

2 files

0.8.2

2 files

0.8.1

2 files

0.8.0

2 files

0.7.4

2 files

0.7.3

2 files

0.7.2

2 files

0.7.1

2 files

0.7.0

2 files

0.6.0

2 files

0.5.1

2 files

0.5.0

2 files

0.4.0

2 files

0.3.6

2 files

0.3.5

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.5

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.9

2 files

0.1.8

2 files

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 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