Typings - unihan_etl.types

Typings for unihan-etl.

unihan_etl.types.StrPath: TypeAlias = str | ForwardRef('PathLike[str]')data

os.PathLike or str

StrPath is based on typeshed’s.

unihan_etl.types.ColumnDatadata

Sequence of UNIHAN field name strings.

alias of Sequence[str]

unihan_etl.types.UntypedNormalizedDatadata

Normalized UNIHAN data as a sequence of field-value mappings.

alias of Sequence[Mapping[str, Any]]

unihan_etl.types.ExpandedExportdata

Expanded UNIHAN export with multi-value delimiters resolved.

alias of Sequence[Mapping[str, Any]]

class unihan_etl.types.Optionsclass[source]

Bases: object

unihan-etl options.

source: strattribute
destination: pathlib.Pathattribute
zip_path: pathlib.Pathattribute
work_dir: pathlib.Pathattribute
fields: tuple[str, ...]attribute
format: UnihanFormatsattribute
input_files: list[str]attribute
download: boolattribute
expand: boolattribute
prune_empty: boolattribute
cache: boolattribute
log_level: LogLevelattribute
__init__(source, destination, zip_path, work_dir, fields, format, input_files, download, expand, prune_empty, cache, log_level)method[source]
Parameters:
Return type:

None

class unihan_etl.types.ReportHookFnclass[source]

Bases: Protocol

Progress bar callback for download().

__init__(*args, **kwargs)method[source]
_abc_impl = <_abc._abc_data object>attribute
_is_protocol = Trueattribute
class unihan_etl.types.UrlRetrieveFnclass[source]

Bases: Protocol

Type annotation for urllib.request.urlretrieve().

__init__(*args, **kwargs)method[source]
_abc_impl = <_abc._abc_data object>attribute
_is_protocol = Trueattribute