1.3. backendapp.api.baseresource
An API consists of resources that inherit from BaseResource
.
- class backendapp.api.baseresource.BaseResource(Schema, service)[source]
Contains class variables common to all resources.
- class backendapp.api.baseresource.MultipleResource(Schema, service)[source]
A Resource that appends to or returns a list of model instances.
This is used to post one capture or return a list of tags.
- __init__(Schema, service)[source]
Constructor for the BaseResource class.
- Parameters
Schema – Marshamallow schema for the model associated with the service.
service – for creating and retrieving model instances.
- class backendapp.api.baseresource.SingleResource(Schema, service)[source]
A Resource that returns or deletes one model instance.
It is used to retrieve one capture as JSON or delete one tag.