Skip to main content

INI style files parser with basic inheritance feature.

Project description

Confiskus is ini-file parse helper with simple inheritance feature.

Install

$ pip install confiskus

Usage

Inheritance is accomplished by extends option in default section.

Content of dev_conf.ini.

[default]
extends = base.ini

[webservice]
url = https://localhost:6543

Content of base.ini.

[webservice]
user = web_service_user
password = papluhaogrcalmikrpce
url = https://ws.otherserver.com

Now while reading dev_conf.ini confiskus will pick up also base.ini.

>>> import confiskus
>>> config = confiskus.Confiskus().read('dev_conf.ini')
>>> config.get('webservice', 'url')
'https://localhost:6543'
>>> config.get('webservice', 'user')
'web_service_user'

Project details


Download files

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

Source Distribution

confiskus-1.0.6.tar.gz (3.0 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page