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.4.tar.gz (28.2 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.4-cp314-cp314-win_amd64.whl (80.7 kB view details)

Uploaded CPython 3.14Windows x86-64

File details

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

File metadata

  • Download URL: fastapi_extra-0.9.4.tar.gz
  • Upload date:
  • Size: 28.2 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.4.tar.gz
Algorithm Hash digest
SHA256 c2fc1cd0ee5be6216169cb5748cf4733dd57fc149045db339c03fc22313e5d2c
MD5 b2a1da24b0d2858f9ea32070ea88e23e
BLAKE2b-256 6a82a94b790d8ceaf2632d80f8a8cb309d8bb0f8d9179a0b4b7500f6de04c5f9

See more details on using hashes here.

File details

Details for the file fastapi_extra-0.9.4-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for fastapi_extra-0.9.4-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 3776496b96b6ba5e399a419bb287ad23f2c11ff55cc7b2f992eda1b980af1de5
MD5 4cf6e98dbf86569a68e2a43ce395d7a3
BLAKE2b-256 81ff481776b89b92a0854946c74bd8f963724a02f166b2c9647055e9f48ee968

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.9.4 This release

2 files

0.9.3

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