bec_widgets.cli.generate_cli#
Classes#
Functions#
|
Dummy function for Python versions before 3.11. |
|
Main entry point for the script, controlled by command line arguments. |
Module Contents#
- class ClientGenerator(base=False)#
- static _get_user_access_entries(cls) list[str]#
- static _resolve_method_object(cls, method_entry: str)#
- _rpc_call(timeout_info: dict[str, float | None])#
Decorator to mark a method as an RPC call. This is used to generate the client code for the method.
- generate_client(class_container: bec_widgets.utils.plugin_utils.BECClassContainer)#
Generate the client for the published classes, skipping any classes that have RPC = False.
- Parameters:
class_container – The class container with the classes to generate the client for.
- generate_content_for_class(cls)#
Generate the content for the class.
- Parameters:
cls – The class for which to generate the content.
- write(file_name: str)#
Write the content to a file, automatically formatted with black.
- Parameters:
file_name (str) – The name of the file to write to.
- write_client_enum(published_classes: list[type])#
Write the client enum to the content.
- content = ''#
- header = Multiline-String#
Show Value
"""# This file was automatically generated by generate_cli.py # type: ignore from __future__ import annotations from bec_lib.logger import bec_logger from bec_widgets.cli.rpc.rpc_base import RPCBase, rpc_call, rpc_timeout logger = bec_logger.logger # pylint: skip-file"""
- get_overloads(_obj)#
Dummy function for Python versions before 3.11.
- main()#
Main entry point for the script, controlled by command line arguments.