CLI
elva.apps.server.cli
CLI definition.
Functions:
-
resolve_persistence–Derive path and persistence value from the
persistentCLI option. -
cli–Run a WebSocket server.
Attributes:
-
APP_NAME–The name of the app.
APP_NAME = 'server'
module-attribute
The name of the app.
resolve_persistence(ctx, param, persistent)
Derive path and persistence value from the persistent CLI option.
It sets an additional path parameter in the context.
Parameters:
-
ctx(Context) –the context of the current invokation.
-
param(Parameter) –the option parameter object.
-
persistent(bool | str) –the value passed from the CLI.
Returns:
-
bool–the derive persistence flag.
Source code in src/elva/apps/server/cli.py
cli(config, *args, **kwargs)
Run a WebSocket server.
Parameters:
-
config(dict) –the merged configuration parameters from CLI and files.
-
args(tuple, default:()) –unused positional arguments.
-
kwargs(dict, default:{}) –parameters passed from the CLI.