caproto.server.template_arg_parser¶
-
caproto.server.
template_arg_parser
(*, desc: str, default_prefix: str, argv: Optional[List[str]] = None, macros: Optional[Dict[str, str]] = None, supported_async_libs: Optional[List[str]] = None) → Tuple[argparse.ArgumentParser, Callable][source]¶ Construct a template arg parser for starting up an IOC
- Parameters
- descriptionstring
Human-friendly description of what that IOC does
- default_prefixstring
- argslist, optional
Defaults to sys.argv
- macrosdict, optional
Maps macro names to default value (string) or None (indicating that this macro parameter is required).
- supported_async_libslist, optional
“White list” of supported server implementations. The first one will be the default. If None specified, the parser will accept all of the (hard-coded) choices.
- Returns
- parserargparse.ArgumentParser
- split_argscallable[argparse.Namespace, Tuple[dict, dict]]
A helper function to extract and split the ‘standard’ CL arguments. This function sets the logging level and returns the kwargs for constructing the IOC and for the launching the server.