:tocdepth: 3 :py:mod:`gws.config.parser` =========================== .. py:module:: gws.config.parser .. autoapi-nested-parse:: Configuration parser. Convert configuration files (in different formats) or row config dicts into ``gws.Config`` objects by validating them against the specs. **Source code:** :source:`gws.config.parser` Module Contents --------------- .. py:data:: CONFIG_PATH_PATTERN :value: '\\.(py|json|yaml|cx)$' .. py:function:: parse_app_dict(dct: dict | gws.Data, path: str, ctx: gws.ConfigContext) -> Optional[gws.Config] Parse application configuration given as python dict. :param dct: Dictionary containing the application configuration. :param path: Path to the configuration file (for error reporting). :param ctx: Configuration context. .. py:function:: parse_app_from_path(path: str, ctx: gws.ConfigContext) -> Optional[gws.Config] Parse application configuration from a path. :param path: Path to the application configuration file. :param ctx: Configuration context. .. py:function:: parse_dict(dct: dict | gws.Data, path: str, as_type: str, ctx: gws.ConfigContext) -> Optional[gws.Config] Parse a configuration given as python dict. :param dct: Dictionary containing the configuration. :param path: Path to the configuration file (for error reporting). :param as_type: Type of the configuration. :param ctx: Configuration context. .. py:function:: parse_from_path(path: str, as_type: str, ctx: gws.ConfigContext) -> Optional[gws.Config] Parse a configuration from a path. :param path: Path to the configuration file. :param as_type: Type of the configuration (e.g., 'gws.base.application.core.Config'). :param ctx: Configuration context. .. py:function:: read_from_path(path: str, ctx: gws.ConfigContext) -> Optional[dict] Read a configuration file from a path, parse config formats. :param path: Path to the configuration file. :param ctx: Configuration context.