-
Notifications
You must be signed in to change notification settings - Fork 73
Customization
Thomas Pollet edited this page Mar 8, 2026
·
7 revisions
- Applies to: Flask and FastAPI
- Best examples:
examples/demo_fastapi.py,examples/demo_pythonanywhere_com.py - Related pages: Serialization and
jsonapi_attr, HTTP Methods and Hooks, Endpoint Decorators, OpenAPI / Swagger Customization
Use this page as a map to the main customization mechanisms in SAFRS.
Use Serialization and jsonapi_attr when you need to:
- override
to_dict - expose computed attributes
- add writable computed properties with setters
- hide attributes or relationships
Use HTTP Methods and Hooks when you need to:
- restrict allowed CRUD methods with
http_methods - override
_s_postor_s_patch - implement hook-style behavior around writes
Use Endpoint Decorators and Security and Access Control when you need:
- decorators on model endpoints
- relationship-level decorators
- auth examples
- permission hooks such as
_s_check_perm
Use OpenAPI / Swagger Customization for:
- custom swagger/openapi fragments
- docstring-driven docs
- prefix and dispatch customizations
See:
See Configuration Reference for pagination limits, relationship toggles, and config strategy.
- Home
- Installation
- Quickstart (Flask)
- Quickstart (FastAPI)
- JSON:API Basics
- Relationships and Includes
- Filtering
- Sorting, Pagination, and Sparse Fieldsets
- Content Types and Errors
- Bulk Requests
- RPC / Custom Methods
- Customization
- Security and Access Control
- Stateless Endpoints / JABase
- Performance
- Examples
- Existing Databases (Legacy)
- PostGIS / GeoAlchemy2
- Docker / Deployment
- Troubleshooting
- Reference: SAFRSBase
- Reference: SAFRSBase Customization