If you've built more than one FastAPI service, you know the drill: define a model, define a schema, then write the same five endpoints — list, retrieve, create, update, delete — over and over again. Two libraries try to kill that boilerplate: the veteran fastapi-crudrouter and the newer, DRF-inspired fastapi-viewsets. Here's how they actually compare.
The Core Idea
Both libraries generate CRUD routes automatically, but they start from different mental models.
fastapi-crudrouter, created by Adam Watkins back in December 2020, treats each resource as a self-contained router. You instantiate a CRUDRouter — a subclass of FastAPI's own APIRouter — point it at a model and a schema, and it hands you a fully working set of REST routes in about ten lines of code.
fastapi-viewsets borrows its philosophy from Django REST Framework's ViewSets. Instead of a router factory, you define a BaseViewset class, override what you need, and call .register() to wire it up. If you've ever written a DRF ModelViewSet, this will feel instantly familiar.






