spmi package#
Subpackages#
- spmi.core package
- Subpackages
- Submodules
- spmi.core.manageable module
ManageableManageable.FileSystemHelperManageable.LoadHelperManageable.MetaDataHelperManageable.destruct()Manageable.from_descriptor()Manageable.from_directory()Manageable.from_directory_unknown()Manageable.is_correct_directory()Manageable.is_correct_meta_data()Manageable.kill()Manageable.register()Manageable.start()Manageable.stateManageable.statusManageable.status_string()Manageable.term()
ManageableExceptionManageableStatusmanageable()
- spmi.core.pool module
- Module contents
- spmi.utils package
Submodules#
spmi.app module#
SPMI application module.
Execute next command to get help message:
$ spmi --help
- class spmi.app.Spmi(args, pm)#
Bases:
objectMain aplication class.
Provides methods to start application.
- Parameters:
args (
dict) –docoptarguments.pm (
spmi.utils.pattern.PatternMatcher) – Pattern matcher.
- class ArgumentsHelper(args)#
Bases:
objectCommand line argument container.
Provides methods to work with
docoptarguments- Parameters:
args (
dict) – Dictionary, returned bydocopt.docopt.
- property debug#
Trueif--debugin options.- Type:
bool
- property is_clean#
True, if should clean.- Type:
bool
- property is_connect#
True, if should connect to task.- Type:
bool
- property is_kill#
True, if should kill.- Type:
bool
- property is_list#
True, if should show list.- Type:
bool
- property is_load#
Trueif should load.- Type:
bool
- property is_start#
True, if should start.- Type:
bool
- property is_status#
True, if should show status.- Type:
bool
- property is_stop#
True, if should stop.- Type:
bool
- property pathes#
List of pathes.
- Type:
listofstr
- property patterns#
List of patterns.
- Type:
listofstr
- property task_id#
ID of task.
- Type:
str
- class ConfigHelper(defaults=None)#
Bases:
objectManages SPMI configuration.
Settings os SPMI are stored in environment variables:
SPMI_PATHis path to SPMI home directory.
- Parameters:
defaults (
Union[dict, None]) – default settings. If None, defaults are set fromDEFAULTSattribute.
- DEFAULTS = {'SPMI_PATH': '~/.spmi'}#
dictDefault SPMI settings.
- load()#
Loads system environment variables.
- Raises:
- property path#
Path to SPMI home directory.
- Type:
pathlib.Path
- clean(patterns)#
Cleans all manageables corresponding to pattern.
- Parameters:
pattern (
str) – Pattern string.
- connect(task_id)#
Prints stdout of task and prints to it stdin.
- Parameters:
task_id (
str) – ID of task to connect.
- execute()#
Execute command from CLI.
- kill(patterns)#
Kills all manageables corresponding to pattern.
- Parameters:
pattern (
str) – Pattern string.
- load(pathes)#
- show_list()#
Prints list of manageables.
- start(patterns)#
Starts all manageables corresponding to pattern.
- Parameters:
pattern (
str) – Pattern string.
- status(patterns)#
Prints status all manageables corresponding to pattern.
- Parameters:
pattern (
str) – Pattern string.
- stop(patterns)#
Stops all manageables corresponding to pattern.
- Parameters:
pattern (
str) – Pattern string.
- spmi.app.VERSION = 'SPMI 0.0.1'#
Version of SPMI
- Type:
str