wotpy.wot.dictionaries.schema

Wrapper classes for data schema dictionaries defined in the Scripting API.

Classes

ArraySchemaDict(*args, **kwargs)

Properties to describe an array type.

BooleanSchemaDict(*args, **kwargs)

Properties to describe a boolean type.

DataSchemaDict(*args, **kwargs)

Represents the common properties of a value type definition.

IntegerSchema(*args, **kwargs)

Properties to describe an integer type.

NullSchemaDict(*args, **kwargs)

Empty Null schema class.

NumberSchemaDict(*args, **kwargs)

Properties to describe a numeric type.

ObjectSchemaDict(*args, **kwargs)

Properties to describe an object type.

StringSchemaDict(*args, **kwargs)

Properties to describe a string type.

class wotpy.wot.dictionaries.schema.ArraySchemaDict(*args, **kwargs)

Bases: DataSchemaDict

Properties to describe an array type.

class Meta

Bases: object

defaults = {'readOnly': False, 'writeOnly': False}
fields = {'@type', 'const', 'default', 'description', 'descriptions', 'enum', 'format', 'items', 'maxItems', 'minItems', 'oneOf', 'readOnly', 'title', 'titles', 'type', 'unit', 'writeOnly'}
property items

Used to define the characteristics of an array.

property type

The type property represents the value type enumerated in DataType.

class wotpy.wot.dictionaries.schema.BooleanSchemaDict(*args, **kwargs)

Bases: DataSchemaDict

Properties to describe a boolean type.

property type

The type property represents the value type enumerated in DataType.

class wotpy.wot.dictionaries.schema.DataSchemaDict(*args, **kwargs)

Bases: WotBaseDict

Represents the common properties of a value type definition.

class Meta

Bases: object

defaults = {'readOnly': False, 'writeOnly': False}
fields = {'@type', 'const', 'default', 'description', 'descriptions', 'enum', 'format', 'oneOf', 'readOnly', 'title', 'titles', 'type', 'unit', 'writeOnly'}
classmethod build(*args, **kwargs)

Builds an instance of the appropriate subclass for the given ValueType.

property one_of

Used to ensure that the data is valid against one of the specified schemas in the array.

class wotpy.wot.dictionaries.schema.IntegerSchema(*args, **kwargs)

Bases: NumberSchemaDict

Properties to describe an integer type.

property type

The type property represents the value type enumerated in DataType.

class wotpy.wot.dictionaries.schema.NullSchemaDict(*args, **kwargs)

Bases: DataSchemaDict

Empty Null schema class.

property type

The type property represents the value type enumerated in DataType.

class wotpy.wot.dictionaries.schema.NumberSchemaDict(*args, **kwargs)

Bases: DataSchemaDict

Properties to describe a numeric type.

class Meta

Bases: object

defaults = {'readOnly': False, 'writeOnly': False}
fields = {'@type', 'const', 'default', 'description', 'descriptions', 'enum', 'exclusiveMaximum', 'exclusiveMinimum', 'format', 'maximum', 'minimum', 'multipleOf', 'oneOf', 'readOnly', 'title', 'titles', 'type', 'unit', 'writeOnly'}
property type

The type property represents the value type (a member of DataType).

class wotpy.wot.dictionaries.schema.ObjectSchemaDict(*args, **kwargs)

Bases: DataSchemaDict

Properties to describe an object type.

class Meta

Bases: object

defaults = {'readOnly': False, 'writeOnly': False}
fields = {'@type', 'const', 'default', 'description', 'descriptions', 'enum', 'format', 'oneOf', 'properties', 'readOnly', 'required', 'title', 'titles', 'type', 'unit', 'writeOnly'}
property properties

Data schema nested definitions.

property type

The type property represents the value type enumerated in DataType.

class wotpy.wot.dictionaries.schema.StringSchemaDict(*args, **kwargs)

Bases: DataSchemaDict

Properties to describe a string type.

class Meta

Bases: object

defaults = {'readOnly': False, 'writeOnly': False}
fields = {'@type', 'const', 'contentEncoding', 'contentMediaType', 'default', 'description', 'descriptions', 'enum', 'format', 'maxLength', 'minLength', 'oneOf', 'pattern', 'readOnly', 'title', 'titles', 'type', 'unit', 'writeOnly'}
property type

The type property represents the value type enumerated in DataType.