New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Community Meeting Meta Issue [BREAKING CHANGES] #354
Comments
|
Hi Bruno Let me comment first bullet: right now it is very simple: you simply adding 'import dynaconf' in each module where you want to use settings, and then, referring to parameters through settings.SOMETHING. With this change, will I have to declare settings object.. in every module? every function? It seems difficult, especially because my app changing values of parameters sometimes - then an object declared somewhere will miss these changes.. Or am I wrong? |
|
@And2Devel hi, the idea is that somewhere in your project you create your own main settings object. program/config.py from dynaconf import Dynaconf
settings = Dynaconf(**options)then in other parts of your program you just import |
|
OK, I see. If yes, then it is very similar to use of a standard python dictionary, declared in config.py, and at least for me, a value of dynaconf drops - I like the way how simple is using dynaconf 2.x.. |
|
@And2Devel no, you don't need to use |
|
in insights-qe we pretty much completely try to avoid the global variable and try to set up multiple own instances per "application object" - we collect settings files from a number of python package data folders and want to grow the ability to easyly create views to a specifiv settings instance with overrides layered on top |
|
Dynaconf Community Meeting is going to happen on Thursday June 11 Add to Google Calendar: https://calendar.google.com/calendar/event?eid=NTJiZDJoY2M1MDg2bWJwcWJjcjV1MTBvNWcgNGlrZm5rbTdmb25namFuMWhlcHNxYm5nbnNAZw&ctz=America/Sao_Paulo Participate in the meeting: https://meet.google.com/xyh-jrcv-phz Watch it public on: https://twitch.tv/codeshow Topics: #354 |
|
@rochacbruno it seems like both the add to calendar and the timezone links dont work for me, i'll retry in a bit |
|
@rochacbruno same for me |
|
It's like a one time link |
|
Dynaconf COmmunity meeting is recorded here: Available for 60 days: https://www.twitch.tv/videos/647819477?t=00h06m20s |
|
the version 3.0.0 is implementing the main changes:
"Explicit is better than implicit" |
|
All the changes discussed on this issue has been implemented! Details on https://github.com/rochacbruno/dynaconf/blob/master/3.x-release-notes.md Pre release |
Let's discuss the breaking changes coming on Dynaconf 3.0.0 https://doodle.com/poll/ke2g4kc6mzwgtavh
There are some issues still opened for 3.0 https://github.com/rochacbruno/dynaconf/milestone/9
The highlights to be discussed are:
Global
settingsobject is going to be deprecatedUsers must create their own instance of dynaconf
Deprecate
New recommended way
reason
Most users are confused about importing direct from dynaconf a singleton config object and when
customizations via
**optionsare needed they have to change the whole codebase.No more default file paths
Right now Dynaconf loads all files named
settings.*idea is making it explicit only via option
settings_files=[list of paths or globs]e.g:
reason
Debugging file loading is hard, permissions and other I/O problems may happen
idea is to make explicit and raise earlier for errors.
Envless mode will be default
Now dynaconf has an
envless_mode, which means it can loadall variables direct from the main level of a file.
This will be the default and if needed users will provide the
list of environments.
then
Allow parser to be changed or disabled
Right now
tomlis the only parser for every variable,idea is to make it configurable (and allow users to opt-out)
reason
Some users reported that wanted raw values instead of parsed
by toml.
dotenv will be disabled by default
No more loading of
.envunless users explicitly enables it.reason
In some environments dotenv is already loaded by the shell tool
Validators will fire by default if passed to the settings object
No need to explicity call settings.validators.validate()
if
Dynaconf(validators=[...])is passed it will be calledright after the initialization.
Remove logging completely
reason
It is easier to debug using pdb/ipdb, logging right now is
useless.
Allow Pydantic BaseModels as validators
The text was updated successfully, but these errors were encountered: