filip.models package

Subpackages

Submodules

filip.models.base module

Shared data models

class filip.models.base.DataType(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: str, Enum

When possible reuse schema.org data types (Text, Number, DateTime, StructuredValue, etc.). Remember that null is not allowed in NGSI-LD and therefore should be avoided as a value.

https://schema.org/DataType

ARRAY = 'Array'
BOOLEAN = 'Boolean'
COMMAND = 'command'
COMMAND_RESULT = 'commandResult'
COMMAND_STATUS = 'commandStatus'
DATE = 'Date'
DATETIME = 'DateTime'
FLOAT = 'Float'
GEOJSON = 'geo:json'
INTEGER = 'Integer'
NUMBER = 'Number'
OBJECT = 'Object'
RELATIONSHIP = 'Relationship'
STRUCTUREDVALUE = 'StructuredValue'
TEXT = 'Text'
TIME = 'Time'
pydantic model filip.models.base.FiwareHeader[source]

Bases: BaseModel

Define entity service paths which are supported by the NGSI Context Brokers to support hierarchical scopes: https://fiware-orion.readthedocs.io/en/master/user/service_path/index.html

Config:
  • populate_by_name: bool = True

  • validate_assignment: bool = True

Fields:
Validators:
field service: str = '' (alias 'fiware-service')

Fiware service used for multi-tenancy

Constraints:
  • max_length = 50

  • pattern = w*$

Validated by:
  • wrapper

field service_path: str = '/' (alias 'fiware-servicepath')

Fiware service path

Constraints:
  • max_length = 51

Validated by:
  • wrapper

pydantic model filip.models.base.FiwareHeaderSecure[source]

Bases: FiwareHeader

Defines entity service paths and an authorization via Bearer-Token which are supported by the NGSI Context Brokers to support hierarchical scopes: https://fiware-orion.readthedocs.io/en/master/user/service_path/index.html

Config:
  • populate_by_name: bool = True

  • validate_assignment: bool = True

Fields:
Validators:
field authorization: str = ''

authorization key

Constraints:
  • max_length = 3000

  • pattern = .*

field service: str = '' (alias 'fiware-service')

Fiware service used for multi-tenancy

Constraints:
  • max_length = 50

  • pattern = w*$

Validated by:
  • wrapper

field service_path: str = '/' (alias 'fiware-servicepath')

Fiware service path

Constraints:
  • max_length = 51

Validated by:
  • wrapper

class filip.models.base.LogLevel(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: str, Enum

An enumeration.

CRITICAL = 'CRITICAL'
DEBUG = 'DEBUG'
ERROR = 'ERROR'
INFO = 'INFO'
NOTSET = 'NOTSET'
WARNING = 'WARNING'
class filip.models.base.NgsiVersion(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: str, Enum

Version of NGSI-Specification that should be used within the target system. .. note:: Currently, the library only supports functionality for NGSI-v2

ld = 'ld'
v2 = 'v2'
class filip.models.base.PaginationMethod(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: str, Enum

Options for the internal pagination methods

GET = 'GET'
POST = 'POST'

filip.models.mqtt module

Module contains models for MQTT communication with FIWARE’s IoT-Agents.

class filip.models.mqtt.IoTAMQTTMessageType(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: str, Enum

Options for mqtt message type

CMD = 'cmd'
CMDEXE = 'cmdexe'
CONFIG = 'configuration'
MULTI = 'multi'
SINGLE = 'single'