5 ms·
Last few years I was playing with configuration files and my final thought was always, why not to have a Python module imported for configuration just like Djan
by adontz 4y ago
Last few years I was playing with configuration files and my final thought was always, why not to have a Python module imported for configuration just like Django does?
Sometimes I need to substitute variables.
Sometimes I need to generate similar blocks from templates.
Sometimes I need to read part of configuration from environment variable.
Simply importing Python module was always easier.
- mixmastamyk 4y agoIt works quite well until you need a non-developer to change it. Or not using Python, or multiple technologies.
- adontz 4y agoSo you believe there are engineers who can edit YAML, but cannot edit Python? Terraform introduced a brand new language, Pulumi uses JavaScript. strictyaml website has examples in Python, that's why Python.
- mixmastamyk 4y agonon-developer
- adontz 4y agoWho are these non developers who can edit YAML but not Python?
- mixmastamyk 4y agoEveryone. They might be able to handle foo = "bar", but some will not be able to handle the quotes, or understand the difference between 123 or "123". If you use anything else from Python lang they drop like flies. def? loop? Out of the question. I've even seen so-called IT people not able to handle scripting. .ini files are about the only thing you can count on, (almost) guaranteed that a non-developer can handle.