Dynaconf

Latest version: v3.2.6

Safety actively analyzes 687918 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 7 of 11

2.0.1

------------------
- Release version 2.0.1. [Bruno Rocha]

Shortlog of commits since last release:

Bruno Rocha (17):

2.0.0

------------------
- Release version 2.0.0. [Bruno Rocha]

Shortlog of commits since last release:

Aaron DeVore (1):
GH-111: Fix MERGE_ENABLED merging settings with themselves

Bruno Rocha (21):
Merge branch 'jperras-merge-multiple-settings-files'
Merge branch 'master' of github.com:rochacbruno/dynaconf
Fix 106 make PROJECT_ROOT_FOR_DYNACONF to work with custom paths
Update dynaconf/utils/boxing.py
Update dynaconf/utils/boxing.py
Add release script and CHANGELOG in place of history.

1.2.1

------------------
- Release version 1.2.1. [Bruno Rocha]

Shortlog of commits since last release:

Bruno Rocha (9):
Merge branch 'jperras-merge-multiple-settings-files'
Merge branch 'master' of github.com:rochacbruno/dynaconf
Fix 106 make PROJECT_ROOT_FOR_DYNACONF to work with custom paths
Update dynaconf/utils/boxing.py
Update dynaconf/utils/boxing.py
Add release script and CHANGELOG in place of history.

1.2.0

------------------
- Release version 1.2.0. [Bruno Rocha]

Shortlog of commits since last release:

Bruno Rocha (6):
Merge branch 'jperras-merge-multiple-settings-files'
Merge branch 'master' of github.com:rochacbruno/dynaconf
Fix 106 make PROJECT_ROOT_FOR_DYNACONF to work with custom paths
Update dynaconf/utils/boxing.py
Update dynaconf/utils/boxing.py
Add release script and CHANGELOG in place of history.

Jaepil Koh (1):
Update django.md

Joel Perras (3):
Allow dotted-path based setting of configuration key/value pairs.
Handle nested includes in settings files.
Remove extraneous lines.

Mantas (3):
Add INSTANCE_FOR_DYNACONF and --instance
Remove mocker fixture
Python 3.4 has different error message

Matthias (1):
Fix small typo in README.md

mspinelli (2):
fixed infinite recursion caused by copy()
add tests for dynabox fix
- Add release script and CHANGELOG in place of history. [Bruno Rocha]
- Add tests for dynabox fix. [mspinelli]
- Update dynaconf/utils/boxing.py. [Bruno Rocha, mspinelli]
- Update dynaconf/utils/boxing.py. [Bruno Rocha, mspinelli]
- Fixed infinite recursion caused by copy() [mspinelli]
- Fix 106 make PROJECT_ROOT_FOR_DYNACONF to work with custom paths.
[Bruno Rocha]

Added example/project_root and entry on Makefile:test_examples
- Update django.md. [Jaepil Koh]

Typo!
- Fix small typo in README.md. [Matthias]
- Merge branch 'master' of github.com:rochacbruno/dynaconf. [Bruno
Rocha]
- Python 3.4 has different error message. [Mantas]
- Remove mocker fixture. [Mantas]

Left this accidentally.

https://travis-ci.org/rochacbruno/dynaconf/jobs/452612532
- Add INSTANCE_FOR_DYNACONF and --instance. [Mantas]

There parameters allows dynaconf to use different LazySettings instance
if project uses one.

Also did some other fixes along the way:

- Added `catch_exceptions=False` to `CliRunner.invoke` in order to
prevent click from swallowing errors silently. This uncovered other
errors in init and validate cli commands.

- Removed module level code execution from cli module. Module level code
execution makes it really difficult to test code. Now cli does not
rely on global state and can be tested properly.

- Removed a code snipper from LazySettings which modified global
default_settings values. This means, that each LazySettings
constructor call has side effects.

- `dynaconf validate` command tests were useless because they didn't
test anything and I found, that `dynaconf validate` command don't even
work and raises ValidationError if there are any validation errors.
Changed that to cli friendly error message.
- Merge branch 'jperras-merge-multiple-settings-files' [Bruno Rocha]
- Remove extraneous lines. [Joel Perras]
- Handle nested includes in settings files. [Joel Perras]

A settings file can include a `dynaconf_include` stanza, whose exact
syntax will depend on the type of settings file (json, yaml, toml, etc)
being used:

toml
[default]
dynaconf_include = ["/absolute/path/to/plugin1.toml", "relative/path/to/plugin2.toml"]
DEBUG = false
SERVER = "www.example.com"


When loaded, the files located at the (relative or absolute) paths in
the `dynaconf_include` key will be parsed, in order, and override any
base settings that may exist in your current configuration.

The paths can be relative to the base `settings.(toml|yaml|json|ini|py)`
file, or can be absolute paths.

The idea here is that plugins or extensions for whatever framework or
architecture you are using can provide their own configuration values
when necessary.

It is also possible to specify glob-based patterns:

toml
[default]
dynaconf_include = ["configurations/*.toml"]
DEBUG = false
SERVER = "www.example.com"


Currently, only a single level of includes is permitted to keep things
simple and straightforward.
- Allow dotted-path based setting of configuration key/value pairs.
[Joel Perras]

