Skip to content

pd_cds_cli.main

pd_cds_cli.main

pd-cds command-line interface.

Defines the Typer application: the callback builds an :class:pd_cds_api.ApiClientState from the global options (each option also reads a matching environment variable), and the get-data command fetches conditions data via :class:pd_cds_api.ApiClientWrapper.

Note: parameter help intentionally lives in the typer.Option(help=...) strings (they embed dynamic defaults); the function docstrings below provide command summaries/descriptions only, so Typer does not compete with them.

pd_cds_cli.main.main(ctx, api_server_url=None, cache_proxy_url=None, proxy_config_url=None, ttl=None, verbose=False)

ProtoDUNE Conditions Data Service client.

Global options must appear before the subcommand. They may also be set via environment variables (CONDB_API_SERVER_URL, FRONTIER_CACHE_PROXY_URL, FRONTIER_PROXY_CONFIG_URL, FRONTIER_TTL).

pd_cds_cli.main.get_data(ctx, folder, t0, t1=None, data_type=None, format=None)

Retrieve run-conditions data for a folder and time point or range.

The result is written under ./pd-cds-data/ as -t_. (point query) or -t0_-t1_. (range query). A failed native-client call prints its error output and exits non-zero.