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 byfeather 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 theunprotected-route warning; a deliberately public one is exempted
with a # feather: public comment in its module.
See Authentication for the full decorator set.