Command-Line Usage
The CLI for sphobjinv is implemented using two subcommands:
More information about the underlying implementation of these subcommands can
be found here and in the documentation for the
Inventory object, in particular the
data_file() and
suggest() methods.
Some notes on these CLI docs:
CLI docs examples are executed in a sandboxed directory pre-loaded with objects_attrs.inv (from, e.g., here).
Path(frompathlib) is imported into the namespace before all tests.cli_run is a helper function that enables doctesting of CLI examples by mimicking execution of a shell command. It is described in more detail here.
file_head is a helper function that retrieves the head of a specified file.
The options for the parent sphobjinv command are:
- -h, --help
Show help message and exit
Traceback (most recent call last):
File "/usr/bin/sphobjinv", line 33, in <module>
sys.exit(load_entry_point('sphobjinv==2.3.1.2', 'console_scripts', 'sphobjinv')())
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/bin/sphobjinv", line 25, in importlib_load_entry_point
return next(matches).load()
~~~~^^^^^^^^^
StopIteration
- -v, --version
Print package version & other info
Traceback (most recent call last):
File "/usr/bin/sphobjinv", line 33, in <module>
sys.exit(load_entry_point('sphobjinv==2.3.1.2', 'console_scripts', 'sphobjinv')())
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/bin/sphobjinv", line 25, in importlib_load_entry_point
return next(matches).load()
~~~~^^^^^^^^^
StopIteration