--- id: fastcrud version: "0.22.3" license: MIT license_treatment: permissive maintenance: active --- # fastcrud — FastCRUD is a Python package for FastAPI, offering robust async CRUD operations and flexible endpoint creation utilities. License: permissive · Maintenance: active · Downloads: 133.7K/mo ## What it is and what it does FastCRUD is a FastAPI extension that wraps SQLAlchemy 2.0 to provide async CRUD operations with automatic REST endpoint generation. It eliminates boilerplate by offering a crud_router that creates standard create, read, update, and delete endpoints from your SQLAlchemy models and Pydantic schemas, or by letting you use FastCRUD directly in custom endpoints for finer control. The package handles common database patterns: dynamic filtering with operators like __gte and __ilike, automatic join condition detection for related models, offset and cursor-based pagination for different use cases, and soft deletes. It ships with a bundled Library Skill for AI coding agents that teaches when to use FastCRUD and when to drop to raw SQLAlchemy (for aggregates, CTEs, GROUP BY, or bulk writes). The main constraint is that it requires async SQLAlchemy setup and Python 3.10+. Use it for: - Rapidly scaffold REST APIs for FastAPI applications by auto-generating CRUD endpoints from SQLAlchemy models without writing boilerplate route handlers. - Build paginated list endpoints with cursor-based pagination for infinite-scroll interfaces or offset pagination for traditional pagination UI. - Query related data with automatic join detection and dynamic filtering, sorting, and field selection in a single method call. - Implement soft-delete patterns and custom filtering logic across multiple endpoints by defining it once in a FastCRUD instance. - Integrate with AI coding agents (Claude Code, Cursor, Copilot) via the bundled Library Skill to generate correct async CRUD code with N+1 avoidance. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. FastCRUD provides async CRUD operations and automatic endpoint generation for FastAPI applications, built on SQLAlchemy 2.0 with support for joins, dynamic filtering, sorting, and both offset and cursor-based pagination. Yes. FastCRUD is actively maintained, has low install friction, carries no security vulnerabilities, and uses a permissive MIT license. It is well-suited for FastAPI projects that need to reduce CRUD boilerplate and want built-in support for pagination and joins. The main gotcha is the requirement for async SQLAlchemy and Python 3.10+; if your project uses synchronous SQLAlchemy or older Python, it won't fit. The bundled AI agent skill adds value for teams using modern coding assistants. ## Install pip install fastcrud uv add fastcrud poetry add fastcrud ## Installing fastcrud Before you install: Low friction installation with a pure Python wheel. Actively maintained with recent releases; last commit on 2026-06-21. Depends on fastapi, pydantic, sqlalchemy, and sqlalchemy-utils—all standard FastAPI ecosystem packages with no exotic system dependencies. License in practice: MIT license (permissive) allows use in commercial and private projects with minimal restrictions. You must include a copy of the license and copyright notice. Quickstart: pip install fastcrud from fastcrud import crud_router from fastapi import FastAPI app = FastAPI() item_router = crud_router( session=get_session, model=Item, create_schema=ItemCreateSchema, update_schema=ItemUpdateSchema, path="/items", ) app.include_router(item_router) Requires Python 3.10 or newer; requires async SQLAlchemy setup with AsyncSession. Non-native SQLAlchemy column types (e.g., from sqlalchemy-utils) may raise NotImplementedError unless a python_type attribute is added. Verify before relying: - Whether the bundled Library Skill integration with AI coding agents (Claude Code, Cursor, Copilot) is actively maintained and compatible with current agent versions. - Performance characteristics and scalability limits for large datasets or complex join scenarios compared to raw SQLAlchemy. - Whether the three-tier pagination default and limit=None behavior are well-documented enough to avoid common mistakes in production. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 133.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags fastapi crud operations, async database operations fastapi, automatic rest endpoints fastapi, sqlalchemy fastapi integration, cursor pagination fastapi, dynamic query filtering, fastapi endpoint generation, fastapi-ecosystem, async-orm, rest-api-generator [View on SkillFed](https://skillfed.io/packages/fastcrud) · [View on PyPI](https://pypi.org/project/fastcrud/)