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 Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page