Ciri: API

Schemas

class ciri.core.Schema(*args, **kwargs)[source]

Bases: ciri.abstract.AbstractSchema

class ciri.core.SchemaOptions(*args, **kwargs)[source]

Holds the schema behavior configuration

Parameters:
  • allow_none (bool) – Allow None values
  • raise_errors (bool) – Whether or not to raise exceptions
  • error_handler (ErrorHandler) – Schema error handling
  • encoder (SchemaEncoder) – Schema encoding handler
  • registry (SchemaRegistry) – Schema registry

Schema Fields

class ciri.fields.AbstractBaseField[source]

Bases: abc.ABCMeta

ciri.fields.Bool

alias of ciri.fields.Boolean

class ciri.fields.Boolean(*args, **kwargs)[source]

Bases: ciri.fields.Field

deserialize(value)[source]

Deserialization method

Parameters:value – value to be deserialized as a basic python type
Raises:SerializationError, NotImplementedError
serialize(value)[source]

Serialization method

Parameters:value – value to be serialized as a basic python type
Raises:SerializationError, NotImplementedError
validate(value)[source]

Validation method

Parameters:value – value to be deserialized as a basic python type
Returns:validated value
Raises:SerializationError, NotImplementedError
class ciri.fields.Date(*args, **kwargs)[source]

Bases: ciri.fields.Field

deserialize(value)[source]

Deserialization method

Parameters:value – value to be deserialized as a basic python type
Raises:SerializationError, NotImplementedError
serialize(value)[source]

Serialization method

Parameters:value – value to be serialized as a basic python type
Raises:SerializationError, NotImplementedError
validate(value)[source]

Validation method

Parameters:value – value to be deserialized as a basic python type
Returns:validated value
Raises:SerializationError, NotImplementedError
class ciri.fields.DateTime(*args, **kwargs)[source]

Bases: ciri.fields.Field

deserialize(value)[source]

Deserialization method

Parameters:value – value to be deserialized as a basic python type
Raises:SerializationError, NotImplementedError
serialize(value)[source]

Serialization method

Parameters:value – value to be serialized as a basic python type
Raises:SerializationError, NotImplementedError
validate(value)[source]

Validation method

Parameters:value – value to be deserialized as a basic python type
Returns:validated value
Raises:SerializationError, NotImplementedError
class ciri.fields.Dict(*args, **kwargs)[source]

Bases: ciri.fields.Field

deserialize(value)[source]

Deserialization method

Parameters:value – value to be deserialized as a basic python type
Raises:SerializationError, NotImplementedError
serialize(value)[source]

Serialization method

Parameters:value – value to be serialized as a basic python type
Raises:SerializationError, NotImplementedError
validate(value)[source]

Validation method

Parameters:value – value to be deserialized as a basic python type
Returns:validated value
Raises:SerializationError, NotImplementedError
class ciri.fields.Field(*args, **kwargs)[source]

Bases: ciri.abstract.AbstractField

Base Field Class that all other Fields extend from

deserialize(value)[source]

Deserialization method

Parameters:value – value to be deserialized as a basic python type
Raises:SerializationError, NotImplementedError
serialize(value)[source]

Serialization method

Parameters:value – value to be serialized as a basic python type
Raises:SerializationError, NotImplementedError
validate(value)[source]

Validation method

Parameters:value – value to be deserialized as a basic python type
Returns:validated value
Raises:SerializationError, NotImplementedError
class ciri.fields.Float(*args, **kwargs)[source]

Bases: ciri.fields.Field

deserialize(value)[source]

Deserialization method

Parameters:value – value to be deserialized as a basic python type
Raises:SerializationError, NotImplementedError
serialize(value)[source]

Serialization method

Parameters:value – value to be serialized as a basic python type
Raises:SerializationError, NotImplementedError
validate(value)[source]

Validation method

Parameters:value – value to be deserialized as a basic python type
Returns:validated value
Raises:SerializationError, NotImplementedError
ciri.fields.Int

alias of ciri.fields.Integer

class ciri.fields.Integer(*args, **kwargs)[source]

Bases: ciri.fields.Field

deserialize(value)[source]

Deserialization method

Parameters:value – value to be deserialized as a basic python type
Raises:SerializationError, NotImplementedError
serialize(value)[source]

Serialization method

Parameters:value – value to be serialized as a basic python type
Raises:SerializationError, NotImplementedError
validate(value)[source]

Validation method

Parameters:value – value to be deserialized as a basic python type
Returns:validated value
Raises:SerializationError, NotImplementedError
class ciri.fields.List(*args, **kwargs)[source]

Bases: ciri.fields.Field

deserialize(value)[source]

Deserialization method

Parameters:value – value to be deserialized as a basic python type
Raises:SerializationError, NotImplementedError
serialize(value)[source]

Serialization method

Parameters:value – value to be serialized as a basic python type
Raises:SerializationError, NotImplementedError
validate(value)[source]

Validation method

Parameters:value – value to be deserialized as a basic python type
Returns:validated value
Raises:SerializationError, NotImplementedError
class ciri.fields.Schema(*args, **kwargs)[source]

Bases: ciri.fields.Field

deserialize(value)[source]

Deserialization method

Parameters:value – value to be deserialized as a basic python type
Raises:SerializationError, NotImplementedError
serialize(value)[source]

Serialization method

Parameters:value – value to be serialized as a basic python type
Raises:SerializationError, NotImplementedError
validate(value)[source]

Validation method

Parameters:value – value to be deserialized as a basic python type
Returns:validated value
Raises:SerializationError, NotImplementedError
ciri.fields.Str

alias of ciri.fields.String

class ciri.fields.String(*args, **kwargs)[source]

Bases: ciri.fields.Field

deserialize(value)[source]

Deserialization method

Parameters:value – value to be deserialized as a basic python type
Raises:SerializationError, NotImplementedError
serialize(value)[source]

Serialization method

Parameters:value – value to be serialized as a basic python type
Raises:SerializationError, NotImplementedError
validate(value)[source]

Validation method

Parameters:value – value to be deserialized as a basic python type
Returns:validated value
Raises:SerializationError, NotImplementedError
class ciri.fields.UUID(*args, **kwargs)[source]

Bases: ciri.fields.Field

deserialize(value)[source]

Deserialization method

Parameters:value – value to be deserialized as a basic python type
Raises:SerializationError, NotImplementedError
serialize(value)[source]

Serialization method

Parameters:value – value to be serialized as a basic python type
Raises:SerializationError, NotImplementedError
validate(value)[source]

Validation method

Parameters:value – value to be deserialized as a basic python type
Returns:validated value
Raises:SerializationError, NotImplementedError