flowmachine.core.server.query_schemas.custom_fields¶
Class AggregateBy¶
AggregateBy(required=False, validate=None, **kwargs)
A string representing a period type, e.g. "day"
Attributes¶
Methods¶
_validate_all¶
_validate_all
context¶
context
The context dictionary for the parent :class:Schema
.
default¶
default
missing¶
missing
Class Bounds¶
Bounds(*, only: 'types.StrSequenceOrSet | None' = None, exclude: 'types.StrSequenceOrSet' = (), many: 'bool | None' = None, context: 'dict | None' = None, load_only: 'types.StrSequenceOrSet' = (), dump_only: 'types.StrSequenceOrSet' = (), partial: 'bool | types.StrSequenceOrSet | None' = None, unknown: 'str | None' = None)
Schema representing a range (i.e. lower and upper bound, both required, lower bound must be less than upper.
Attributes¶
Methods¶
to_tuple¶
to_tuple(self, params, **kwargs)
validate_bounds_if_present¶
validate_bounds_if_present(self, data, **kwargs)
dict_class¶
dict_class
Class DFSMetric¶
DFSMetric(required=True, validate=None, **kwargs)
A string representing a DFS metric (for example: "amount", "commission", "fee", "discount")
Attributes¶
Methods¶
_validate_all¶
_validate_all
context¶
context
The context dictionary for the parent :class:Schema
.
default¶
default
missing¶
missing
Class Direction¶
Direction(required=False, validate=None, load_default="both", **kwargs)
A string representing a direction for CDR events (i.e. incoming/outgoing). Allowed values are 'in', 'out' or 'both' (defaults to 'both' if no value is provided).
Attributes¶
Methods¶
_validate_all¶
_validate_all
context¶
context
The context dictionary for the parent :class:Schema
.
default¶
default
missing¶
missing
Class EventTypes¶
EventTypes(
required=False, validate=None, allow_none=True, missing=None, **kwargs
)
A list of strings representing an event type, for example "calls", "sms", "mds", "topups". When deserialised, will be deduped, and prefixed with "events."
Attributes¶
Methods¶
_validate_all¶
_validate_all
context¶
context
The context dictionary for the parent :class:Schema
.
default¶
default
missing¶
missing
Class Hours¶
Hours(*, only: 'types.StrSequenceOrSet | None' = None, exclude: 'types.StrSequenceOrSet' = (), many: 'bool | None' = None, context: 'dict | None' = None, load_only: 'types.StrSequenceOrSet' = (), dump_only: 'types.StrSequenceOrSet' = (), partial: 'bool | types.StrSequenceOrSet | None' = None, unknown: 'str | None' = None)
Custom field representing a slice of the hours of the day, possibly spanning into tomorrow.
Attributes¶
Note
Hours are inclusive so start_hour=1, end_hour=2 will include 1 and 2 AM.
Methods¶
to_tuple¶
to_tuple(self, params, **kwargs)
dict_class¶
dict_class
Class ISODateTime¶
ISODateTime(format: 'str | None' = None, **kwargs) -> 'None'
Like marhsmallow's datetime field, but accepts anything that can be parsed using python's fromisoformat, e.g. "2016-01-01", "2016-01-01T00:00:00", "2016-01-01 00:00:00"
Attributes¶
Methods¶
_validate_all¶
_validate_all
context¶
context
The context dictionary for the parent :class:Schema
.
default¶
default
missing¶
missing
Class Statistic¶
Statistic(required=True, validate=None, **kwargs)
A string representing a statistic type, e.g. "median"
Attributes¶
Methods¶
_validate_all¶
_validate_all
context¶
context
The context dictionary for the parent :class:Schema
.
default¶
default
missing¶
missing
Class TotalBy¶
TotalBy(required=False, **kwargs)
A string representing a period type, e.g. "day"
Attributes¶
Methods¶
_validate_all¶
_validate_all
context¶
context
The context dictionary for the parent :class:Schema
.
default¶
default
missing¶
missing
Class TowerDayOfWeekScores¶
TowerDayOfWeekScores(**kwargs)
A dictionary mapping days of the week ("monday", "tuesday" etc.) to numerical scores in the range [-1.0, +1.0].
Attributes¶
Methods¶
_validate_all¶
_validate_all
context¶
context
The context dictionary for the parent :class:Schema
.
default¶
default
missing¶
missing
Class TowerHourOfDayScores¶
TowerHourOfDayScores(**kwargs)
A list of length 24 containing numerical scores in the range [-1.0, +1.0],
Attributes¶
Methods¶
_validate_all¶
_validate_all
context¶
context
The context dictionary for the parent :class:Schema
.
default¶
default
missing¶
missing