Enviable

Latest version: v1.0.0

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

Scan your dependencies

1.0.0

^^^^^^

* **Breaking change**: the ``default`` argument of ``env.int``, ``env.text``, etc is now required, rather than defaulting to ``""``.
* Feature: added a ``timedelta`` method to the ``env`` (or ``Environment``) for parsing strings like ``1 day, 10 minutes``.
* Feature: added a ``django_database_url`` method to the ``env`` (or ``Environment``) to allow for reading ``DATABASE_URL`` etc.
* Feature: add a ``print()`` method to the ``env`` (or ``Environment``) to output in ``.env`` or ``.envrc`` format, for easy generation of config files.
* Feature: parse temporal values without Django, as long as Python 3.7+ is available.

0.2.2

^^^^^^
* Bugfix: the ``typing`` module is no longer a hard-dependency, because whilst you have it on py3, you only *might* have it in a py2 environment. See `GitHub issue 2`_

0.2.1

^^^^^^
* Feature: Testing if a key exists in the environment can now be done using ``"KEYNAME" in env``
* Bugfix: using ``env.one_of(key, default="", choices="")`` without providing a custom converter no longer throws a ``TypeError``
* Misc: Updated type hints across the module to keep `mypy`_ happy, and me deeply unhappy.
* Misc: Before executing tests when doing ``python -m enviable``, try and run `mypy`_

0.2.0

^^^^^^
* Bugfix: Resolved issue where by default it wasn't stripping leading/trailing whitespace from incoming strings
* Feature: Added new convienience method ``env.one_of(key, default="", choices="", converter=None)`` for providing a constrainted list of options which are valid.
* Misc: Updated the default converter for iterables to be a ``partial``
* Bugfix: Resolved issue where ``str()`` and ``repr()`` for an ``Environment`` would leave duplicate values in if the same variable is searched for multiple times with different example/default values.

0.1.0

^^^^^
* Initial export

.. _mypy: https://mypy.readthedocs.io/en/latest/
.. _GitHub issue 2: https://github.com/kezabelle/python-enviable/issues/2

Links

Releases

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.