I quite like configuration written in Python. Clearly very different beast; but:
1. It’s not YAML (which I agree is dreadful after about 10 LOC)
2. You’re not fighting it. Want to condition the config on something? Just code that up, no need to introduce custom options etc.
3. A basic setup is barely more work than filling up a YAML file, it might even look like basically key=value kind of file.
4. Easier to structure. A big config file in YAML can only ever be a single large file. In Python/code, if you grow a big and complex config, you split it like you would with any regular code.
It is of course less safe to parse a config file than it is to read a YAML one (I guess?) but if you’re then running user code anyway then it probably is no additional security risk.
Clearly, can replace Python with any other language.
1. It’s not YAML (which I agree is dreadful after about 10 LOC)
2. You’re not fighting it. Want to condition the config on something? Just code that up, no need to introduce custom options etc.
3. A basic setup is barely more work than filling up a YAML file, it might even look like basically key=value kind of file.
4. Easier to structure. A big config file in YAML can only ever be a single large file. In Python/code, if you grow a big and complex config, you split it like you would with any regular code.
It is of course less safe to parse a config file than it is to read a YAML one (I guess?) but if you’re then running user code anyway then it probably is no additional security risk.
Clearly, can replace Python with any other language.