Skip to content

TomlProviderBase

Sub classes

Name Children Inherits
TomlRsProvider
anyenv.toml_tools.toml_rs_provider.provider
TOML-RS implementation of the TOML provider interface.
    PytomlppProvider
    anyenv.toml_tools.pytomlpp_provider.provider
    PyTOMLPP implementation of the TOML provider interface.
      RtomlProvider
      anyenv.toml_tools.rtoml_provider.provider
      RTOML implementation of the TOML provider interface.
        TomlLibProvider
        anyenv.toml_tools.tomllib_provider.provider
        TOMLLIB implementation of the TOML provider interface.

          Base classes

          Name Children Inherits
          ABC
          abc
          Helper class that provides a standard way to create an ABC using

          ⋔ Inheritance diagram

          graph TD
            1311279371["base.TomlProviderBase"]
            925645236["abc.ABC"]
            2751680898["builtins.object"]
            925645236 --> 1311279371
            2751680898 --> 925645236

          🛈 DocStrings

          Bases: ABC

          Base class for all TOML providers.

          Source code in src/anyenv/toml_tools/base.py
          class TomlProviderBase(abc.ABC):
              """Base class for all TOML providers."""
          
              @staticmethod
              @abc.abstractmethod
              def load_toml(data: str | bytes | TextIOWrapper | Path) -> Any:
                  """Load TOML data into Python objects."""
          
              @staticmethod
              @abc.abstractmethod
              def dump_toml(
                  data: Any,
                  *,
                  pretty: bool = False,
              ) -> str:
                  """Dump Python objects to TOML string."""
          

          dump_toml abstractmethod staticmethod

          dump_toml(data: Any, *, pretty: bool = False) -> str
          

          Dump Python objects to TOML string.

          Source code in src/anyenv/toml_tools/base.py
          @staticmethod
          @abc.abstractmethod
          def dump_toml(
              data: Any,
              *,
              pretty: bool = False,
          ) -> str:
              """Dump Python objects to TOML string."""
          

          load_toml abstractmethod staticmethod

          load_toml(data: str | bytes | TextIOWrapper | Path) -> Any
          

          Load TOML data into Python objects.

          Source code in src/anyenv/toml_tools/base.py
          @staticmethod
          @abc.abstractmethod
          def load_toml(data: str | bytes | TextIOWrapper | Path) -> Any:
              """Load TOML data into Python objects."""
          

          :fa-brands-github: Show source on GitHub