You can set a value with an arbitrary number of nested keys, separated
by dots:

python
settings.set('nested_1.nested_2.nested_3.nested_4', 'secret')


And accessing the keys/values with dotted-path lookup behaves as
expected:

python
print(settings.NESTED_1.NESTED_2.NESTED_3.to_dict())


If for some reason you didn't want to have a key parsed into nested
structures delimited by dots and just wanted a key of "foo.bar", you can
disable the parsing with:

python
settings.set('nested_1.nested_2.nested_3.nested_4',
'secret',
dotted_lookup=False)


And accessing keys that don't exist will raise `KeyError`:

python
settings.NESTED_1.NESTED_5

1.1.0

------------------
- Released 1.1.0. [Bruno Rocha]

- Added `MERGE_ENABLED_FOR_DYNACONF` with ability to merge nested dictionaries instead of replacing PR 88
- Support for dot notation to access nested dictionaries like `settings['KEY.OTHER.NESTED.DEEPER']` PR 93
- Support dotted notation for validators PR 98
- Fixed a bug in SETTINGS_MODULE cleanup when `.setenv` method was called PR 97
- Added Python 3.7 to test matrix PR 99
- Fixing new flake8 warnings. [Bruno Rocha]
- Update py.test command in tox to allow passing positional arguments.
[Joel Perras]

The basic, default functionality of running `tox` remains unchanged. You
are now, however, able to pass positional arguments to `py.test` at
invocation time. For example:

bash
tox -- -x --pdb tests/test_basic.py


Which will pass all input after the `--` separator (which is used to
signify the end of possible options to `tox`) down to the `py.test`
command in the `{posargs}` location, as defined in `tox.ini`.
- Enable Python 3.7 env for tox testing. [Joel Perras]
- Enable python 3.7 in TravisCI config. [Joel Perras]
- Updates Missing singleton with __eq__ dunder. (98) [Joël Perras]

Adds some additional tests for the `Missing` class and singleton
instance usage to ensure it returns equality only for comparisons to
itself and not `None`, or `False`, or `True`.
- Merge branch 'jperras-dotted-validators' [Bruno Rocha]
- Updates Missing singleton with __eq__ dunder. [Joel Perras]

Adds some additional tests for the `Missing` class and singleton
instance usage to ensure it returns equality only for comparisons to
itself and not `None`, or `False`, or `True`.
- Implements dotted-path validator name declarations. [Joel Perras]

One is now able to write:

python
settings.validators.register(
Validator('REDIS', must_exist=True, is_type_of=dict),
Validator('REDIS.HOST', must_exist=True, is_type_of=str),
Validator('REDIS.PORT', must_exist=True, is_type_of=int),
)


Which will validate the dotted attributes as nested structures. For
example, in yaml:

yaml
DEFAULT:
REDIS:
HOST: localhost
PORT: 1234


This necessitated a slight but non-negligible change in the
implementation of `Settings.exists()`, which previously did a shallow
check of loaded data. It has now been updated to perform a
`Settings.get()` of the key in question, and compares that to a newly
defined sentinel value to ensure `None` values do not cause a false
negative result.

New tests and assertions have been added to cover the new functionality.
Docs have been updated to show an example of the nested validator name
definition in action.

Closes rochacbruno/dynaconf85.
- Fix 94 setenv cleans SETTINGS_MODULE attribute. [Bruno Rocha]
- Merge branch 'jperras-dot-traversal-access' [Bruno Rocha]
- Merge branch 'dot-traversal-access' of
https://github.com/jperras/dynaconf into jperras-dot-traversal-access.
[Bruno Rocha]
- Allow dot-traversal access to nested dictionaries. [Joel Perras]

A simple memoized recursion has been added to `get()` if the key
contains at least one dot.

The caller can choose to opt-out of this behaviour by specifying the
`dotted_lookup` argument:

python
settings('AUTH.USERNAME', dotted_lookup=False)


While the performance impact of this has not been quantified, the net
impact in any real-world application should be minimal due to typical
nesting levels, and the fact that we overwrite the memoized portion of
the dotted-key lookup on each iteration.

- Avoids regressions [✓]
- Can be opted-out on a per-call basis [✓]
- Minimal performance impact [✓]
- Documented [✓]
- Tested [✓]
- Examples added [✓]

Closes rochacbruno/dynaconf84
- Merge branch 'rsnyman-merge-settings' [Bruno Rocha]
- Add example for merge_configs. [Bruno Rocha]
- Add setting merging. [Raoul Snyman]

- Add the ability to merge nested structures instead of completely overwriting them
- Use monkeypatch to stop one test from interfering with another
- Updated documentation

1.0.6

------------------
- Release 1.0.6. [Bruno Rocha]

Fixed issue 81 - added ENCODING_FOR_DYNACONF to handle different settings files encodings specially on Windows
- Add ENCODING_FOR_DYNACONF to handle different file encoding Fix 81.
[Bruno Rocha]

By default ENCODING_FOR_DYNACONF is utf-8 (recommended to always write settings files in utf-8)
If you need to change the format of settings file set the variable:


export ENCODING_FOR_DYNACONF="cp1252"

Page 7 of 11

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.