--- id: fastapi-utils version: "0.8.0" license: MIT license_treatment: permissive maintenance: aging --- # fastapi-utils — Reusable utilities for FastAPI License: permissive · Maintenance: aging · Downloads: 1.1M/mo ## What it is and what it does fastapi-utils is a collection of utilities and base classes designed to reduce boilerplate when building FastAPI applications. It provides class-based views to eliminate repeated dependency declarations across related endpoints, a Resource base class for implementing CRUD operations using OOP patterns, and common utilities like APIModel and APISettings that extend pydantic's BaseModel and BaseSettings with sensible FastAPI defaults. The package also includes middleware for request timing, OpenAPI spec simplification, SQLAlchemy session management, string-valued enums, and helper functions for case conversion and UUID handling. The package depends on fastapi, pydantic, and psutil, and is designed for Python 3.8 and later. It is installed as a pure Python wheel with no compiled dependencies. While the repository shows no recent releases (last commit 2025-03-03, last release 2024-11-11), it remains unarchived and has accumulated 2307 GitHub stars, suggesting it is in stable maintenance rather than active development. Use it for: - Build CRUD endpoints quickly using the Resource base class instead of writing individual route handlers for each operation. - Reduce repeated FastAPI dependency injection boilerplate by grouping related endpoints into class-based views. - Add request timing and performance logging to all endpoints automatically via the timing middleware. - Configure FastAPI applications through environment variables using APISettings instead of manual pydantic configuration. - Use string-valued enums (StrEnum, CamelStrEnum) to maintain cleaner enum definitions in API models. - Simplify OpenAPI operation IDs for cleaner code generation from OpenAPI specs. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides reusable utilities and base classes for FastAPI development, including class-based views, CRUD resources, timing middleware, and common model/settings patterns to reduce boilerplate. Yes, if you are building FastAPI applications and want to reduce boilerplate for common patterns like CRUD resources and class-based views. The package is stable, has no known vulnerabilities, and installs with low friction. However, be aware that maintenance is aging—the last release was in 2024-11-11 with no commits for 641 days—so evaluate whether its utilities align with your project's needs before adopting it as a core dependency. ## Install pip install fastapi-utils uv add fastapi-utils poetry add fastapi-utils ## Installing fastapi-utils Before you install: Low friction installation with pure Python distribution. Maintenance status is aging—last commit was 2025-03-03 and no release in 641 days—but the repository remains active and unarchivedwith 2307 stars, suggesting the package is stable rather than abandoned. License in practice: MIT license is permissive; you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions. Quickstart: pip install fastapi-utils from fastapi_utils.cbv import cbv from fastapi import FastAPI app = FastAPI() @cbv(app) class MyEndpoint: def get(self): return {"message": "hello"} Requires Python 3.8 or later and FastAPI with pydantic>=1.0; optional SQLAlchemy dependency for session maker features. Verify before relying: - Whether the 641-day gap since last release indicates the package is in stable maintenance or has stalled development. - Compatibility with the latest FastAPI and pydantic versions beyond what the classifiers declare. - Performance impact of the timing middleware on high-throughput applications. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: aging - Downloads: 1.1M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags fastapi boilerplate utilities, fastapi class-based views, fastapi crud resource, fastapi middleware timing, fastapi pydantic base models, fastapi session management, fastapi development tools, fastapi-ecosystem, crud-patterns, boilerplate-reduction [View on SkillFed](https://skillfed.io/packages/fastapi-utils) · [View on PyPI](https://pypi.org/project/fastapi-utils/)