cli#

Automagic generation of a Typer script for all dataset downloads.

irdl.cli._active_dataset_names() set[str]#
irdl.cli._display_dataset(dataset_class: type) None#

Display a single dataset with its description and DOI.

irdl.cli._format_cli_item(value: Any) str#

Format one item inside a CLI result mapping.

irdl.cli._format_cli_value(value: Any) str#

Format CLI return values for readable terminal output.

irdl.cli._get_dataset_description(dataset_class: type) str#

Get the first line of a dataset class’s docstring.

irdl.cli._get_version() str#

Get the irdl package version.

irdl.cli._make_wrapper(cls, method, params, help_text, dataset_name, param_docs)#
irdl.cli._resolve_union_type(annotation: type) type#

Resolve Union types to Typer-compatible types.

irdl.cli.app = <typer.main.Typer object>#

Typer app that can be invoked by calling irdl from the CLI.

irdl.cli.cache_callback(ctx: Context, cache_dir: Path | None = <typer.models.OptionInfo object>) None#

Cache command callback to handle common options.

irdl.cli.cache_clean_command(ctx: Context) int#

Wipe cache directory.

irdl.cli.cache_dir_command(ctx: Context) Path#

Show cache directory path.

irdl.cli.cache_prune_command(ctx: Context) int#

Remove unreachable cache items for known datasets only.

Only processes datasets registered in the current IRDL version. Unknown directories in the cache are left untouched.

irdl.cli.cache_size_command(ctx: Context, human_readable: bool = <typer.models.OptionInfo object>) int#

Show cache directory size.

irdl.cli.list_datasets() None#

List all available datasets grouped by category.

irdl.cli.main_callback(version: bool = <typer.models.OptionInfo object>) None#

Handle version flag.