SaaSHub helps you find the best software and product alternatives Learn more →
Top 23 Python Configuration Projects
-
I kind of built this due to frustrations with Hydra. Hydra is an end to end framework, it locks you into a certain DL project format, it decides logging, model saving and a whole host of things. For example Hydra can do the same config file overwriting that I allow but you have to store the config file with the name config.yaml inside a specific folder. On top of that hydra doesn’t let you return the config file from the main function so you have to put all the major logic in the main function itself (link), the authors claim this is by design. I can find Hydra useful for a mature less experimental project. But in my robotics and ML research, I like being able to write code where I want and integrating it how I want, especially when debugging for which I think this package is useful. TLDR; If you just want the config file functionality use my package, if you want a complete DL project manager use Hydra. While hydra implements this config file functionality, it also adds a lot of restrictions to project structure that you might not like.
-
python-dotenv
Reads key-value pairs from a .env file and can set them as environment variables. It helps in developing applications following the 12-factor principles.
Project mention: Writing unit tests, constants, and source control (GIT) question!? | reddit.com/r/learnpython | 2023-03-25Locally you may want to use a .env file that is also in .gitignore and python-dotenv to auto activate them. Also having an .env.template is also a good idea to help others working on the project know what they need to set in order for things to work.
-
InfluxDB
Access the most powerful time series database as a service. Ingest, store, & analyze all types of time series data in a fully-managed, purpose-built database. Keep data forever with low-cost storage and superior data compression.
-
-
django-environ
Django-environ allows you to utilize 12factor inspired environment variables to configure your Django application.
I used to do this but recently switched to using environment variables and now prefer this approach. Essentially you keep the single settings.py file that is generated with startproject, and use os.environ or os.getenv to set certain settings. Check out the FeedHQ settings.py for an example. I use direnv to automatically set my environment variables on my local machine, but django-environ is a popular alternative.
-
Documentation for python decouple: https://github.com/henriquebastos/python-decouple/ Documentation for smtplib: https://docs.python.org/3/library/smtplib.html
-
CommandlineConfig
A library for users to write (experiment in research) configurations in Python Dict or JSON format, read and write parameter value via dot . in code, while can read parameters from the command line to modify values. 一个供用户以Python Dict或JSON格式编写(科研中实验)配置的库,在代码中用点.读写属性,同时可以从命令行中读取参数配置并修改参数值。
Project mention: Commandline-config: A library for users to write (experiment in research) configurations in Python Dict format, while can read parameters from the command line. 一个供用户以Python Dict或JSON格式编写(科研中实验)配置的库,同时可以从命令行中读取参数。 | reddit.com/r/Python | 2022-09-20 -
you can stick to a subset of YAML syntax (e.g. strictYAML)
-
Sonar
Write Clean Python Code. Always.. Sonar helps you commit clean code every time. With over 225 unique rules to find Python bugs, code smells & vulnerabilities, Sonar finds the issues while you focus on the work.
-
django-split-settings
Organize Django settings into multiple files and directories. Easily override and modify settings. Use wildcards and optional settings files.
-
Project mention: Python scripting - How to hide API static password? | reddit.com/r/networking | 2022-06-15
I recommend this simple library for that purpose
-
You can use Optuna, SMAC or hyperopt
-
-
Project mention: I'm trying to load a JSON file but I get an error. | reddit.com/r/learnpython | 2023-03-09
Yeah, if it were one, maybe pyhocon could handle it easily. I've only used this library as a cli from someone else, but it does its work
-
-
As /u/astatine said, an excellent but under-recognized alternative syntax for configuration files is NestedText, where everything is a string unless the ingesting code says otherwise, and there is no escaping needed ever.
-
-
Project mention: 2022-7-24 TrueCharts catalog charts update | reddit.com/r/Xstar97TheNoob | 2022-07-24
hassconfigurator - Home Assistant online configurator container from https://github.com/danielperna84/hass-configurator
-
platformdirs
A small Python module for determining appropriate platform-specific dirs, e.g. a "user data dir".
Start with pythons “projectdirs”, which refuses to allow mac systems to use XDG or at least have that option.
-
Project mention: [Project] I built a minimal stateless ML project template built on my current favourite stack | reddit.com/r/MachineLearning | 2023-02-02
It provides mature configuration support via [Hydra-Zen](https://github.com/mit-ll-responsible-ai/hydra-zen) and automates configuration generation via [decorators](https://github.com/BayesWatch/minimal-ml-template/blob/af387e59472ea67552b4bb8972b39fe95952dd8a/mlproject/decorators.py#L10) implemented in this repo.
-
parse_it
A python library for parsing multiple types of config files, envvars & command line arguments that takes the headache out of setting app configurations.
-
-
See Konfsave.
-
-
Project mention: Which not so well known Python packages do you like to use on a regular basis and why? | reddit.com/r/Python | 2022-08-26
I use my library AutoRegistry pretty regularly. Its very useful anytime you need to define an interface, which happens to be a lot of projects.
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
Python Configuration related posts
- Writing unit tests, constants, and source control (GIT) question!?
- Config management for deep learning
- Show HN: Lightweight YAML Config CLI for Deep Learning Projects
- Make systemd better for Podman with Quadlet
- Does anybody have issues with AutoKey (GNU/Linux) with GNU/Emacs?
- Need help running Django at a local machine after deploying it
- The YAML Document from Hell
-
A note from our sponsor - #<SponsorshipServiceOld:0x00007f160cc04b98>
www.saashub.com | 27 Mar 2023
Index
What are some of the best open-source Configuration projects in Python? This list will help you:
Project | Stars | |
---|---|---|
1 | hydra | 6,886 |
2 | python-dotenv | 5,767 |
3 | dynaconf | 2,959 |
4 | django-environ | 2,711 |
5 | python-decouple | 2,378 |
6 | CommandlineConfig | 2,001 |
7 | strictyaml | 1,215 |
8 | django-split-settings | 969 |
9 | environs | 954 |
10 | SMAC3 | 813 |
11 | django-dotenv | 541 |
12 | pyhocon | 445 |
13 | confuse | 392 |
14 | nestedtext | 294 |
15 | ConfigObj | 290 |
16 | hass-configurator | 271 |
17 | platformdirs | 232 |
18 | hydra-zen | 172 |
19 | parse_it | 98 |
20 | classyconf | 82 |
21 | konfsave | 42 |
22 | LKI | 31 |
23 | autoregistry | 21 |