Dynaconf 4.0 changes and ideas #608
Replies: 7 comments 4 replies
-
#TODO: feat in 4.0 - make able writing the configuration values directly to a file. For example - settings["param"] = "key" |
Beta Was this translation helpful? Give feedback.
-
Hi! I'm super excited about this document. Do you have an ETA for something like an alpha release for Dynaconf v4? I've just started seriously looking into Dynaconf (found a YouTube presentation from 2021). The pydantic schema feature looks amazing. We use FastAPI and Pydantic at work. We like the Idk if Dynaconf has this feature, but something cool about Pydantic is community-maintained validators/types, for example The moment the schema-driven Dynaconf lands, I'm going to present it and try to make it our standard at work. Thanks for the work your doing making config easy! |
Beta Was this translation helpful? Give feedback.
-
Pydantic or purely Python types?I have been using Pydantic over purely Python for over 2 years now on a internal SDK and I'm really enjoying the way that the validators and the power to generate OpenAPI 3.1 schemas works. I know that Pydantic in the overall is a little bit slower than dataclass & attr but we have extra validations. I think the bast path on this should be evaluate the trade-off. Keep Box or replace with ChainMap? (how to do that without breaks)I'm all in favor of ChainMap :), but can be trick create a backwards compatibility transformation. YAML must be the preferred format instead of TOML?I do like TOML but i think YAML for multilevel configurations are much easier to read, but that is personal preference. Make TOML parser for envvars optional?If YAML is preferred method then the TOML parser for envvars should be optional . |
Beta Was this translation helpful? Give feedback.
-
Hi together, is there any timeline for the Version 4? Espacially the schema thing would be nice. BR, |
Beta Was this translation helpful? Give feedback.
-
Keyring integration (loader and export) |
Beta Was this translation helpful? Give feedback.
-
UPDATE: WE merged first part of typed.Dynaconf But the implementation is still tech-preview and the final version will be available on 4.0.0 when we finish implementing all the RFCs on https://github.com/dynaconf/dynaconf/issues?q=is%3Aissue+is%3Aopen+label%3Atyped_dynaconf |
Beta Was this translation helpful? Give feedback.
-
I just found dynaconf and we jumped straight onto it for our home brewed configuration files (yaml with JSON Schemas). Thanks. However, I haven't found a way yet to use JSON Schemas (jsonschema) to validate the input using settings.as_dict(internal=False because the return dict still contains internal key(s) (LOAD_DOTENV) and the top-level keys have been changed to upper-case (VERSION, TYPE, DOCUMENTS): Why are top-level keys in upper-case? Is there a way to get a dict that just is the actual settings file with variable substitution etc but otherwise intact? Other than, yaml_only_dict: Dict[str, str] = {
key.lower(): value
for key, value in settings.as_dict().items()
if key != "LOAD_DOTENV" # Exclude LOAD_DOTENV
} |
Beta Was this translation helpful? Give feedback.
-
Dynaconf 4.0
See #608 (comment)
What is Dynaconf
Dynaconf is a configuration management library written in Python, it is designed to provide the following features:
Quick Start
project/config.py
then
project/app.py
NAME
will hold the value of one of thoseIf your CLI app receives arguments it has the highest precedence once you mark it as an
important
key.Then environment variables will rule over anything else.
$ export DYNACONF_KEY=value $ myapp.py
Then if there is no environment variable defined, values coming from services such as config maps, Redis, Vault, Etcd and others.
$ redis-cli set key value $ myapp.py
Then if there is no external service:
Then if there is NO source of configuration, the default values might be used.
Everything explained on https://dynaconf.com works out of the box, no breaking changes (except big / design bug fixes)
💡 Schema and class-based Validation (optional, opt-in)
then
strict=False
(the default) the Schema will be used for validation and parsing, but variables out of the schema will still be loadedstrict=True
only variables defined on the schema will be loadedQuestions
Beta Was this translation helpful? Give feedback.
All reactions