stormlibpp.stormcli module#

Methods related to using the synapse.tools.storm Storm CLI.

async stormlibpp.stormcli.start_storm_cli(core, outp, opts, onecmd=[])#

Start a synapse.tools.storm.StormCli but with a configurable Cortex.

Adopted from synapse.tools.storm.StormCli.main() and modified to be a standalone function.

This allows us to support HttpCortex based CLIs. Also gives us a convenient way to start a Storm CLI programmatically.

Parameters#

coresynapse.cortex.Cortex

The Cortex object to use for the Storm CLI. This can be a local Cortex, a Telepath proxy to a Cortex, an HttpCortex object, or any Cortex subclass.

outpfile-like object

The output stream for the Storm CLI.

optsdict

A dictionary of options to configure the Storm CLI. See the Synapse documentation on Storm Opts. StormLib++ code uses this to set the view option for the Storm CLI rather than making it a separate param.

onecmdlist, optional

A Storm command to run and exit, by default [].