.. -*- coding: utf-8; indent-tabs-mode: nil; -*-

Package API Documentation
=========================

.. contents::
   :local:

Package :mod:`configmix`
------------------------

.. automodule:: configmix
   :members:
   :ignore-module-all:


Module :mod:`configmix.compat`
------------------------------

.. automodule:: configmix.compat
   :members:
   :undoc-members:


Module :mod:`configmix.config`
------------------------------

.. automodule:: configmix.config
   :ignore-module-all:

   .. autoclass:: Configuration
      :members:
      :exclude-members: getvar, py_getvar, fast_getvar,
                        getvar_s, py_getvar_s, fast_getvar_s,
                        getvarl, py_getvarl, fast_getvarl,
                        getvarl_s, py_getvarl_s, fast_getvarl_s,
                        interpolate_variables, py_interpolate_variables,
                        fast_interpolate_variables
      :undoc-members:
      :special-members: __getitem__, __getattr__, __contains__

      .. method:: getvar

         For documentation and the signature see :meth:`py_getvar`.

         This method is an alias of :func:`py_getvar` or
         :func:`fast_getvar` -- depending on the availability of the
         :mod:`configmix._speedups` module.

      .. automethod:: py_getvar

         Pure-Python implementation.

      .. method:: fast_getvar

         Implemented in C in :mod:`configmix._speedups`.

      .. method:: getvar_s

         For documentation and the signature see :meth:`py_getvar_s`.

         This method is an alias of :func:`py_getvar_s` or
         :func:`fast_getvar_s` -- depending on the availability of the
         :mod:`configmix._speedups` module.

      .. automethod:: py_getvar_s

         Pure-Python implementation.

      .. method:: fast_getvar_s

         Implemented in C in :mod:`configmix._speedups`.

      .. method:: getvarl

         For documentation and the signature see :meth:`py_getvarl`.

         This method is an alias of :func:`py_getvarl` or
         :func:`fast_getvarl` -- depending on the availability of the
         :mod:`configmix._speedups` module.

      .. automethod:: py_getvarl

         Pure-Python implementation.

      .. method:: fast_getvarl

         Implemented in C in :mod:`configmix._speedups`.

      .. method:: getvarl_s

         For documentation and the signature see :meth:`py_getvarl_s`.

         This method is an alias of :func:`py_getvarl_s` or
         :func:`fast_getvarl_s` -- depending on the availability of the
         :mod:`configmix._speedups` module.

      .. automethod:: py_getvarl_s

         Pure-Python implementation.

      .. method:: fast_getvarl_s

         Implemented in C in :mod:`configmix._speedups`.

      .. method:: interpolate_variables

         For documentation and the signature see
         :meth:`py_interpolate_variables`.

         This method is an alias of :func:`py_interpolate_variables`
         or :func:`fast_interpolate_variables` -- depending on the
         availability of the :mod:`configmix._speedups` module.

      .. automethod:: py_interpolate_variables

         Pure-Python implementation.

      .. method:: fast_interpolate_variables

         Implemented in C in :mod:`configmix._speedups`.

   .. autoclass:: CoercingMethodsMixin
      :members:
      :undoc-members:

   While not instantiable directly, but only by
   :meth:`Configuration.jailed`, the API use will want to know its interface:

   .. autoclass:: _JailedConfiguration
      :members:
      :undoc-members:
      :special-members: __getitem__, __getattr__, __len__, __bool__, __iter__, __contains__

   Some public helper functions:

   .. function:: quote

      For documentation and the signature see :func:`py_quote`.

      This function is an alias of :func:`py_quote` or
      :func:`fast_quote` -- depending on the availability of the
      :mod:`configmix._speedups` module.

   .. function:: fast_quote

      Implemented in C in :mod:`configmix._speedups`.

   .. autofunction:: py_quote

      Pure-Python implementation.

   .. function:: unquote

      For documentation and the signature see :func:`py_unquote`.

      This function is an alias of :func:`py_unquote` or
      :func:`fast_unquote` -- depending on the availability of the
      :mod:`configmix._speedups` module.

   .. function:: fast_unquote

      Implemented in C in :mod:`configmix._speedups`.

   .. autofunction:: py_unquote

      Pure-Python implementation.

   .. function:: pathstr2path

      For documentation and the signature see :func:`py_pathstr2path`.

      This function is an alias of :func:`py_pathstr2path` or
      :func:`fast_pathstr2path` -- depending on the availability of
      the :mod:`configmix._speedups` module.

   .. function:: fast_pathstr2path

      Implemented in C in :mod:`configmix._speedups`.

   .. autofunction:: py_pathstr2path

      Pure-Python implementation.


Module :mod:`configmix.constants`
---------------------------------

.. automodule:: configmix.constants
   :members:


Module :mod:`configmix.ini`
---------------------------

.. automodule:: configmix.ini
   :members:
   :ignore-module-all:


Module :mod:`configmix.json`
----------------------------

.. automodule:: configmix.json
   :members:
   :ignore-module-all:


Module :mod:`configmix.py`
--------------------------

.. automodule:: configmix.py
   :members:
   :ignore-module-all:


Module :mod:`configmix.toml`
----------------------------

.. automodule:: configmix.toml
   :members:
   :ignore-module-all:


Module :mod:`configmix.variables`
---------------------------------

.. automodule:: configmix.variables
   :members:
   :ignore-module-all:


Module :mod:`configmix.yaml`
----------------------------

.. automodule:: configmix.yaml
   :members:
   :ignore-module-all:


Module :mod:`configmix._speedups`
---------------------------------

.. module:: configmix._speedups
   :synopsis: Optional alternate implementations for some functions
              in C using Python's C-API

    This module is implemented in C using Python's C-API.
    It contains alternate implementations for some heavily used
    functions and/or methods. The module functions are not supposed to be
    called directly. Their signatures may or may not match their
    pure-Python equivalents because they may be called by appropriate
    tiny Python wrappers.

    This module is optional.

    The module is only available for CPython >= 3.7 and uses its stable API.
