Sample config:
# a value is set with: key : value
# values are typed. allowed types are:
# - string (simple or double quotes)
# - boolean (True or False. is case sensitive)
# - integer
strval : 'this is a string'
boolval: True
intval : 142
# you can define hierarchies with dictionaries
# ! no comma to se
orgchart : {
boss : 'Mr Goldmine'
head_office : {
VP : 'Miz dho'
CTO : 'John Bugs'
}
}
Loaded from python:
>>> import pyerconf
>>> cfg = pyerconf.Config('./sample.cfg')
>>> print cfg.strval
this is a string
>>> print cfg.orgchart.boss
Mr Goldmine
>>> print cfg.orgchart.head_office
{'VP': 'Miz dho', 'CTO': 'John Bugs'}
>>> print cfg.foobar
AttributeError
Release files for pyerconf 0.1.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 | |
|---|---|---|---|
| pyerconf-0.1.0.tar.gz | 16.0 kB | Details |
Release files / pyerconf-0.1.0.tar.gz
| Download URL | pyerconf-0.1.0.tar.gz |
|---|---|
| Size | 16.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f724cd5b485ef540a0deac3a20e16cae134f8163d8ff31ff1599eaf23aacdf08
|
|
BLAKE2b-256 checksum How to use checksums |
b6f0eea5a19a8d2d1ea462b03e6d85c27e3052f6b5c3b676a538fcf35dcceda5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |