Reads key-value pairs from a .env file and can set them as environment variables. It helps in developing applications following the 12-factor principles.
Full Changelog: https://github.com/theskumar/python-dotenv/compare/v1.0.0...v1.0.1
Full Changelog: https://github.com/theskumar/python-dotenv/compare/v0.21.1...v1.0.0
get
and list
commands when env file can't be opened (#441 by @bbc2)magic
(#440 by @bbc2)Full Changelog: https://github.com/theskumar/python-dotenv/compare/v0.21.0...v0.21.1
load_dotenv
function now returns False
. (#388 by @larsks)open
instead of io.open
. (#389 by @rabinadk1)parse_it
to Related Projects by (#410 by @naorlivne)Full Changelog: https://github.com/theskumar/python-dotenv/compare/v0.20.0...v0.21.0
set_key
by @bbc2 in https://github.com/theskumar/python-dotenv/pull/361
Full Changelog: https://github.com/theskumar/python-dotenv/compare/v0.19.1...v0.19.2
Full Changelog: https://github.com/theskumar/python-dotenv/compare/v0.19.0...v0.19.1
dotenv_path
argument of set_key
and unset_key
now has a type of Union[str, os.PathLike]
instead of just os.PathLike
(#347 by @bbc2).stream
argument of load_dotenv
and dotenv_values
can now be a text stream (IO[str]
), which includes values like io.StringIO("foo")
and open("file.env", "r")
(#348 by @bbc2).ValueError
if quote_mode
isn't one of always
, auto
or never
in set_key
(#330 by @bbc2).set_key
or dotenv set <key> <value>
(#330 by @bbc2):
auto
mode, don't add quotes if the value is only made of alphanumeric characters (as determined by string.isalnum
).