api.interfaces.outputs package

Submodules

api.interfaces.outputs.interface module

class api.interfaces.outputs.interface.Features(features)[source]

Bases: object

Class implementing the output features interface

schema = <FeaturesSchema(many=False)>
to_response()[source]

Dumps the features to the data to be used in the response

api.interfaces.outputs.schema module

class api.interfaces.outputs.schema.FeaturesSchema(*, only: Optional[Union[Sequence[str], Set[str]]] = None, exclude: Union[Sequence[str], Set[str]] = (), many: bool = False, context: Optional[Dict] = None, load_only: Union[Sequence[str], Set[str]] = (), dump_only: Union[Sequence[str], Set[str]] = (), partial: Union[bool, Sequence[str], Set[str]] = False, unknown: Optional[str] = None)[source]

Bases: marshmallow.schema.Schema

Class defining the schema for the features input interface

class Meta[source]

Bases: object

unknown = 'exclude'
opts: SchemaOpts = <marshmallow.schema.SchemaOpts object>

api.interfaces.outputs.utilities module

class api.interfaces.outputs.utilities.FeatureLabelsValidator[source]

Bases: object

Class implementing validator for the feature labels

classmethod validate(labels, values)[source]

Validates the feature labels.

Parameters
  • labels (Any) – labels to be validated

  • values (Any) – values to be referenced

Returns

validated values

Return type

Any

class api.interfaces.outputs.utilities.FeatureValuesValidator[source]

Bases: object

Class implementing validator for the feature values

classmethod validate(values)[source]

Validates the feature values.

Parameters

values (Any) – values to be validated

Returns

validated values

Return type

Any

Module contents