morca · API

orca.timekeys

Time keys by their partitions' kind (monthly, daily, hourly), as text: for code that has a pipeline's kind as a string, not its type.

Functions

is_time_kind

def is_time_kind(kind: StringSpan) -> Bool

Whether kind is a calendar's: monthly, daily or hourly.

unit_of

def unit_of(kind: StringSpan) -> String

month, day or hour; key for any other kind.

example_of

def example_of(kind: StringSpan) -> String

A key of kind, for help texts.

parse_time_keys

def parse_time_keys(kind: StringSpan, s: StringSpan, first: StringSpan = "") -> List[String]

parse_keys for the key type of kind (monthly for any other), as text.

containing_key

def containing_key(kind: StringSpan, year: Int, month: Int, day: Int, hour: Int) -> String

The key of kind (monthly for any other) a date and hour fall in.

prev_key

def prev_key(kind: StringSpan, key: StringSpan) -> String

The key before key, of kind (monthly for any other).