Examples#
The repository includes complete applications under example-projects/. They
show different levels of Restly adoption, from a tiny resource to a
production-shaped service with shared view foundations and custom behavior.
Blog#
example-projects/blog (README) is the smallest example: one model, one view, sync SQLAlchemy sessions, and auto-generated schemas. Use it as a smoke test or as the shortest path from an empty app to a working REST resource.
Shop#
example-projects/shop
(README)
shows relationships, multiple primary-key styles, async sessions, and
React-Admin-compatible endpoints through AsyncReactAdminView. It also includes
a small React Admin frontend wired against the API. These patterns are
covered in React Admin Integration and
Work with Foreign Keys and Relationships.
SaaS#
example-projects/saas
(README)
is the most complete example: a multi-tenant project management API with
permission patterns, shared base views, mixins, custom create/update schemas,
query modifiers, and
Alembic migrations. It also builds a
substantial non-CRUD surface on the same views. The routes below, all defined
in example-projects/saas/app/views/, highlight the patterns involved:
Route |
Pattern it demonstrates |
|---|---|
|
State transitions via |
|
Bulk endpoints beside generated CRUD |
|
A file-upload flow with a custom create bracket |
|
Two rows committed through one |
|
Account actions and a non-resource read |
These patterns are covered in Compose Views with Mixins, Share Behaviour with Base Views, Customize RestView, and Patterns.
Running them#
Each project is self-contained: run uv sync in its directory, then use the
commands in its README (linked above).
To build one of these yourself, start with Getting Started and the Tutorial.