cli ¤
Module that contains the command line application.
Modules:
-
debug
–Debugging utilities.
-
repos
–CLI
repos
command. -
server
–CLI
server
command. -
update
–CLI
update
command. -
watcher
–CLI
watcher
command.
Functions:
-
add_arg_conf_path
–Add a conf-path option to the parser.
-
add_arg_dist_dir
–Add a dist-dir option to the parser.
-
add_arg_index_url
–Add an index-url option to the parser.
-
add_arg_log_level
–Add a log-level option to the parser.
-
add_arg_log_path
–Add a log-path option to the parser.
-
add_arg_port
–Add a port option to the parser.
-
add_arg_repo_dir
–Add a repo-dir option to the parser.
-
add_arg_repositories
–Add a repository argument to the parser.
-
add_arg_repositories_packages
–Add a repository:package argument to the parser.
-
add_arg_sleep
–Add a sleep option to the parser.
-
configure_logging
–Configure logging.
-
get_parser
–Return the CLI argument parser.
-
main
–Run the main program.
-
subparser
–Add a subparser to a parser.
add_arg_conf_path ¤
add_arg_conf_path(parser: ArgumentParser) -> None
Add a conf-path option to the parser.
Parameters:
-
parser
(ArgumentParser
) –The parser to add the option to.
add_arg_dist_dir ¤
add_arg_dist_dir(parser: ArgumentParser) -> None
Add a dist-dir option to the parser.
Parameters:
-
parser
(ArgumentParser
) –The parser to add the option to.
add_arg_index_url ¤
add_arg_index_url(parser: ArgumentParser) -> None
Add an index-url option to the parser.
Parameters:
-
parser
(ArgumentParser
) –The parser to add the option to.
add_arg_log_level ¤
add_arg_log_level(parser: ArgumentParser) -> None
Add a log-level option to the parser.
Parameters:
-
parser
(ArgumentParser
) –The parser to add the option to.
add_arg_log_path ¤
add_arg_log_path(parser: ArgumentParser) -> None
Add a log-path option to the parser.
Parameters:
-
parser
(ArgumentParser
) –The parser to add the option to.
add_arg_port ¤
add_arg_port(parser: ArgumentParser) -> None
Add a port option to the parser.
Parameters:
-
parser
(ArgumentParser
) –The parser to add the option to.
add_arg_repo_dir ¤
add_arg_repo_dir(parser: ArgumentParser) -> None
Add a repo-dir option to the parser.
Parameters:
-
parser
(ArgumentParser
) –The parser to add the option to.
add_arg_repositories ¤
add_arg_repositories(
parser: ArgumentParser, nargs: str = "+"
) -> None
Add a repository argument to the parser.
Parameters:
-
parser
(ArgumentParser
) –The parser to add the option to.
add_arg_repositories_packages ¤
add_arg_repositories_packages(
parser: ArgumentParser,
) -> None
Add a repository:package argument to the parser.
Parameters:
-
parser
(ArgumentParser
) –The parser to add the option to.
add_arg_sleep ¤
add_arg_sleep(parser: ArgumentParser) -> None
Add a sleep option to the parser.
Parameters:
-
parser
(ArgumentParser
) –The parser to add the option to.
configure_logging ¤
configure_logging(
level: str,
path: str | Path | None = None,
allow: str | tuple[str] | None = None,
) -> None
Configure logging.
Parameters:
-
level
(str
) –Log level (name).
-
path
(str | Path | None
, default:None
) –Log file path.
-
allow
(str | tuple[str] | None
, default:None
) –List of package names for which to allow log levels greater or equal to INFO level. Packages that are not allowed will see all their logs demoted to DEBUG level. If unspecified, allow everything.
get_parser ¤
get_parser() -> ArgumentParser
main ¤
subparser ¤
subparser(
parser: ArgumentParser,
command: str,
command_help: str,
help_option_text: str,
**kwargs: Any
) -> ArgumentParser
Add a subparser to a parser.
Parameters:
-
parser
(ArgumentParser
) –The parser to add the subparser to.
-
command
(str
) –The subcommand invoking this subparser.
-
command_help
(str
) –The subcommand description.
-
help_option_text
(str
) –The message of the subcommand's
-h
option. -
**kwargs
(Any
, default:{}
) –Additional parameters passed to
add_parser
.
Returns:
-
ArgumentParser
–The subparser.