nucypher.control.specifications

Subpackages

Submodules

class BaseSchema(*, only: Union[Sequence[str], Set[str], None] = 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)

Bases: marshmallow.schema.Schema

class Meta

Bases: object

unknown = 'include'
handle_error(error, data, many, **kwargs)

Custom error handler function for the schema.

Parameters
  • error – The ValidationError raised during (de)serialization.

  • data – The original input data.

  • many – Value of many on dump or load.

  • partial – Value of partial on load.

New in version 2.0.0.

Changed in version 3.0.0rc9: Receives many and partial (on deserialization) as keyword arguments.

opts = <marshmallow.schema.SchemaOpts object>
exception SpecificationError

Bases: ValueError

The protocol request is completely unusable

exception MissingField

Bases: nucypher.control.specifications.exceptions.SpecificationError

The protocol request cannot be deserialized because it is missing required fields

exception InvalidInputData

Bases: nucypher.control.specifications.exceptions.SpecificationError

Input data does not match the input specification

exception InvalidOutputData

Bases: nucypher.control.specifications.exceptions.SpecificationError

Response data does not match the output specification

exception InvalidArgumentCombo

Bases: nucypher.control.specifications.exceptions.SpecificationError

Arguments specified are incompatible