@classmethod<EOL><INDENT>def from_mapping(<EOL>cls: Type["<STR_LIT>"], mapping: Optional[Mapping[str, Any]] = None, **kwargs: Any<EOL>) -> "<STR_LIT>":<DEDENT>
mappings: Dict[str, Any] = {}<EOL>if mapping is not None:<EOL><INDENT>mappings.update(mapping)<EOL><DEDENT>mappings.update(kwargs)<EOL>config = cls()<EOL>for key, value in mappings.items():<EOL><INDENT>try:<EOL><INDENT>setattr(config, key, value)<EOL><DEDENT>except AttributeError:<EOL><INDENT>pass<EOL><DEDENT><DEDENT>return config<EOL>
Create a configuration from a mapping.

        This allows either a mapping to be directly passed or as
        keyword arguments, for example,

        .. code-block:: python

            config = {'keep_alive_timeout': 10}
            Config.from_mapping(config)
            Config.form_mapping(keep_alive_timeout=10)

        Arguments:
            mapping: Optionally a mapping object.
            kwargs: Optionally a collection of keyword arguments to
                form a mapping.