Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Read simple .ini/configuration files.

Project Description

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


import os
import sys

from tini import Tini

filenames = [
    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)


buzz = false

import settings

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

Release History

This version
History Node


History Node


History Node


History Node


History Node


Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(4.3 kB) Copy SHA256 Hash SHA256
Wheel py2.py3 May 6, 2015
(3.0 kB) Copy SHA256 Hash SHA256
Source None May 6, 2015

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers