Entrypoint helper functions

General helper functions used by the entrypoints.

Main entrypoint functions

pubtools._pyxis.pyxis_ops.setup_pyxis_client(args: Namespace, ccache_file: str) PyxisClient[source]

Set up a PyxisClient instance according to specified parameters.

Args:
args (argparse.Namespace)

Arguments of the program.

cache_dir (str):

Path to a file used for storing ccache by Kerberos authentication.

Returns:

PyxisClient: Configured PyxisClient instance.

pubtools._pyxis.pyxis_ops.deserialize_list_from_arg(value: str, csv_input: bool = False) list[Any] | Any[source]

Conditionally load contents of a file if specified in argument value.

Detects whether the value is a reference to a file (@-prefixed like in gcc -o, curl -d, etc.) and returns its contents in list if applicable; otherwise returns the value as a list. Examples:

{“foo”} – plain string, returned as a list @items.json – file path; its contents are returned in a list

pubtools._pyxis.pyxis_ops.serialize_to_csv_from_list(list_value: list[Any]) str[source]

Convert a list to comma separated string.