Python mixins for FastAPI
Compose CRUD and bulk endpoints from small, focused mixin classes — just like Django REST Framework, but for FastAPI.
Django REST Framework–style viewsets for FastAPI, Celery and Vue/TypeScript
Compose CRUD and bulk endpoints from small, focused mixin classes — just like Django REST Framework, but for FastAPI.
Register a viewset on a FastAPI router with a single decorator call. Handles type resolution, lifecycle management and OpenAPI schema automatically.
CollectionViewSet is a zero-boilerplate viewset backed by any Python list, set or dict. DjangoORMViewSet backs one with a QuerySet, absorbing filtering, ordering and slicing into SQL.
Reach the same viewsets over a single WebSocket instead of one HTTP request per call. A command goes through your application as an HTTP request does - its middleware, exception handlers, router dependencies and state - so both transports behave identically.
Publish an event to a topic and every frontend following it learns of it, as a muxws push or on its next poll. Every event is written to the store before it is pushed, so a dropped push or a lost socket delays an event and does not lose it. ChangeEvents publishes every create, update and destroy of a viewset, globally or per viewset, with no change to the viewset, and watch() on the frontend ViewSet follows them.
A bare array, offset paging that carries a total wherever the source can be counted — a materialised collection, or a backend that counts in its store — and null where it cannot, or cursor paging whose next and previous links never re-read a row and never drift. A viewset declares which, and may let a client pick per request with an X-List-Shape header.
Say which fields accept which operators and get query parameters, an OpenAPI schema and in-memory filtering for free. A backend that can do better takes the whole filter set into its own query, and only when it can translate every filter in it.
Move a viewset's execution to a Celery worker with a single decorator — no code changes to the viewset itself.
Mirror mixin classes and the restViewSet / muxwsViewSet class factory give you a fully typed client that matches your backend viewset exactly — calling an action it did not declare is a compile error.
First-class support for bulk create, update, partial update and destroy — on both the backend and the frontend.
