Skip to content

Type aliases

These names appear in signatures throughout the API. They are not exported from promcraft: pass a value of any of the listed types.

SCALAR_TYPE module-attribute

SCALAR_TYPE = Union['Scalar', 'Variable', float, int]

A scalar: a Scalar, a Variable or a number.

A raw float/int is wrapped by the parameter's from_value: in Float for values, and in Duration (as seconds) for ranges, resolutions and offsets.

STRING_TYPE module-attribute

STRING_TYPE = Union['String', 'Variable', str]

A string: a String, a Variable or a str.

A raw str is wrapped in a double-quoted String.

OPERAND_TYPE module-attribute

OPERAND_TYPE = Query | float

An operand: a Query, or a number wrapped in Float.

AT_TYPE module-attribute

AT_TYPE = SCALAR_TYPE | Literal['start()', 'end()']

An @ modifier time: a Unix timestamp as a scalar argument, "start()" or "end()".

DEFAULT_STYLE module-attribute

DEFAULT_STYLE = Style()

Style(), the default for every style parameter: renders the same as str(query).