Metadata-Version: 2.4
Name: dotdotdot
Version: 1.0.12
Summary: Access application configuration using dot notation
Author-email: Nehar Arora <python@nehar.net>
License-Expression: BSD-2-Clause
Project-URL: Homepage, https://github.com/nehararora/dotdotdot
Project-URL: Issues, https://github.com/nehararora/dotdotdot/issues
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 5 - Production/Stable
Classifier: Topic :: Software Development :: Libraries
Classifier: Intended Audience :: Developers
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: PyYAML>=6.0.2
Provides-Extra: dev
Requires-Dist: pytest>=8.3.4; extra == "dev"
Requires-Dist: pytest-cov>=6.2.1; extra == "dev"
Requires-Dist: pytest-pep8>=1.0.6; extra == "dev"
Requires-Dist: pytest-flake8>=1.3.0; extra == "dev"
Requires-Dist: build>=1.3.0; extra == "dev"
Dynamic: license-file

# dotdotdot

A minimalist python library to access application configuration using dot notation.

----
## Usage
```bash
   (dot3.6) narora@nararombp ~/s/d/tests 𝓝𝓮𝓱𝓪𝓻 > cat test_config.yml
    test:
      nest:
        inty: 1
        stringy: 'string'
        listy: [1]
    (dot3.6) narora@nararombp ~/s/d/tests 𝓝𝓮𝓱𝓪𝓻 > python
    Python 3.6.4 (default, Dec 21 2017, 20:32:22)
    [GCC 4.2.1 Compatible Apple LLVM 7.3.0 (clang-703.0.31)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import dotdotdot as dot
    >>> c = dot.load('test_config.yml')
    >>> type(c)
    <class 'dotdotdot.config.Config'>
    >>> type(c.test)
    <class 'dotdotdot.config.test'>
    >>> type(c.test.nest)
    <class 'dotdotdot.config.nest'>
    >>> type(c.test.nest.inty)
    <class 'int'>
    >>> type(c.test.nest.stringy)
    <class 'str'>
    >>> type(c.test.nest.listy)
    <class 'list'>
    >>> c.test.nest.inty
    1
    >>> c.test.nest.stringy
    'string'
    >>> c.test.nest.listy
    [1]
    >>>
```

----
## Run tests
* Python 2.7
```
(dot2.7) nehar@nehar-macbook ~/D/s/dotdotdot 𝓝𝓮𝓱𝓪𝓻 > pytest
=============== test session starts ===============
platform darwin -- Python 2.7.15, pytest-4.2.0, py-1.7.0, pluggy-0.8.1
rootdir: /Users/nehar/Documents/src/dotdotdot, inifile: pytest.ini
plugins: pep8-1.0.6, flake8-1.0.4
collected 3 items

tests/test_config.py ...                                                                                                                                                                                                                                [100%]

=============== deprecated python version ===============
You are using Python 2.7.15, which will no longer be supported in pytest 5.0
For more information, please read:
  https://docs.pytest.org/en/latest/py27-py34-deprecation.html
=============== 3 passed in 0.10 seconds ===============
(dot2.7) nehar@nehar-macbook ~/D/s/dotdotdot 𝓝𝓮𝓱𝓪𝓻 >
```
* Python 3.7
```
(dot2.7) nehar@nehar-macbook ~/D/s/dotdotdot 𝓝𝓮𝓱𝓪𝓻 > vf activate dot3.7
(dot3.7) nehar@nehar-macbook ~/D/s/dotdotdot 𝓝𝓮𝓱𝓪𝓻 > pytest
/Users/nehar/venvs/dot3.7/lib/python3.7/site-packages/pep8.py:110: FutureWarning: Possible nested set at position 1
  EXTRANEOUS_WHITESPACE_REGEX = re.compile(r'[[({] | []}),;:]')
=============== test session starts ===============
platform darwin -- Python 3.7.1, pytest-4.2.0, py-1.7.0, pluggy-0.8.1
rootdir: /Users/nehar/Documents/src/dotdotdot, inifile: pytest.ini
plugins: pep8-1.0.6, flake8-1.0.4
collected 3 items

tests/test_config.py ...                                                                                                                                                                                                                                [100%]

=============== 3 passed in 0.09 seconds ===============
(dot3.7) nehar@nehar-macbook ~/D/s/dotdotdot 𝓝𝓮𝓱𝓪𝓻 >
```
-----
## Building the wheel
```bash
    (3.6) nehar@mac ~/s/dotdotdot 𝓝𝓮𝓱𝓪𝓻 > python setup.py bdist_wheel
```

----
## Installation
```bash
    (3.6) nehar@mac ~/s/dotdotdot 𝓝𝓮𝓱𝓪𝓻 > pip install dist/dotdotdot-1.0.0-py3-none-any.whl
    Processing ./dist/dist/dotdotdot-1.0.0-py3-none-any.whl 
    Installing collected packages: dotdotdot
    Successfully installed dotdotdot-1.0.0
```
