tini
A simple module for loading .ini-style configuration files.
Based on ConfigParser and works in Python 2 and Python 3.
Running tests
$ py.test
Or, with tox (test with multiple Python versions):
$ tox
Example
settings.py
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
import settings
assert settings.foobar['baz'] == 'a string'
assert settings.foobar['buzz'] is False
assert settings.foobar['baz'] == 123
Metadata
Release files for tini 4.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tini-4.0.0.tar.gz | 3.4 kB | Without provenance | Details for tini-4.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tini-4.0.0-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for tini-4.0.0-py2.py3-none-any.whl |
Total release size: 6.8 kB
Release files / tini-4.0.0.tar.gz
| Download URL | tini-4.0.0.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5aafb4c7439834e1e2aceafeab3c3ffa4d26b3b7d07c134c9ff562f599f56908
|
|
BLAKE2b-256 checksum How to use checksums |
59da6dbdaf2bf80e4e19f21dde2f51b5df203b4a3c65f7e1fd11ec4355aeba5a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.13.0
|
Release files / tini-4.0.0-py2.py3-none-any.whl
| Download URL | tini-4.0.0-py2.py3-none-any.whl |
|---|---|
| Size | 3.4 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
cdb3da607abfcacdad4e3ce9dc9cf0cc593e4d4ec2d24229437148804221c5b8
|
|
BLAKE2b-256 checksum How to use checksums |
91a33de3e42f2d5494e2d9ebf71c9412bfc909bbbd56cfe5642aa72a116ea0ff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.13.0
|
Security for tini 4.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.