pyshell

class PimlicoPythonShellContext[source]

Bases: object

A class used as a static global data structure to provide access to the loaded pipeline when running the Pimlico Python shell command.

This should never be used in any other context to pass around loaded pipelines or other global data. We don’t do that sort of thing.

class PythonShellCmd[source]

Bases: pimlico.cli.subcommands.PimlicoCLISubcommand

command_name = 'python'
command_help = 'Load the pipeline config and enter a Python interpreter with access to it in the environment'
add_arguments(parser)[source]
run_command(pipeline, opts)[source]
get_pipeline()[source]

This function may be used in scripts that are expected to be run exclusively from the Pimlico Python shell command (python) to get hold of the pipeline that was specified on the command line and loaded when the shell was started.

exception ShellContextError[source]

Bases: Exception