fastcs.launch#

fastcs.launch.launch(controller_classes: type[Controller] | list[type[Controller]], version: str | None = None) None[source]#

Serves as an entry point for starting FastCS applications.

By utilizing type hints in each Controller’s __init__ method, this function provides a command-line interface to describe and gather the required configuration before instantiating the application.

Parameters:
  • controller_classes – One or more FastCS Controller classes to make available for instantiation. Each must have a type-hinted __init__ method and no more than 2 arguments. The chosen class for each id is selected by a required type discriminator in the config.

  • version (Optional[str]) – The version of the FastCS application.

Raises:

LaunchError – If a class’s __init__ is not as expected.

Typical usage:
if __name__ == “__main__”:

launch(MyController) # single class launch([MyControllerA, MyControllerB]) # multi-class

fastcs.launch.get_controller_schema(target: type[Controller] | list[type[Controller]]) dict[str, Any][source]#

Gets schema for given controller class(es) for serialisation.