Commands
Startup process
Initialization
During initialization phase Spinta components are initialized from data stored in variuos external sources.
load(Config)
Initialize Config component from RawConfig. Values from RawConfig are parsed and converted to native Python types and stored as Config attributes.
load(Store)
load(Manifest)
Linking
link(Manifest)
Waiting
wait(Store)
Preparation
prepare(Manifest)
Request handling
Request
Interpret request data and decide what commands should be called to process the request.
prepare(UrlParams, Version, Request)
Initialize UrlParams from an HTTP request object.
Auth
Check if client has access to requested resource.
Read
getall(Request, Namespace)
Get objects from all models in a given namespace.
getall(Namespace)
Get objects from all models in a given namespace.
getall(Request, Model, Backend)
Get objects from a given model. This command interprets given request and returns a response in requested format.
getall(Model, Backend)
This command build and executes backend query, executes it and returns back the results.
Encode
cast_backend_to_python(Model, Backend, Any)
Converts backend model data to python-native model data.
cast_backend_to_python(Property, Backend, Any)
Converts backend property (subresource) data to python-native data.
This is used for /ns/Model/<ID>/property endpoints.
cast_backend_to_python(DataType, Backend, Any)
Converts backend types to python-native types for a data type. Should call
itself for complex data types like object and array.
Response
prepare_data_for_response(Model, Format, Any)
Converts python-native data types to a requested response format. This expects to get python-native data, which is prepared using cast_backend_to_python(Model, Backend, Any) command.
prepare_data_for_response(DataType, Format, Any)
Convert python-native data types to a given format, for subresources.
prepare_dtype_for_response(DataType, Format, Any)
Converts python-native data types to a requested response format.
render(Request, Namespace | Model | Property, Format)
Takes python-native data and return Starlette’s HTTP response.