Metadata-Version: 2.1
Name: tini
Version: 4.0.0
Summary: Read simple .ini/configuration files.
Home-page: https://github.com/beaugunderson/python-tini
Author: Beau Gunderson
Author-email: beau@beaugunderson.com
License: MIT
Keywords: config,configuration,ini
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: POSIX
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Utilities
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Description-Content-Type: text/markdown
Requires-Dist: configparser>=3.5.0b2
Requires-Dist: six>=1.10.0

## tini

A simple module for loading `.ini`-style configuration files.

Based on [ConfigParser][configparser] and works in Python 2 and Python 3.

[configparser]: https://docs.python.org/3/library/configparser.html

### Running tests

```bash
$ py.test
```

Or, with `tox` (test with multiple Python versions):

```bash
$ tox
```

### Example

#### settings.py

```python
import os
import sys

from tini import Tini

filenames = [
    './foobar.ini',
    os.path.join(os.path.expanduser('~'), '.foobar.ini'),
    os.path.join(os.path.expanduser('~'), '.config', '.foobar.ini'),
]

defaults = {
    'foobar': {
        'baz': 'a string',
        'buzz': True,
        'bizz': 123,
    }
}

sys.modules[__name__] = Tini(filenames, defaults=defaults)
```

#### foobar.ini

```
[foobar]
buzz = false
```

#### test.py

```python
import settings

assert settings.foobar['baz'] == 'a string'
assert settings.foobar['buzz'] is False
assert settings.foobar['baz'] == 123
```
