caspia.meadow.cli package

Submodules

caspia.meadow.cli.shell module

class caspia.meadow.cli.shell.Shell(consumer_conn, command=None)[source]

Bases: object

METADATA_TYPES = {'friendly-name': <class 'str'>, 'join-with-room': <class 'str'>}
complete_characteristic_name(document, complete_event, service_name, cmd)[source]
complete_listen(document, complete_event)[source]
complete_read(document, complete_event)[source]
complete_service_and_characteristic(document, complete_event, cmd)[source]
complete_service_name(document, complete_event)[source]
complete_write(document, complete_event)[source]
async do_help(_)[source]

help Print this message.

async do_list_services(_)[source]

list-services List all available services.

async do_listen(arg)[source]

listen [filter] Listen for characteristic notifications. Filter may include “*” to match any string. Default filter is “*”.

async do_metadata_load_csv(arg)[source]

metadata-load-csv <file-path> Load metadata from a file and write them to meadow.

async do_metadata_store_csv(arg)[source]

metadata-store-csv <file-path> [filter] Load metadata of all service and store them in a file. It is possible to store metadata of some services only using a service-name filter.

async do_read(arg)[source]

read <service> <characteristic> Read characteristic value.

async do_write(arg)[source]

write <service> <characteristic> [value] Write to characteristic. If value is omitted, None will be used.

async get_characteristic_or_inform(service_name, characteristic_name)[source]
async on_services_update(added, removed)[source]
prepare_history()[source]
async run()[source]
property services
async wait_for_service(service_name)[source]
class caspia.meadow.cli.shell.ShellCompleter(shell)[source]

Bases: prompt_toolkit.completion.Completer

create_command_completer()[source]
get_completions(document, complete_event)[source]

Yield Completion instances.

Parameters
  • documentDocument instance.

  • complete_eventCompleteEvent instance.

list_commands()[source]
async caspia.meadow.cli.shell.run_shell(consumer_conn, command=None)[source]

caspia.meadow.cli.utils module

caspia.meadow.cli.utils.measure_time_async(func)[source]

Module contents