# Path: kuyruk/importer.py
# def import_module(name: str) -> ModuleType:
# def import_object(module_name: str, object_name: str) -> Any:
# def import_object_str(s: str) -> Any:
# def main_module_name() -> str:


import os
import ast
import types
import logging
import pkg_resources
import kuyruk  # noqa; required for references in docs
from typing import Dict, Any, Union  # noqa
from kuyruk import importer
        for key, value in locals_.items():
            if (key.isupper() and not isinstance(value, types.ModuleType)):
                self._setattr(key, value)

        logger.info("Config is loaded from file: %s", filename)

    def from_env_vars(self) -> None:
        """Load values from environment variables.
        Keys must start with `KUYRUK_`."""
        for key, value in os.environ.items():
            if key.startswith('KUYRUK_'):
                key = key[7:]
                if hasattr(Config, key):
                    try:
                        value = ast.literal_eval(value)
                    except (ValueError, SyntaxError):
                        pass

                    self._setattr(key, value)

    def _setattr(self, key: str, value: Any) -> None:
        if not hasattr(self.__class__, key):
            raise ValueError("Unknown config key: %s" % key)

        setattr(self, key, value)


# Add additional config keys from extensions.
for entry_point in pkg_resources.iter_entry_points("kuyruk.config"):
    for k, v in entry_point.load().items():

# Path: kuyruk/importer.py
# def import_module(name: str) -> ModuleType:
# def import_object(module_name: str, object_name: str) -> Any:
# def import_object_str(s: str) -> Any:
# def main_module_name() -> str:


# Path: kuyruk/config.py
import os
import ast
import types
import logging
import pkg_resources
import kuyruk  # noqa; required for references in docs
from typing import Dict, Any, Union  # noqa
from kuyruk import importer

        for key, value in locals_.items():
            if (key.isupper() and not isinstance(value, types.ModuleType)):
                self._setattr(key, value)

        logger.info("Config is loaded from file: %s", filename)

    def from_env_vars(self) -> None:
        """Load values from environment variables.
        Keys must start with `KUYRUK_`."""
        for key, value in os.environ.items():
            if key.startswith('KUYRUK_'):
                key = key[7:]
                if hasattr(Config, key):
                    try:
                        value = ast.literal_eval(value)
                    except (ValueError, SyntaxError):
                        pass

                    self._setattr(key, value)

    def _setattr(self, key: str, value: Any) -> None:
        if not hasattr(self.__class__, key):
            raise ValueError("Unknown config key: %s" % key)

        setattr(self, key, value)


# Add additional config keys from extensions.
for entry_point in pkg_resources.iter_entry_points("kuyruk.config"):
    for k, v in entry_point.load().items():

        setattr(Config, k, v)