Skip to content

Types

UTCDateTime module-attribute

UTCDateTime = Annotated[datetime, AfterValidator(lambda dt: astimezone(utc))]

Datetime that's always in UTC.

StrPath module-attribute

StrPath: TypeAlias = Union[str, Path]

CollectionOf module-attribute

CollectionOf: TypeAlias = Union[list[T], tuple[T, ...], set[T]]

Type alias representing a union of list, tuple, and set.

OpenArchiveMode module-attribute

OpenArchiveMode: TypeAlias = Literal['r', 'r:*', 'r:', 'r:gz', 'r:bz2', 'r:xz', 'w', 'w:', 'w:gz', 'w:bz2', 'w:xz', 'x', 'x:', 'x:', 'x:gz', 'x:bz2', 'x:xz', 'a', 'a:']

TreeStyle module-attribute

TreeStyle: TypeAlias = Literal['ansi', 'ascii', 'const', 'const_bold', 'rounded', 'double']

TableStyle module-attribute

TableStyle: TypeAlias = Literal['ascii', 'ascii2', 'ascii_double_head', 'square', 'square_double_head', 'minimal', 'minimal_heavy_head', 'minimal_double_head', 'simple', 'simple_head', 'simple_heavy', 'horizontals', 'rounded', 'heavy', 'heavy_edge', 'heavy_head', 'double', 'double_edge', 'markdown']

SortBy module-attribute

SortBy: TypeAlias = Literal['name', 'datetime', 'size', 'compressed_size', 'checksum']

ErrorHandler module-attribute

ErrorHandler: TypeAlias = Literal['strict', 'ignore', 'replace', 'backslashreplace', 'surrogateescape', 'xmlcharrefreplace', 'namereplace']

CompressionLevel module-attribute

CompressionLevel: TypeAlias = Literal[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]