fastapi-core-repository

Define an async repository interface with CRUD, pagination, filtering, and soft delete for FastAPI.

3|Updated Jan 20, 2026
One-click install
npx skills add https://github.com/agusmdev/burntop --skill fastapi-core-repository
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fastapi-core-repository
Source: https://github.com/agusmdev/burntop/tree/main/.claude/skills/fastapi-core-repository
Command: npx skills add https://github.com/agusmdev/burntop --skill fastapi-core-repository

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill defines a reusable, async repository interface for FastAPI projects to ensure consistent data access patterns across models.

Core Features & Use Cases

  • Abstract repository with CRUD, pagination, filtering, and bulk operations
  • Soft delete support with methods for restore and include/exclude deleted items
  • Type-safe generics that enforce model, create, and update schemas for all repositories

Quick Start

Subclass the AbstractRepository for your SQLAlchemy model and implement the required methods to provide a concrete data access layer for your FastAPI app.

Frequently Asked Questions about fastapi-core-repository

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I standardize async CRUD operations across multiple SQLAlchemy models in FastAPI?

You can standardize async CRUD operations in FastAPI by defining a reusable abstract repository with type-safe generics, enforcing consistent create, read, update, and delete methods across all SQLAlchemy models.

What is the best way to implement soft delete and record restoration in a FastAPI application?

Implementing soft delete in FastAPI is best handled by an abstract repository interface that provides dedicated methods to restore records and optionally include or exclude deleted items during queries.

How do I add pagination and bulk operations to a FastAPI repository pattern?

To add pagination and bulk operations to a FastAPI repository pattern, you subclass an abstract repository interface that already includes built-in methods for paginated queries and bulk data manipulation.

Can I use this async repository interface without a pre-existing concrete repository implementation?

No, you cannot use the async repository interface directly without a concrete implementation; you must subclass the abstract repository and implement the required methods for your specific SQLAlchemy model.

Does this FastAPI abstract repository enforce type safety for create and update schemas?

Yes, the FastAPI abstract repository enforces type-safe generics, requiring explicit model, create, and update schemas for all repositories to ensure strict data validation across your application.

When do I need an abstract repository for my FastAPI data access layer?

You need an abstract repository for your FastAPI data access layer when your application requires standardized CRUD, pagination, filtering, and soft delete operations with a clear separation between interface and concrete implementations.