The panko.storage.models Module

Model classes for use in the events storage API.

class panko.storage.models.Event(message_id, event_type, generated, traits, raw)[source]

Bases: panko.storage.base.Model

A raw event from the source system. Events have Traits.

Metrics will be derived from one or more Events.

append_trait(trait_model)[source]
serialize()[source]
class panko.storage.models.Trait(name, dtype, value)[source]

Bases: panko.storage.base.Model

A Trait is a key/value pair of data on an Event.

The value is variant record of basic data types (int, date, float, etc).

classmethod convert_value(trait_type, value)[source]
classmethod get_name_by_type(type_id)[source]
classmethod get_type_by_name(type_name)[source]
get_type_name()[source]
classmethod get_type_names()[source]
serialize()[source]