Skip to main content
* Synopsis

PROJECT_NAME=yoyodyne
FCGI_PORT=9000
configen.py init.conf.template > yoyodyne.conf

When automating software configuration, one ends up using adhoc templating scheme to
parametrize config files with sed and awk. configen let's you use python's powerful
string formatting to generate config files (or any text for that matter) with
params from various sources.

* Usage
* environment variables
set a bunch of env vars in shell script and invoke from it.
env foo=bar configen template

* name-values fed to stdin
echo foo=bar | configen tempalte -s
env | configen tempalte -s

* json
configen template -j params.json

* yaml
configen template -y params.yaml

* dash '-' can be passed for stdin

* Recpie

* generating from a shell script
--------- genconf.sh
PROJECT_NAME=yoyodyne
PYTHON=/usr/bin/python
PROJECT_ROOT=/home/yoyo/dyne
RUNTIME_ROOT=/home/yoyo/dyne
FCGI_PORT=9000
USER=tengu

configen.py init.conf.t
---------

* generating a config file from makefile
export the variables and run configen as follows:

---------- Makefile
export PROJECT_NAME=yoyodyne
export PYTHON=/usr/bin/python
export PROJECT_ROOT=/home/yoyo/dyne
export RUNTIME_ROOT=/home/yoyo/dyne
export FCGI_PORT=9000
USER=tengu

yoyodyne.conf:
configen.py init.conf.t | tee $@
----------

Metadata

Release files for configen 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for configen 0.0.1
File Size Uploaded Provenance
configen-0.0.1.tar.gz 2.3 kB Without provenance Details

Release files / configen-0.0.1.tar.gz

Download URL configen-0.0.1.tar.gz
Size 2.3 kB
Tags Source
SHA-256 checksum
How to use checksums
05c3224f9b03e3e48f01946d28929e8135df344251572afdee946b54c8533e5f
BLAKE2b-256 checksum
How to use checksums
7187472bfeb04d415c146134d812c7b726f816174285cd57f51f8067da0df821
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for configen 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page