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 details)

Uploaded Source

File details

Details for the file confiskus-1.0.6.tar.gz.

File metadata

  • Download URL: confiskus-1.0.6.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for confiskus-1.0.6.tar.gz
Algorithm Hash digest
SHA256 ca817e8a48dfa4a195c20d2405a313fe2ffc73bca33abe03541a3190b5f34973
MD5 772aee4bbbed9ac06740b7e95fe01cd4
BLAKE2b-256 16cf1ca1b4661c95989c6cfc61b5106759d1c5f7c2bae3a7250450b3431837e8

See more details on using hashes here.

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