Environs

Latest version: v11.0.0

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

Scan your dependencies

Page 3 of 8

9.3.0

Deprecations:

- Rename `subcast_key` argument of `env.dict` to `subcast_keys`
for consistency with `subcast_values`. `subcast_key` is deprecated.

9.2.0

Features:

- Add time parser ([191](https://github.com/sloria/environs/issues/191)).

9.1.0

Features:

- Add `enum` parser ([185](https://github.com/sloria/environs/pull/185)).
- Add `delimiter` param to `env.list`
([184](https://github.com/sloria/environs/pull/184)).

Thanks [tomgrin10](https://github.com/tomgrin10) for the PRs.

Bug fixes:

- Loosen `ParserMethod` typing ([186 (comment)](https://github.com/sloria/environs/issues/186#issuecomment-723163520)).
Thanks [hukkinj1](https://github.com/hukkinj1) for the PR.

Other changes:

- When using deferred validation (`eager=False`), parser methods return `None`
for missing or invalid values.
_Note_: This may break code that depended on parser methods returning `marshmallow.missing`,
but this behavior was not documented nor tested and therefore is not considered public API.

9.0.0

- _Backwards-incompatible_: Rename `subcast` param of `env.dict` to `subcast_values` for consistency with `subcast_keys`.
- _Backwards-incompatible_: Remove variable proxying. Use variable expansion instead (see 8.1.0 release notes below)
([175](https://github.com/sloria/environs/issues/175)).
- _Backwards-incompatible_: Drop support for marshmallow 2 and Python 3.5,
which are both EOL ([174](https://github.com/sloria/environs/issues/174)).

8.1.0

Features:

- Add support for variable expansion, e.g. `MY_VAR=${MY_OTHER_VAR:-mydefault}` ([164](https://github.com/sloria/environs/issues/164)).
Thanks [gnarvaja](https://github.com/gnarvaja) for the PR.

Deprecations:

- Variable proxying using the `{{VAR}}` syntax is deprecated
and will be removed in environs 9.0.0.
Use variable expansion using `${VAR}` instead.

bash
Before
export MAILGUN_LOGIN=sloria
export SMTP_LOGIN={{MAILGUN_LOGIN}}

After
export MAILGUN_LOGIN=sloria
export SMTP_LOGIN=${MAILGUN_LOGIN}


python
from environs import Env

env = Env(expand_vars=True)

SMTP_LOGIN = env.str("SMTP_LOGIN") => 'sloria'


Bug fixes:

- Fix deferred validation behavior for `dj_db_url`, `dj_email_url`, `dj_cache_url`,
and custom parsers ([121](https://github.com/sloria/environs/issues/121)).
Thanks [hukkinj1](https://github.com/hukkinj1) for reporting.

Other changes:

- Test against Python 3.9.
- Remove usage of implicit `typing.Optional` ([171](https://github.com/sloria/environs/issues/171)).

8.0.0

Bug fixes:

- Fix behavior of recurse=True when custom filepath is passed to `env.read_env`
([100](https://github.com/sloria/environs/issues/100)). Thanks [ribeaud](https://github.com/ribeaud) and [timoklimmer](https://github.com/sloria/environs/pull/157) for the help.

Other changes:

- _Backwards-incompatible_: As a result of the above fix, passing a directory to `env.read_env` is no longer allowed and will raise a `ValueError`.
Only file paths or file names should be passed.

Page 3 of 8

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.