caproto.server.ioc_arg_parser¶
- caproto.server.ioc_arg_parser(*, desc: str, default_prefix: str, argv: List[str] | None = None, macros: Dict[str, str] | None = None, supported_async_libs: List[str] | None = None) Tuple[Dict[str, Any], Dict[str, Any]] [source]¶
A reusable ArgumentParser for basic example IOCs.
- 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:
- ioc_optionsdict
kwargs to be handed into the IOC init.
- run_optionsdict
kwargs to be handed to run