User Guide#

In-depth coverage of every FastAPI-Restly feature. Start with the tutorial if you are new to the framework; jump to any topic guide if you are looking for something specific.


Tutorial#

A walkthrough that builds a complete blog API from scratch, introducing the core patterns progressively.

Part 1: Building a CRUD API

Models, schemas, generated endpoints, read/write field control, querying lists, and testing.

Tutorial
Part 2: Customizing Views

Override handlers, low-level object helpers, custom routes, and shared base classes.

Tutorial Part 2: Customizing Views

Topic Guides#

Custom Schemas and Aliases

Define schemas with field aliases, write-only fields, and read-only computed fields.

How-To: Use Schemas and Field Types
Type Annotations

Use IDSchema, optional view generics, and typed perform_* handlers without fighting the framework.

How-To: Use Type Annotations with FastAPI-Restly
Override Endpoints

Customize perform_* handlers, replace generated routes, and add custom routes alongside generated CRUD.

How-To: Override CRUD Behavior and Add Custom Endpoints
React Admin Integration

Use AsyncReactAdminView to get a backend that ra-data-simple-rest connects to out of the box.

How-To: React Admin Integration
Share Behaviour with Base Views

Use Python inheritance to share CRUD overrides, dependencies, URL prefixes, and access control across multiple views.

How-To: Share Behaviour with Base Views
Compose Views with Mixins

Layer cross-cutting concerns — tenant scoping, soft delete, audit stamping — through cooperative mixins. Includes the rule for when to layer in a mixin vs. write logic in perform_create / perform_update.

How-To: Compose Views with Mixins
Filter, Sort, and Paginate

Filter, sort, and paginate list endpoints using URL query parameters.

How-To: Filter, Sort, and Paginate Lists
Foreign Keys with IDRef

Reference related objects by ID with automatic resolution and 404 on missing.

How-To: Work with Foreign Keys Using IDRef
Testing

Use RestlyTestClient and savepoint-based pytest fixtures for isolated tests.

How-To: Test APIs with RestlyTestClient and Fixtures
pytest Fixtures Reference

Full fixture reference with isolation model details and async test setup.

pytest Fixtures Reference
Existing Project Integration

Adopt Restly beside existing FastAPI routes, then wire it into your sessions and models.

How-To: Use FastAPI-Restly in an Existing Project
Technical Details

Schema generation internals, view registration, and list-parameters lifecycle.

Technical Details