METADATA 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794
  1. Metadata-Version: 2.4
  2. Name: python-dotenv
  3. Version: 1.2.2
  4. Summary: Read key-value pairs from a .env file and set them as environment variables
  5. Author-email: Saurabh Kumar <me+github@saurabh-kumar.com>
  6. License: BSD-3-Clause
  7. Project-URL: Source, https://github.com/theskumar/python-dotenv
  8. Keywords: environment variables,deployments,settings,env,dotenv,configurations,python
  9. Classifier: Development Status :: 5 - Production/Stable
  10. Classifier: Programming Language :: Python
  11. Classifier: Programming Language :: Python :: 3
  12. Classifier: Programming Language :: Python :: 3.10
  13. Classifier: Programming Language :: Python :: 3.11
  14. Classifier: Programming Language :: Python :: 3.12
  15. Classifier: Programming Language :: Python :: 3.13
  16. Classifier: Programming Language :: Python :: 3.14
  17. Classifier: Programming Language :: Python :: Implementation :: PyPy
  18. Classifier: Intended Audience :: Developers
  19. Classifier: Intended Audience :: System Administrators
  20. Classifier: Operating System :: OS Independent
  21. Classifier: Topic :: System :: Systems Administration
  22. Classifier: Topic :: Utilities
  23. Classifier: Environment :: Web Environment
  24. Requires-Python: >=3.10
  25. Description-Content-Type: text/markdown
  26. License-File: LICENSE
  27. Provides-Extra: cli
  28. Requires-Dist: click>=5.0; extra == "cli"
  29. Dynamic: license-file
  30. # python-dotenv
  31. [![Build Status][build_status_badge]][build_status_link]
  32. [![PyPI version][pypi_badge]][pypi_link]
  33. python-dotenv reads key-value pairs from a `.env` file and can set them as
  34. environment variables. It helps in the development of applications following the
  35. [12-factor](https://12factor.net/) principles.
  36. - [Getting Started](#getting-started)
  37. - [Other Use Cases](#other-use-cases)
  38. - [Load configuration without altering the environment](#load-configuration-without-altering-the-environment)
  39. - [Parse configuration as a stream](#parse-configuration-as-a-stream)
  40. - [Load .env files in IPython](#load-env-files-in-ipython)
  41. - [Command-line Interface](#command-line-interface)
  42. - [File format](#file-format)
  43. - [Multiline values](#multiline-values)
  44. - [Variable expansion](#variable-expansion)
  45. - [Related Projects](#related-projects)
  46. - [Acknowledgements](#acknowledgements)
  47. ## Getting Started
  48. ```shell
  49. pip install python-dotenv
  50. ```
  51. If your application takes its configuration from environment variables, like a
  52. 12-factor application, launching it in development is not very practical because
  53. you have to set those environment variables yourself.
  54. To help you with that, you can add python-dotenv to your application to make it
  55. load the configuration from a `.env` file when it is present (e.g. in
  56. development) while remaining configurable via the environment:
  57. ```python
  58. from dotenv import load_dotenv
  59. load_dotenv() # reads variables from a .env file and sets them in os.environ
  60. # Code of your application, which uses environment variables (e.g. from `os.environ` or
  61. # `os.getenv`) as if they came from the actual environment.
  62. ```
  63. By default, `load_dotenv()` will:
  64. - Look for a `.env` file in the same directory as the Python script (or higher up the directory tree).
  65. - Read each key-value pair and add it to `os.environ`.
  66. - **Not override** existing environment variables (`override=False`). Pass `override=True` to override existing variables.
  67. To configure the development environment, add a `.env` in the root directory of
  68. your project:
  69. ```
  70. .
  71. ├── .env
  72. └── foo.py
  73. ```
  74. The syntax of `.env` files supported by python-dotenv is similar to that of
  75. Bash:
  76. ```bash
  77. # Development settings
  78. DOMAIN=example.org
  79. ADMIN_EMAIL=admin@${DOMAIN}
  80. ROOT_URL=${DOMAIN}/app
  81. ```
  82. If you use variables in values, ensure they are surrounded with `{` and `}`,
  83. like `${DOMAIN}`, as bare variables such as `$DOMAIN` are not expanded.
  84. You will probably want to add `.env` to your `.gitignore`, especially if it
  85. contains secrets like a password.
  86. See the section "[File format](#file-format)" below for more information about what you can write in a `.env` file.
  87. ## Other Use Cases
  88. ### Load configuration without altering the environment
  89. The function `dotenv_values` works more or less the same way as `load_dotenv`,
  90. except it doesn't touch the environment, it just returns a `dict` with the
  91. values parsed from the `.env` file.
  92. ```python
  93. from dotenv import dotenv_values
  94. config = dotenv_values(".env") # config = {"USER": "foo", "EMAIL": "foo@example.org"}
  95. ```
  96. This notably enables advanced configuration management:
  97. ```python
  98. import os
  99. from dotenv import dotenv_values
  100. config = {
  101. **dotenv_values(".env.shared"), # load shared development variables
  102. **dotenv_values(".env.secret"), # load sensitive variables
  103. **os.environ, # override loaded values with environment variables
  104. }
  105. ```
  106. ### Parse configuration as a stream
  107. `load_dotenv` and `dotenv_values` accept [streams][python_streams] via their
  108. `stream` argument. It is thus possible to load the variables from sources other
  109. than the filesystem (e.g. the network).
  110. ```python
  111. from io import StringIO
  112. from dotenv import load_dotenv
  113. config = StringIO("USER=foo\nEMAIL=foo@example.org")
  114. load_dotenv(stream=config)
  115. ```
  116. ### Load .env files in IPython
  117. You can use dotenv in IPython. By default, it will use `find_dotenv` to search for a
  118. `.env` file:
  119. ```python
  120. %load_ext dotenv
  121. %dotenv
  122. ```
  123. You can also specify a path:
  124. ```python
  125. %dotenv relative/or/absolute/path/to/.env
  126. ```
  127. Optional flags:
  128. - `-o` to override existing variables.
  129. - `-v` for increased verbosity.
  130. ### Disable load_dotenv
  131. Set `PYTHON_DOTENV_DISABLED=1` to disable `load_dotenv()` from loading .env
  132. files or streams. Useful when you can't modify third-party package calls or in
  133. production.
  134. ## Command-line Interface
  135. A CLI interface `dotenv` is also included, which helps you manipulate the `.env`
  136. file without manually opening it.
  137. ```shell
  138. $ pip install "python-dotenv[cli]"
  139. $ dotenv set USER foo
  140. $ dotenv set EMAIL foo@example.org
  141. $ dotenv list
  142. USER=foo
  143. EMAIL=foo@example.org
  144. $ dotenv list --format=json
  145. {
  146. "USER": "foo",
  147. "EMAIL": "foo@example.org"
  148. }
  149. $ dotenv run -- python foo.py
  150. ```
  151. Run `dotenv --help` for more information about the options and subcommands.
  152. ## File format
  153. The format is not formally specified and still improves over time. That being
  154. said, `.env` files should mostly look like Bash files. Reading from FIFOs (named
  155. pipes) on Unix systems is also supported.
  156. Keys can be unquoted or single-quoted. Values can be unquoted, single- or
  157. double-quoted. Spaces before and after keys, equal signs, and values are
  158. ignored. Values can be followed by a comment. Lines can start with the `export`
  159. directive, which does not affect their interpretation.
  160. Allowed escape sequences:
  161. - in single-quoted values: `\\`, `\'`
  162. - in double-quoted values: `\\`, `\'`, `\"`, `\a`, `\b`, `\f`, `\n`, `\r`, `\t`, `\v`
  163. ### Multiline values
  164. It is possible for single- or double-quoted values to span multiple lines. The
  165. following examples are equivalent:
  166. ```bash
  167. FOO="first line
  168. second line"
  169. ```
  170. ```bash
  171. FOO="first line\nsecond line"
  172. ```
  173. ### Variable without a value
  174. A variable can have no value:
  175. ```bash
  176. FOO
  177. ```
  178. It results in `dotenv_values` associating that variable name with the value
  179. `None` (e.g. `{"FOO": None}`. `load_dotenv`, on the other hand, simply ignores
  180. such variables.
  181. This shouldn't be confused with `FOO=`, in which case the variable is associated
  182. with the empty string.
  183. ### Variable expansion
  184. python-dotenv can interpolate variables using POSIX variable expansion.
  185. With `load_dotenv(override=True)` or `dotenv_values()`, the value of a variable
  186. is the first of the values defined in the following list:
  187. - Value of that variable in the `.env` file.
  188. - Value of that variable in the environment.
  189. - Default value, if provided.
  190. - Empty string.
  191. With `load_dotenv(override=False)`, the value of a variable is the first of the
  192. values defined in the following list:
  193. - Value of that variable in the environment.
  194. - Value of that variable in the `.env` file.
  195. - Default value, if provided.
  196. - Empty string.
  197. ## Related Projects
  198. - [environs](https://github.com/sloria/environs)
  199. - [Honcho](https://github.com/nickstenning/honcho)
  200. - [dump-env](https://github.com/sobolevn/dump-env)
  201. - [dynaconf](https://github.com/dynaconf/dynaconf)
  202. - [parse_it](https://github.com/naorlivne/parse_it)
  203. - [django-dotenv](https://github.com/jpadilla/django-dotenv)
  204. - [django-environ](https://github.com/joke2k/django-environ)
  205. - [python-decouple](https://github.com/HBNetwork/python-decouple)
  206. - [django-configuration](https://github.com/jezdez/django-configurations)
  207. ## Acknowledgements
  208. This project is currently maintained by [Saurabh Kumar][saurabh-homepage] and
  209. [Bertrand Bonnefoy-Claudet][gh-bbc2] and would not have been possible without
  210. the support of these [awesome people][contributors].
  211. [gh-bbc2]: https://github.com/bbc2
  212. [saurabh-homepage]: https://saurabh-kumar.com
  213. [pypi_link]: https://badge.fury.io/py/python-dotenv
  214. [pypi_badge]: https://badge.fury.io/py/python-dotenv.svg
  215. [python_streams]: https://docs.python.org/3/library/io.html
  216. [contributors]: https://github.com/theskumar/python-dotenv/graphs/contributors
  217. [build_status_link]: https://github.com/theskumar/python-dotenv/actions/workflows/test.yml
  218. [build_status_badge]: https://github.com/theskumar/python-dotenv/actions/workflows/test.yml/badge.svg
  219. # Changelog
  220. All notable changes to this project will be documented in this file.
  221. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this
  222. project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
  223. ## [v1.2.2] - 2026-03-01
  224. ### Added
  225. - Support for Python 3.14, including the free-threaded (3.14t) build. (#)
  226. ### Changed
  227. - The `dotenv run` command now forwards flags directly to the specified command by [@bbc2] in [#607]
  228. - Improved documentation clarity regarding override behavior and the reference page.
  229. - Updated PyPy support to version 3.11.
  230. - Documentation for FIFO file support.
  231. - Dropped Support for Python 3.9.
  232. ### Fixed
  233. - Improved `set_key` and `unset_key` behavior when interacting with symlinks by [@bbc2] in [#790c5](https://github.com/theskumar/python-dotenv/commit/790c5c02991100aa1bf41ee5330aca75edc51311)
  234. - Corrected the license specifier and added missing Python 3.14 classifiers in package metadata by [@JYOuyang] in [#590]
  235. ### Breaking Changes
  236. - `dotenv.set_key` and `dotenv.unset_key` used to follow symlinks in some
  237. situations. This is no longer the case. For that behavior to be restored in
  238. all cases, `follow_symlinks=True` should be used.
  239. - In the CLI, `set` and `unset` used to follow symlinks in some situations. This
  240. is no longer the case.
  241. - `dotenv.set_key`, `dotenv.unset_key` and the CLI commands `set` and `unset`
  242. used to reset the file mode of the modified .env file to `0o600` in some
  243. situations. This is no longer the case: The original mode of the file is now
  244. preserved. Is the file needed to be created or wasn't a regular file, mode
  245. `0o600` is used.
  246. ## [1.2.1] - 2025-10-26
  247. - Move more config to `pyproject.toml`, removed `setup.cfg`
  248. - Add support for reading `.env` from FIFOs (Unix) by [@sidharth-sudhir] in [#586]
  249. ## [1.2.0] - 2025-10-26
  250. - Upgrade build system to use PEP 517 & PEP 518 to use `build` and `pyproject.toml` by [@EpicWink] in [#583]
  251. - Add support for Python 3.14 by [@23f3001135] in [#579](https://github.com/theskumar/python-dotenv/pull/563)
  252. - Add support for disabling of `load_dotenv()` using `PYTHON_DOTENV_DISABLED` env var. by [@matthewfranglen] in [#569]
  253. ## [1.1.1] - 2025-06-24
  254. ### Fixed
  255. - CLI: Ensure `find_dotenv` work reliably on python 3.13 by [@theskumar] in [#563](https://github.com/theskumar/python-dotenv/pull/563)
  256. - CLI: revert the use of execvpe on Windows by [@wrongontheinternet] in [#566](https://github.com/theskumar/python-dotenv/pull/566)
  257. ## [1.1.0] - 2025-03-25
  258. **Feature**
  259. - Add support for python 3.13
  260. - Enhance `dotenv run`, switch to `execvpe` for better resource management and signal handling ([#523]) by [@eekstunt]
  261. **Fixed**
  262. - `find_dotenv` and `load_dotenv` now correctly looks up at the current directory when running in debugger or pdb ([#553] by [@randomseed42])
  263. **Misc**
  264. - Drop support for Python 3.8
  265. ## [1.0.1] - 2024-01-23
  266. **Fixed**
  267. - Gracefully handle code which has been imported from a zipfile ([#456] by [@samwyma])
  268. - Allow modules using `load_dotenv` to be reloaded when launched in a separate thread ([#497] by [@freddyaboulton])
  269. - Fix file not closed after deletion, handle error in the rewrite function ([#469] by [@Qwerty-133])
  270. **Misc**
  271. - Use pathlib.Path in tests ([#466] by [@eumiro])
  272. - Fix year in release date in changelog.md ([#454] by [@jankislinger])
  273. - Use https in README links ([#474] by [@Nicals])
  274. ## [1.0.0] - 2023-02-24
  275. **Fixed**
  276. - Drop support for python 3.7, add python 3.12-dev (#449 by [@theskumar])
  277. - Handle situations where the cwd does not exist. (#446 by [@jctanner])
  278. ## [0.21.1] - 2023-01-21
  279. **Added**
  280. - Use Python 3.11 non-beta in CI (#438 by [@bbc2])
  281. - Modernize variables code (#434 by [@Nougat-Waffle])
  282. - Modernize main.py and parser.py code (#435 by [@Nougat-Waffle])
  283. - Improve conciseness of cli.py and **init**.py (#439 by [@Nougat-Waffle])
  284. - Improve error message for `get` and `list` commands when env file can't be opened (#441 by [@bbc2])
  285. - Updated License to align with BSD OSI template (#433 by [@lsmith77])
  286. **Fixed**
  287. - Fix Out-of-scope error when "dest" variable is undefined (#413 by [@theGOTOguy])
  288. - Fix IPython test warning about deprecated `magic` (#440 by [@bbc2])
  289. - Fix type hint for dotenv_path var, add StrPath alias (#432 by [@eaf])
  290. ## [0.21.0] - 2022-09-03
  291. **Added**
  292. - CLI: add support for invocations via 'python -m'. (#395 by [@theskumar])
  293. - `load_dotenv` function now returns `False`. (#388 by [@larsks])
  294. - CLI: add --format= option to list command. (#407 by [@sammck])
  295. **Fixed**
  296. - Drop Python 3.5 and 3.6 and upgrade GA (#393 by [@eggplants])
  297. - Use `open` instead of `io.open`. (#389 by [@rabinadk1])
  298. - Improve documentation for variables without a value (#390 by [@bbc2])
  299. - Add `parse_it` to Related Projects (#410 by [@naorlivne])
  300. - Update README.md (#415 by [@harveer07])
  301. - Improve documentation with direct use of MkDocs (#398 by [@bbc2])
  302. ## [0.20.0] - 2022-03-24
  303. **Added**
  304. - Add `encoding` (`Optional[str]`) parameter to `get_key`, `set_key` and `unset_key`.
  305. (#379 by [@bbc2])
  306. **Fixed**
  307. - Use dict to specify the `entry_points` parameter of `setuptools.setup` (#376 by
  308. [@mgorny]).
  309. - Don't build universal wheels (#387 by [@bbc2]).
  310. ## [0.19.2] - 2021-11-11
  311. **Fixed**
  312. - In `set_key`, add missing newline character before new entry if necessary. (#361 by
  313. [@bbc2])
  314. ## [0.19.1] - 2021-08-09
  315. **Added**
  316. - Add support for Python 3.10. (#359 by [@theskumar])
  317. ## [0.19.0] - 2021-07-24
  318. **Changed**
  319. - Require Python 3.5 or a later version. Python 2 and 3.4 are no longer supported. (#341
  320. by [@bbc2]).
  321. **Added**
  322. - The `dotenv_path` argument of `set_key` and `unset_key` now has a type of `Union[str,
  323. os.PathLike]` instead of just `os.PathLike` (#347 by [@bbc2]).
  324. - The `stream` argument of `load_dotenv` and `dotenv_values` can now be a text stream
  325. (`IO[str]`), which includes values like `io.StringIO("foo")` and `open("file.env",
  326. "r")` (#348 by [@bbc2]).
  327. ## [0.18.0] - 2021-06-20
  328. **Changed**
  329. - Raise `ValueError` if `quote_mode` isn't one of `always`, `auto` or `never` in
  330. `set_key` (#330 by [@bbc2]).
  331. - When writing a value to a .env file with `set_key` or `dotenv set <key> <value>` (#330
  332. by [@bbc2]):
  333. - Use single quotes instead of double quotes.
  334. - Don't strip surrounding quotes.
  335. - In `auto` mode, don't add quotes if the value is only made of alphanumeric characters
  336. (as determined by `string.isalnum`).
  337. ## [0.17.1] - 2021-04-29
  338. **Fixed**
  339. - Fixed tests for build environments relying on `PYTHONPATH` (#318 by [@befeleme]).
  340. ## [0.17.0] - 2021-04-02
  341. **Changed**
  342. - Make `dotenv get <key>` only show the value, not `key=value` (#313 by [@bbc2]).
  343. **Added**
  344. - Add `--override`/`--no-override` option to `dotenv run` (#312 by [@zueve] and [@bbc2]).
  345. ## [0.16.0] - 2021-03-27
  346. **Changed**
  347. - The default value of the `encoding` parameter for `load_dotenv` and `dotenv_values` is
  348. now `"utf-8"` instead of `None` (#306 by [@bbc2]).
  349. - Fix resolution order in variable expansion with `override=False` (#287 by [@bbc2]).
  350. ## [0.15.0] - 2020-10-28
  351. **Added**
  352. - Add `--export` option to `set` to make it prepend the binding with `export` (#270 by
  353. [@jadutter]).
  354. **Changed**
  355. - Make `set` command create the `.env` file in the current directory if no `.env` file was
  356. found (#270 by [@jadutter]).
  357. **Fixed**
  358. - Fix potentially empty expanded value for duplicate key (#260 by [@bbc2]).
  359. - Fix import error on Python 3.5.0 and 3.5.1 (#267 by [@gongqingkui]).
  360. - Fix parsing of unquoted values containing several adjacent space or tab characters
  361. (#277 by [@bbc2], review by [@x-yuri]).
  362. ## [0.14.0] - 2020-07-03
  363. **Changed**
  364. - Privilege definition in file over the environment in variable expansion (#256 by
  365. [@elbehery95]).
  366. **Fixed**
  367. - Improve error message for when file isn't found (#245 by [@snobu]).
  368. - Use HTTPS URL in package meta data (#251 by [@ekohl]).
  369. ## [0.13.0] - 2020-04-16
  370. **Added**
  371. - Add support for a Bash-like default value in variable expansion (#248 by [@bbc2]).
  372. ## [0.12.0] - 2020-02-28
  373. **Changed**
  374. - Use current working directory to find `.env` when bundled by PyInstaller (#213 by
  375. [@gergelyk]).
  376. **Fixed**
  377. - Fix escaping of quoted values written by `set_key` (#236 by [@bbc2]).
  378. - Fix `dotenv run` crashing on environment variables without values (#237 by [@yannham]).
  379. - Remove warning when last line is empty (#238 by [@bbc2]).
  380. ## [0.11.0] - 2020-02-07
  381. **Added**
  382. - Add `interpolate` argument to `load_dotenv` and `dotenv_values` to disable interpolation
  383. (#232 by [@ulyssessouza]).
  384. **Changed**
  385. - Use logging instead of warnings (#231 by [@bbc2]).
  386. **Fixed**
  387. - Fix installation in non-UTF-8 environments (#225 by [@altendky]).
  388. - Fix PyPI classifiers (#228 by [@bbc2]).
  389. ## [0.10.5] - 2020-01-19
  390. **Fixed**
  391. - Fix handling of malformed lines and lines without a value (#222 by [@bbc2]):
  392. - Don't print warning when key has no value.
  393. - Reject more malformed lines (e.g. "A: B", "a='b',c").
  394. - Fix handling of lines with just a comment (#224 by [@bbc2]).
  395. ## [0.10.4] - 2020-01-17
  396. **Added**
  397. - Make typing optional (#179 by [@techalchemy]).
  398. - Print a warning on malformed line (#211 by [@bbc2]).
  399. - Support keys without a value (#220 by [@ulyssessouza]).
  400. ## 0.10.3
  401. - Improve interactive mode detection ([@andrewsmith])([#183]).
  402. - Refactor parser to fix parsing inconsistencies ([@bbc2])([#170]).
  403. - Interpret escapes as control characters only in double-quoted strings.
  404. - Interpret `#` as start of comment only if preceded by whitespace.
  405. ## 0.10.2
  406. - Add type hints and expose them to users ([@qnighy])([#172])
  407. - `load_dotenv` and `dotenv_values` now accept an `encoding` parameter, defaults to `None`
  408. ([@theskumar])([@earlbread])([#161])
  409. - Fix `str`/`unicode` inconsistency in Python 2: values are always `str` now. ([@bbc2])([#121])
  410. - Fix Unicode error in Python 2, introduced in 0.10.0. ([@bbc2])([#176])
  411. ## 0.10.1
  412. - Fix parsing of variable without a value ([@asyncee])([@bbc2])([#158])
  413. ## 0.10.0
  414. - Add support for UTF-8 in unquoted values ([@bbc2])([#148])
  415. - Add support for trailing comments ([@bbc2])([#148])
  416. - Add backslashes support in values ([@bbc2])([#148])
  417. - Add support for newlines in values ([@bbc2])([#148])
  418. - Force environment variables to str with Python2 on Windows ([@greyli])
  419. - Drop Python 3.3 support ([@greyli])
  420. - Fix stderr/-out/-in redirection ([@venthur])
  421. ## 0.9.0
  422. - Add `--version` parameter to cli ([@venthur])
  423. - Enable loading from current directory ([@cjauvin])
  424. - Add 'dotenv run' command for calling arbitrary shell script with .env ([@venthur])
  425. ## 0.8.1
  426. - Add tests for docs ([@Flimm])
  427. - Make 'cli' support optional. Use `pip install python-dotenv[cli]`. ([@theskumar])
  428. ## 0.8.0
  429. - `set_key` and `unset_key` only modified the affected file instead of
  430. parsing and re-writing file, this causes comments and other file
  431. entact as it is.
  432. - Add support for `export` prefix in the line.
  433. - Internal refractoring ([@theskumar])
  434. - Allow `load_dotenv` and `dotenv_values` to work with `StringIO())` ([@alanjds])([@theskumar])([#78])
  435. ## 0.7.1
  436. - Remove hard dependency on iPython ([@theskumar])
  437. ## 0.7.0
  438. - Add support to override system environment variable via .env.
  439. ([@milonimrod](https://github.com/milonimrod))
  440. ([\#63](https://github.com/theskumar/python-dotenv/issues/63))
  441. - Disable ".env not found" warning by default
  442. ([@maxkoryukov](https://github.com/maxkoryukov))
  443. ([\#57](https://github.com/theskumar/python-dotenv/issues/57))
  444. ## 0.6.5
  445. - Add support for special characters `\`.
  446. ([@pjona](https://github.com/pjona))
  447. ([\#60](https://github.com/theskumar/python-dotenv/issues/60))
  448. ## 0.6.4
  449. - Fix issue with single quotes ([@Flimm])
  450. ([\#52](https://github.com/theskumar/python-dotenv/issues/52))
  451. ## 0.6.3
  452. - Handle unicode exception in setup.py
  453. ([\#46](https://github.com/theskumar/python-dotenv/issues/46))
  454. ## 0.6.2
  455. - Fix dotenv list command ([@ticosax](https://github.com/ticosax))
  456. - Add iPython Support
  457. ([@tillahoffmann](https://github.com/tillahoffmann))
  458. ## 0.6.0
  459. - Drop support for Python 2.6
  460. - Handle escaped characters and newlines in quoted values. (Thanks
  461. [@iameugenejo](https://github.com/iameugenejo))
  462. - Remove any spaces around unquoted key/value. (Thanks
  463. [@paulochf](https://github.com/paulochf))
  464. - Added POSIX variable expansion. (Thanks
  465. [@hugochinchilla](https://github.com/hugochinchilla))
  466. ## 0.5.1
  467. - Fix `find_dotenv` - it now start search from the file where this
  468. function is called from.
  469. ## 0.5.0
  470. - Add `find_dotenv` method that will try to find a `.env` file.
  471. (Thanks [@isms](https://github.com/isms))
  472. ## 0.4.0
  473. - cli: Added `-q/--quote` option to control the behaviour of quotes
  474. around values in `.env`. (Thanks
  475. [@hugochinchilla](https://github.com/hugochinchilla)).
  476. - Improved test coverage.
  477. <!-- PR LINKS -->
  478. [#78]: https://github.com/theskumar/python-dotenv/issues/78
  479. [#121]: https://github.com/theskumar/python-dotenv/issues/121
  480. [#148]: https://github.com/theskumar/python-dotenv/issues/148
  481. [#158]: https://github.com/theskumar/python-dotenv/issues/158
  482. [#170]: https://github.com/theskumar/python-dotenv/issues/170
  483. [#172]: https://github.com/theskumar/python-dotenv/issues/172
  484. [#176]: https://github.com/theskumar/python-dotenv/issues/176
  485. [#183]: https://github.com/theskumar/python-dotenv/issues/183
  486. [#359]: https://github.com/theskumar/python-dotenv/issues/359
  487. [#469]: https://github.com/theskumar/python-dotenv/issues/469
  488. [#456]: https://github.com/theskumar/python-dotenv/issues/456
  489. [#466]: https://github.com/theskumar/python-dotenv/issues/466
  490. [#454]: https://github.com/theskumar/python-dotenv/issues/454
  491. [#474]: https://github.com/theskumar/python-dotenv/issues/474
  492. [#523]: https://github.com/theskumar/python-dotenv/issues/523
  493. [#553]: https://github.com/theskumar/python-dotenv/issues/553
  494. [#569]: https://github.com/theskumar/python-dotenv/issues/569
  495. [#583]: https://github.com/theskumar/python-dotenv/issues/583
  496. [#586]: https://github.com/theskumar/python-dotenv/issues/586
  497. [#590]: https://github.com/theskumar/python-dotenv/issues/590
  498. [#607]: https://github.com/theskumar/python-dotenv/issues/607
  499. <!-- contributors -->
  500. [@23f3001135]: https://github.com/23f3001135
  501. [@EpicWink]: https://github.com/EpicWink
  502. [@Flimm]: https://github.com/Flimm
  503. [@Nicals]: https://github.com/Nicals
  504. [@Nougat-Waffle]: https://github.com/Nougat-Waffle
  505. [@Qwerty-133]: https://github.com/Qwerty-133
  506. [@alanjds]: https://github.com/alanjds
  507. [@altendky]: https://github.com/altendky
  508. [@andrewsmith]: https://github.com/andrewsmith
  509. [@asyncee]: https://github.com/asyncee
  510. [@bbc2]: https://github.com/bbc2
  511. [@befeleme]: https://github.com/befeleme
  512. [@cjauvin]: https://github.com/cjauvin
  513. [@eaf]: https://github.com/eaf
  514. [@earlbread]: https://github.com/earlbread
  515. [@eekstunt]: https://github.com/eekstunt
  516. [@eggplants]: https://github.com/@eggplants
  517. [@ekohl]: https://github.com/ekohl
  518. [@elbehery95]: https://github.com/elbehery95
  519. [@eumiro]: https://github.com/eumiro
  520. [@freddyaboulton]: https://github.com/freddyaboulton
  521. [@gergelyk]: https://github.com/gergelyk
  522. [@gongqingkui]: https://github.com/gongqingkui
  523. [@greyli]: https://github.com/greyli
  524. [@harveer07]: https://github.com/@harveer07
  525. [@jadutter]: https://github.com/jadutter
  526. [@jankislinger]: https://github.com/jankislinger
  527. [@jctanner]: https://github.com/jctanner
  528. [@larsks]: https://github.com/@larsks
  529. [@lsmith77]: https://github.com/lsmith77
  530. [@matthewfranglen]: https://github.com/matthewfranglen
  531. [@mgorny]: https://github.com/mgorny
  532. [@naorlivne]: https://github.com/@naorlivne
  533. [@qnighy]: https://github.com/qnighy
  534. [@rabinadk1]: https://github.com/@rabinadk1
  535. [@randomseed42]: https://github.com/zueve
  536. [@sammck]: https://github.com/@sammck
  537. [@samwyma]: https://github.com/samwyma
  538. [@sidharth-sudhir]: https://github.com/sidharth-sudhir
  539. [@snobu]: https://github.com/snobu
  540. [@techalchemy]: https://github.com/techalchemy
  541. [@theGOTOguy]: https://github.com/theGOTOguy
  542. [@theskumar]: https://github.com/theskumar
  543. [@ulyssessouza]: https://github.com/ulyssessouza
  544. [@venthur]: https://github.com/venthur
  545. [@wrongontheinternet]: https://github.com/wrongontheinternet
  546. [@x-yuri]: https://github.com/x-yuri
  547. [@yannham]: https://github.com/yannham
  548. [@zueve]: https://github.com/zueve
  549. [@JYOuyang]: https://github.com/JYOuyang
  550. [@burnout-projects]: https://github.com/burnout-projects
  551. [@cpackham-atlnz]: https://github.com/cpackham-atlnz
  552. [Unreleased]: https://github.com/theskumar/python-dotenv/compare/v1.2.2...HEAD
  553. [1.2.2]: https://github.com/theskumar/python-dotenv/compare/v1.2.1...v1.2.2
  554. [1.2.1]: https://github.com/theskumar/python-dotenv/compare/v1.2.0...v1.2.1
  555. [1.2.0]: https://github.com/theskumar/python-dotenv/compare/v1.1.1...v1.2.0
  556. [1.1.1]: https://github.com/theskumar/python-dotenv/compare/v1.1.0...v1.1.1
  557. [1.1.0]: https://github.com/theskumar/python-dotenv/compare/v1.0.1...v1.1.0
  558. [1.0.1]: https://github.com/theskumar/python-dotenv/compare/v1.0.0...v1.0.1
  559. [1.0.0]: https://github.com/theskumar/python-dotenv/compare/v0.21.0...v1.0.0
  560. [0.21.1]: https://github.com/theskumar/python-dotenv/compare/v0.21.0...v0.21.1
  561. [0.21.0]: https://github.com/theskumar/python-dotenv/compare/v0.20.0...v0.21.0
  562. [0.20.0]: https://github.com/theskumar/python-dotenv/compare/v0.19.2...v0.20.0
  563. [0.19.2]: https://github.com/theskumar/python-dotenv/compare/v0.19.1...v0.19.2
  564. [0.19.1]: https://github.com/theskumar/python-dotenv/compare/v0.19.0...v0.19.1
  565. [0.19.0]: https://github.com/theskumar/python-dotenv/compare/v0.18.0...v0.19.0
  566. [0.18.0]: https://github.com/theskumar/python-dotenv/compare/v0.17.1...v0.18.0
  567. [0.17.1]: https://github.com/theskumar/python-dotenv/compare/v0.17.0...v0.17.1
  568. [0.17.0]: https://github.com/theskumar/python-dotenv/compare/v0.16.0...v0.17.0
  569. [0.16.0]: https://github.com/theskumar/python-dotenv/compare/v0.15.0...v0.16.0
  570. [0.15.0]: https://github.com/theskumar/python-dotenv/compare/v0.14.0...v0.15.0
  571. [0.14.0]: https://github.com/theskumar/python-dotenv/compare/v0.13.0...v0.14.0
  572. [0.13.0]: https://github.com/theskumar/python-dotenv/compare/v0.12.0...v0.13.0
  573. [0.12.0]: https://github.com/theskumar/python-dotenv/compare/v0.11.0...v0.12.0
  574. [0.11.0]: https://github.com/theskumar/python-dotenv/compare/v0.10.5...v0.11.0
  575. [0.10.5]: https://github.com/theskumar/python-dotenv/compare/v0.10.4...v0.10.5
  576. [0.10.4]: https://github.com/theskumar/python-dotenv/compare/v0.10.3...v0.10.4