command module
BaseCommand
- class pdbstore.cli.command.BaseCommand(name: str, callback: Callable[[PDBStoreArgumentParser, Any], Any] | Callable[[PDBStoreArgumentParser, ArgumentParser, Any], Any], formatters: Dict[str, Callable[[Any], None]] | None = None)
Bases:
objectBase PDBStore command
- property doc: str
Get action help message
- static init_config(parser: ArgumentParser, single: bool = True) None
Add configuration file command-line option
- init_formatters(parser: ArgumentParser) None
Add formatters command-line options.
- static init_log_file(parser: ArgumentParser) None
Add output log file command-line option
- static init_log_levels(parser: ArgumentParser) None
Add verbosity command-line option
- property method: Callable[[PDBStoreArgumentParser, Any], Any] | Callable[[PDBStoreArgumentParser, ArgumentParser, Any], Any]
Get action method
- property name: str
Get action name
PDBStoreCommand
- class pdbstore.cli.command.PDBStoreCommand(cb: Callable[[PDBStoreArgumentParser, Any], Any], group: str | None = None, formatters: Dict[str, Callable[[Any], None]] | None = None, callback_name: str | None = None)
Bases:
BaseCommandMain PDBStore command object
- add_subcommand(subcommand: PDBStoreSubCommand) None
Register new sub-command
- property group: str
Gets group name.
- run(*args: Any) None
Parse and execute requested command
PDBStoreSubCommand
- class pdbstore.cli.command.PDBStoreSubCommand(cb: Callable[[PDBStoreArgumentParser, ArgumentParser, Any], Any], formatters: Dict[str, Callable[[Any], None]] | None = None)
Bases:
BaseCommandPDBStore sub-command
- parser: ArgumentParser
- run(parent_parser: PDBStoreArgumentParser, *args: object) None
Execute the sub-command
- set_name(parent_name: str) None
Set sub-command name
- set_parser(subcommand_parser: Any) None
Set the associated parser