Launching today

fastapi-viewsets
DRF-style ViewSets for FastAPI — CRUD in minutes
12 followers
DRF-style ViewSets for FastAPI — CRUD in minutes
12 followers
Django REST Framework-style ViewSets for FastAPI. Register LIST, GET, POST, PUT, PATCH, DELETE from one class. Works with SQLAlchemy (sync/async), Tortoise ORM, and Peewee. Pydantic v2, OpenAPI schemas, pagination, optional OAuth2, and declarative eager loading (select_related / prefetch_related) to kill N+1 — without touching the viewset.

this is honestly super useful, i basically wrote something like this by hand a few months ago so wish i had it then. one thing that would be a game changer for me though, would be built in support for soft delete patterns, like a flag in the viewset to automatically filter out is_deleted rows and add a restore endpoint. would save a bunch of boilerplate on every project
@mihriban1537007 Thanks so much, 🙏 Really glad the DRF ergonomics + async combo resonates.
Soft delete with automatic LIST/GET filtering is a great call — exactly the kind of boilerplate we want to kill. Taking this into the next release backlog and will prototype a built-in hook so you don’t have to override every action.
Will update here (and in the repo) once there’s something to try. Appreciate the thoughtful feedback!
honestly the declarative eager loading is kind of the killer feature for me, basically set the joins on the model and it just handles the rest without me wiring anything custom in the viewset. solid drop
love that you brought DRF's ViewSet ergonomics to FastAPI without losing the async story. one thing that would seal it for me: a built-in hook for soft delete logic that also filters LIST/GET queries automatically, so marking a row as deleted just works across endpoints without me overriding every action.
DRF ViewSets in FastAPI has been a pain point for a while, glad someone packaged this. One thing that would really help adoption: add first-class support for nested routes (like /posts/{id}/comments) that auto-generate the parent lookup and inject the related object into the handler context.