ORIONIS API REFERENCE

THE ORIONIS API

Build with clarity.

Explore the building blocks of an async-first Python framework. Every module, class, and method — connected, searchable, and ready to build with.

module documentation

Undocumented

Function parse_moment Parse a textual moment, honouring the relative keywords.
Function resolve_moment Resolve a rule reference into the datetime it points at.
Function to_datetime Coerce a value into a timezone-aware datetime.
def parse_moment(text: str) -> pendulum.DateTime | None: (source)

Parse a textual moment, honouring the relative keywords.

Parameters
text:strDate string or one of now, today, tomorrow, yesterday.
Returns
pendulum.DateTime | NoneParsed datetime, or None when the text is not a valid date.
def resolve_moment(reference: object, instance: object) -> pendulum.DateTime | None: (source)

Resolve a rule reference into the datetime it points at.

Parameters
reference:objectField name, date string, datetime/date value, or None to use the current moment.
instance:objectSchema instance used to resolve sibling field names.
Returns
pendulum.DateTime | NoneResolved datetime, or None when the reference is not a moment.
def to_datetime(value: object) -> pendulum.DateTime | None: (source)

Coerce a value into a timezone-aware datetime.

Parameters
value:objectValue to coerce. Accepts datetime, date and strings.
Returns
pendulum.DateTime | NoneCoerced datetime, or None when the value is not a moment.