The py-capellambse REPL

capellambse

capellambse [OPTIONS] COMMAND [ARGS]...

repl

Launch a REPL for exploring Capella models.

You can use this command to quickly launch an interactive Python interpreter and load a model.

If the readline module is available, the interpreter spawned from this script uses a separate readline history. It is located in $XDG_STATE_HOME/capellambse on proper operating systems and in the capellambse cache directory on others.

It can be used as simply as:

capellambse repl <MODEL>

However, while developing capellambse itself, it may be beneficial to additionally set some global interpreter flags:

python -Xdev -Xfrozen_modules=off -m capellambse repl <MODEL>

This will ensure that development related warnings like DeprecationWarning are enabled, and ensure that attached debuggers won’t miss any breakpoints.

In addition to the standard Python builtins, the environment in the REPL also provides a few convenience imports and helper functions, which will be listed right before the first prompt. Further information may be obtained using the help() builtin.

capellambse repl [OPTIONS] MODEL

Options

--disable-diagram-cache

Disable the diagram cache, if one was defined for the model

--dump

Dump model info as JSON to stdout and exit

--hold, --no-hold

Inhibit automatic model updates (update_cache=False)

--wipe, --no-wipe

Wipe the cache (disable_cache=True)

Arguments

MODEL

Required argument