A Python module to read scfg formatted configuration files.
Added tag 0.1.2 for changeset 875f57a264b0
c40cd09e3906 — David Keijser 3 years ago
Add type annotations to public facing API




A Python module to parse scfg formatted configuration files.

It's a simple port of the Go module go-scfg.

Note: Not to be confused with pyscfg which appears to parse configurations into and out of YAML files.


Very simple:

import scfg

conf = scfg.Config("~/your_config.conf")
train = conf.get("train")
train_models = train.get_all("model")


We accept patches submitted via hg email which is the patchbomb extension included with Mercurial.

Please see our contributing document for more information.

The mailing list where you submit your patches is ~petersanchez/public-inbox@lists.code.netlandish.com. You can also view the archives on the web here:


To quickly setup your clone of py-scfg to submit to the mailing list just edit your .hg/hgrc file and add the following:

to = ~petersanchez/public-inbox@lists.code.netlandish.com

flagtemplate = "py-scfg"

git = 1

We have more information on the topic here:

All documentation, libraries, and sample code are Copyright Peter Sanchez <pjs@petersanchez.com>. The library and sample code are made available to you under the terms of the BSD license which is contained in the included file, LICENSE.

#Commercial Support

This software, and lots of other software like it, has been built in support of many of Netlandish's own projects, and the projects of our clients. We would love to help you on your next project so get in touch by dropping us a note at hello@netlandish.com.