Introducing Anyfig!
Anyfig is a Python library for creating configurations (settings) at runtime. Anyfig utilizes Python classes which empowers the developer to put anything, from strings to custom objects in the config. Hence the name Any(con)fig.
#
Why Anyfig?Anyfig was developed for my own machine learning experiments but has since generalized to support other types of Python projects. Since the configs are defined in normal Python code, Anyfig offers freedom and flexibility that isn't possible with other solutions.
#
Features in a nutshell- Work in Python. No reading from .json or .yaml (unless you want to)
- Utilize Python code / packages to define configs at runtime
- Avoid duplicated config-parameters with the help of inheritance and modularization
- Override config-values via command line input
- Freeze configs for immutability
- Save / load configs
#
Basic ExampleFeel free to play with the Online Demo hosted by Pyfiddle or start learning about Anyfig in the Fundamentals guide.
#
Citing AnyfigFeel free to cite Anyfig in your research: