Skip to content

Config reader

mongorunway.application.ports.config_reader ¤

__all__: typing.Sequence[str] = ('ConfigReader') module-attribute ¤

ConfigReader ¤

Bases: abc.ABC

Source code in mongorunway\application\ports\config_reader.py
class ConfigReader(abc.ABC):
    __slots__ = ()

    @classmethod
    @abc.abstractmethod
    def from_application_name(cls, application_name: str, /) -> ConfigReader:
        ...

    @abc.abstractmethod
    def read_config(
        self,
        config_filename: typing.Optional[str] = None,
    ) -> typing.Optional[config.Config]:
        ...

__slots__ = () instance-attribute class-attribute ¤

from_application_name(application_name) classmethod abstractmethod ¤

Source code in mongorunway\application\ports\config_reader.py
@classmethod
@abc.abstractmethod
def from_application_name(cls, application_name: str, /) -> ConfigReader:
    ...

read_config(config_filename=None) abstractmethod ¤

Source code in mongorunway\application\ports\config_reader.py
@abc.abstractmethod
def read_config(
    self,
    config_filename: typing.Optional[str] = None,
) -> typing.Optional[config.Config]:
    ...