silo.low_code.framework.registrar module

class silo.low_code.framework.registrar.ActionRegistrar

Bases: object

Available steps for the Snippet Framework to consume

The registrar keeps track of all registered Syntax and Steps. This allows the Snippet Framework to quickly lookup the information related to a step.

static get_groups()

Return all registered groups

Return type

dict

static get_step_arg_required(name)

Lookup if a step requires at least one argument

Parameters

name (str) – Name of the step to lookup

Return type

bool

static get_step_class(name)

Lookup the callable for a given step name

Determine the function to call for the step. If the call fails and its not looking in the universal namespace, perform another lookup in the universal space for the step. During the nested lookup log-messages will not be displayed.

Parameters

name (str) – Name of the step to lookup

Returns

Callable for the step

Return type

callable

static get_step_class_desc(name)

Lookup the description for a given step name

Parameters

name (str) – Name of the step to lookup

Returns

Description for the given step

Return type

str

static get_step_info(name)

Get information for a step

Parameters

name (str) – Name of the step to lookup

Returns

Information regarding the registered step

Return type

silo.low_code.framework.decorators.registered_step

static get_step_metadata(name)

Lookup the metadata for a given step

Returns

Metadata for the step

Return type

dict

static get_step_req_id(name)

Lookup the callable for the request_id for a given step name

Parameters

name (str) – Name of the step to lookup

Returns

Callable for the step’s get_request_id

Return type

callable

static get_step_required_args(name)

Get any required action_args for a step

Parameters

name (str) – Name of the step to lookup

Returns

Required action_args for the step

Return type

list

static get_steps_count()

Return the count of registered steps

Return type

int

static register_step(registered_step)

Registers a step to be utilized by the framework

Parameters

registered_step (silo.low_code.framework.decorators.registered_step) – Information related to the step to be registered

static reset()
silo.low_code.framework.registrar.add_group_descr(group, descr)

Adds a description for a group

Parameters
  • group (str) – Name of the group

  • descr (str) – Description of the group

silo.low_code.framework.registrar.auto_import_steps(namespace=None)

Import register all steps within a given namespace

Parameters

namespace (str) – Namespace to check for submodules. This must be a valid namespace or the lookup will fail. Default: silo.low_code_steps

silo.low_code.framework.registrar.get_non_syntax_names()

Get all registered step names that are not Syntax

Return type

list

silo.low_code.framework.registrar.get_non_syntax_steps()

Get all registered steps that are not Syntax

Return type

list

silo.low_code.framework.registrar.get_syntax_steps()

Get all available Syntax steps

Return type

list

silo.low_code.framework.registrar.register_steps(registration_sections)

Register any steps from decorators into the framework