# 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
    WORKER_MAX_RUN_TIME = None
    """Gracefully shutdown worker after running this seconds."""

    WORKER_LOGGING_LEVEL = 'INFO'
    """Logging level of root logger."""

    WORKER_RECONNECT_INTERVAL = 5
    """Number of seconds to wait after a connection error."""

    def from_object(self, obj: Union[str, Any]) -> None:
        """Load values from an object."""
        if isinstance(obj, str):
            obj = importer.import_object_str(obj)

        for key in dir(obj):
            if key.isupper():
                value = getattr(obj, key)
                self._setattr(key, value)

        logger.info("Config is loaded from object: %r", obj)

    def from_dict(self, d: Dict[str, Any]) -> None:
        """Load values from a dict."""
        for key, value in d.items():
            if key.isupper():
                self._setattr(key, value)

        logger.info("Config is loaded from dict: %r", d)

    def from_pymodule(self, name: str) -> None:

# 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

    WORKER_MAX_RUN_TIME = None
    """Gracefully shutdown worker after running this seconds."""

    WORKER_LOGGING_LEVEL = 'INFO'
    """Logging level of root logger."""

    WORKER_RECONNECT_INTERVAL = 5
    """Number of seconds to wait after a connection error."""

    def from_object(self, obj: Union[str, Any]) -> None:
        """Load values from an object."""
        if isinstance(obj, str):
            obj = importer.import_object_str(obj)

        for key in dir(obj):
            if key.isupper():
                value = getattr(obj, key)
                self._setattr(key, value)

        logger.info("Config is loaded from object: %r", obj)

    def from_dict(self, d: Dict[str, Any]) -> None:
        """Load values from a dict."""
        for key, value in d.items():
            if key.isupper():
                self._setattr(key, value)

        logger.info("Config is loaded from dict: %r", d)

    def from_pymodule(self, name: str) -> None:

        module = importer.import_module(name)