Skip to main content
Routes handle HTTP requests. Feather auto-discovers modules in routes/api/ and routes/pages/.
routes/api/users.py

Prefixes

Keep routes thin

A route handler that does work belonging in a service is reported by feather check as the fat-route warning. Parse the request, call a service, return a response.

Services

Where the business logic goes, with transactions handled for you.

Exceptions

Raise a typed exception and it becomes the right JSON response.

Auth decorators

Every route should carry one, or declare itself public. A route with no auth decorator is reported as the unprotected-route warning; a deliberately public one is exempted with a # feather: public comment in its module. See Authentication for the full decorator set.

Seeing what is registered

Generate CRUD scaffolding with: