$npx skillfedfor your agent

fastapi-utilities

Reusable utilities for FastAPI

With conditionsPyPI Python ModulesReleased Mar 2025140.4K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — fastapi_utilities-0.3.1-py3-none-any.whl
v0.3.1 · released 2025-03-25 · Python <4.0,>=3.7 · 5 runtime deps: click-spinner, croniter, fastapi, pydantic, sqlalchemy

Yes, with conditions. The package offers genuine utility for FastAPI developers seeking to reduce boilerplate—particularly task scheduling and caching—and carries no security vulnerabilities. However, the aging maintenance status (507 days since last release) and Alpha classification mean you should verify that features work with your FastAPI version and be prepared to adapt or fork if compatibility issues arise. Best suited for projects where you can tolerate limited upstream support or are willing to maintain patches yourself.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.7+; latest FastAPI versions require using asynccontextmanager lifespan pattern instead of deprecated on_event decorator.
  • Low friction installation with a pure-Python wheel.
  • Maintenance status is aging—last release was 507 days ago—so expect limited active development and potential compatibility gaps with newer FastAPI versions, though the description notes workarounds for recent FastAPI lifespan changes.

License · maintenance · safety

MIT (permissive) — MIT license is permissive, allowing use in commercial and private projects with minimal restrictions; attribution is required but no copyleft obligations apply.

last release 2025-03-25 (507 days)

0 known vulnerabilities (OSV.dev, 2026-08-14) · 140,447 downloads/mo, #11,272 on PyPI

Verify before relying

pip install fastapi-utilities

from fastapi import FastAPI
from contextlib import asynccontextmanager
from fastapi_utilities import repeat_every

@asynccontextmanager
async def lifespan(app: FastAPI):
    yield

app = FastAPI(lifespan=lifespan)

@repeat_every(seconds=2)
async def scheduled_task():
    print("task")
  • Whether repeat_every and repeat_at work reliably with current FastAPI versions beyond the documented workaround.
  • Performance characteristics of ttl_lru_cache under high concurrency or with large datasets.
  • Whether the CLI tool generates projects compatible with modern FastAPI and dependency versions.
Same gist for agents: .md · .json

What it is and what it does

fastapi-utilities is a collection of helper functions and decorators for FastAPI applications. It reduces boilerplate by providing task scheduling (via repeat_every and repeat_at decorators), a TTL-aware LRU cache decorator, middleware for logging request timing, and a session manager that wraps SQLAlchemy. The package also includes a CLI tool to scaffold new FastAPI projects.

The package depends on click-spinner, croniter, fastapi, pydantic, and sqlalchemy. It is classified as Alpha and has not been actively maintained for over a year, so some features may not align with the latest FastAPI API changes—the description includes guidance on adapting to newer lifespan patterns. It is suitable for developers seeking quick utilities to avoid writing common patterns, but should be evaluated against current FastAPI best practices before adoption in production.

Use it for

  • Schedule periodic background tasks (e.g., cleanup, health checks) using @repeat_every or @repeat_at cron decorators within FastAPI startup.
  • Add automatic request timing and performance logging to all endpoints via add_timer_middleware.
  • Cache expensive function results with automatic expiration using @ttl_lru_cache with configurable TTL and size limits.
  • Manage database sessions across requests using FastAPISessionMaker context manager instead of manual get_db patterns.
  • Generate a FastAPI project skeleton quickly using the CLI tool to avoid manual boilerplate setup.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, with conditions.

The package offers genuine utility for FastAPI developers seeking to reduce boilerplate—particularly task scheduling and caching—and carries no security vulnerabilities. However, the aging maintenance status (507 days since last release) and Alpha classification mean you should verify that features work with your FastAPI version and be prepared to adapt or fork if compatibility issues arise. Best suited for projects where you can tolerate limited upstream support or are willing to maintain patches yourself.

Install

fastapi-utilities on PyPI

Before you install

Low friction installation with a pure-Python wheel. Maintenance status is aging—last release was 507 days ago—so expect limited active development and potential compatibility gaps with newer FastAPI versions, though the description notes workarounds for recent FastAPI lifespan changes.

Requires Python 3.7+; latest FastAPI versions require using asynccontextmanager lifespan pattern instead of deprecated on_event decorator.

License in practice

MIT license is permissive, allowing use in commercial and private projects with minimal restrictions; attribution is required but no copyleft obligations apply.

Quickstart

pip install fastapi-utilities

from fastapi import FastAPI
from contextlib import asynccontextmanager
from fastapi_utilities import repeat_every

@asynccontextmanager
async def lifespan(app: FastAPI):
    yield

app = FastAPI(lifespan=lifespan)

@repeat_every(seconds=2)
async def scheduled_task():
    print("task")

Verify before relying

  • Whether repeat_every and repeat_at work reliably with current FastAPI versions beyond the documented workaround.
  • Performance characteristics of ttl_lru_cache under high concurrency or with large datasets.
  • Whether the CLI tool generates projects compatible with modern FastAPI and dependency versions.

Package facts

LicenseMIT permissive
Python supportSupports the current Python release <4.0,>=3.7
Install frictionLow. Pure-Python wheel
Runtime dependencies
5 packages
click-spinnercroniterfastapipydanticsqlalchemy
MaintenanceAging 507 days since the last release
First released
Downloads140,447 / month, #11,272 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 3 - AlphaFramework :: AsyncIOFramework :: FastAPIIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Internet :: WWW/HTTP :: HTTP ServersTopic :: Internet :: WWW/HTTP :: WSGI :: ApplicationTopic :: Internet :: WWW/HTTP :: WSGI :: ServerTopic :: Software Development :: Libraries :: Python ModulesTopic :: Utilities

Evidence: fastapi_utilities-0.3.1-py3-none-any.whl

Tags

Capabilities
fastapi scheduling decoratorsfastapi cron jobsfastapi middleware utilitiesfastapi session managementfastapi caching ttl lrufastapi boilerplate toolsfastapi repeated tasks
Topics
fastapi-addontask-schedulingcaching
PyPI keywords
fastapiutilitiesutilsfastapi-utilitiespythonlibraryframeworkwebapi

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “fastapi scheduling decorators”

Give your agent the search over MCP, or paste the wish link into any chat.

More Python Modules packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
PyYAML Worth it
PyPI · Python Modules · released Sep 2025

PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
annotated-types Worth it
PyPI · Python Modules · released Jul 2026

Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.

Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…

MITpure Python · 3.10+
871.3Mdownloads / mo
typing-inspection Worth it
PyPI · Python Modules · released Aug 2026

Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.

MITpure Python · 3.10+
783.0Mdownloads / mo

See also fastapi-utils · fastapi-restful · fastapi-cache2 · FastAPI-SQLAlchemy · asyncache · rq-scheduler · fastapi-lifespan-manager · essentials · fastapi-cli · nc-py-api