<div align="center">
  <a href="https://pypi.org/project/poetry-dotenv">
    <img alt="logo" src="https://github.com/volopivoshenko/poetry-dotenv/blob/main/docs/static/assets/logo.svg?raw=True" height=200>
  </a>
</div>

<p align="center">
  <a href="https://opensource.org/licenses/MIT">
    <img alt="license" src="https://img.shields.io/pypi/l/poetry-dotenv?logo=opensourceinitiative">
  </a>
  <a href="https://pypi.org/project/poetry-dotenv">
    <img alt="python" src="https://img.shields.io/pypi/pyversions/poetry-dotenv?logo=python">
  </a>
  <a href="https://pypi.org/project/poetry-dotenv">
    <img alt="pypi" src="https://img.shields.io/pypi/v/poetry-dotenv?logo=pypi">
  </a>
  <a href="https://github.com/volopivoshenko/poetry-dotenv/releases">
    <img alt="release" src="https://img.shields.io/github/v/release/volopivoshenko/poetry-dotenv?logo=github">
  </a>
  <a href="https://www.sphinx-doc.org/en/master">
    <img alt="sphinx" src="https://img.shields.io/badge/made_with-Sphinx-1f425f.svg?logo=readthedocs">
  </a>
  <a href="https://numpydoc.readthedocs.io/en/latest/format.html">
    <img alt="numpydoc" src="https://img.shields.io/badge/docstrings-numpy-1f425f.svg?logo=numpy">
  </a>
</p>

<p align="center">
  <a href="https://github.com/psf/black">
    <img alt="black" src="https://img.shields.io/badge/code_style-black-black.svg?logo=windowsterminal">
  </a>
  <a href="https://pycqa.github.io/isort/index.html">
    <img alt="isort" src="https://img.shields.io/badge/imports-isort-black.svg?logo=windowsterminal">
  </a>
  <a href="https://wemake-python-stylegui.de/en/latest/index.html">
    <img alt="wemake" src="https://img.shields.io/badge/style-wemake-black.svg?logo=windowsterminal">
  </a>
  <a href="https://mypy.readthedocs.io/en/stable/index.html">
    <img alt="mypy" src="https://img.shields.io/badge/mypy-checked-success.svg?logo=python">
  </a>
  <a href="https://github.com/pyupio/safety">
    <img alt="safety" src="https://img.shields.io/badge/safety-checked-success.svg?logo=windowsterminal">
  </a>
  <a href="https://github.com/semantic-release/semantic-release">
    <img alt="semantic_release" src="https://img.shields.io/badge/semantic_release-angular-e10079?logo=semantic-release">
  </a>
</p>

<p align="center">
  <a href="https://github.com/dependabot">
    <img alt="dependabot" src="https://img.shields.io/badge/dependabot-enable-success?logo=Dependabot">
  </a>
  <a href="https://github.com/volopivoshenko/poetry-dotenv/actions/workflows/integration.yaml">
    <img alt="integration" src="https://img.shields.io/github/workflow/status/volopivoshenko/poetry-dotenv/CI?label=CI&logo=github">
  </a>
  <a href="https://github.com/volopivoshenko/poetry-dotenv/actions/workflows/deployment.yaml">
    <img alt="deployment" src="https://img.shields.io/github/workflow/status/volopivoshenko/poetry-dotenv/CD?label=CD&logo=github">
  </a>
  <a href="https://github.com/volopivoshenko/poetry-dotenv/actions/workflows/codeql.yaml">
    <img alt="codeql" src="https://img.shields.io/github/workflow/status/volopivoshenko/poetry-dotenv/CodeQL?label=codeQL&logo=github">
  </a>
  <a href="https://pypi.org/project/poetry-dotenv">
    <img alt="wheel" src="https://img.shields.io/pypi/wheel/poetry-dotenv?logo=pypi">
  </a>
</p>

<p align="center">
  <a href="https://codecov.io/gh/volopivoshenko/poetry-dotenv">
    <img alt="coverage" src="https://img.shields.io/codecov/c/gh/volopivoshenko/poetry-dotenv?logo=codecov&token=yyck08xfTN"/>
  </a>
  <a href="https://codeclimate.com/github/volopivoshenko/poetry-dotenv/maintainability">
    <img alt="codeclimate" src="https://img.shields.io/codeclimate/maintainability/volopivoshenko/poetry-dotenv?logo=codeclimate">
  </a>
  <a href="https://pypi.org/project/poetry-dotenv">
    <img alt="downloads" src="https://img.shields.io/pypi/dm/poetry-dotenv?logo=pypi">
  </a>
  <a href="https://github.com/volopivoshenko/poetry-dotenv/">
    <img alt="stars" src="https://img.shields.io/github/stars/volopivoshenko/poetry-dotenv?logo=github">
  </a>
</p>

<p align="center">
  <a href="https://github.com/volopivoshenko/poetry-dotenv/issues">
    <img alt="issues" src="https://img.shields.io/github/issues/volopivoshenko/poetry-dotenv?logo=github">
  </a>
  <a href="https://github.com/volopivoshenko/poetry-dotenv/issues">
    <img alt="issues" src="https://img.shields.io/github/issues-closed/volopivoshenko/poetry-dotenv?logo=github">
  </a>
  <a href="https://github.com/volopivoshenko/poetry-dotenv/pulls">
    <img alt="pr" src="https://img.shields.io/github/issues-pr/volopivoshenko/poetry-dotenv?logo=github">
  </a>
  <a href="https://github.com/volopivoshenko/poetry-dotenv/pulls">
    <img alt="pr" src="https://img.shields.io/github/issues-pr-closed/volopivoshenko/poetry-dotenv?logo=github">
  </a>
  <a href="https://github.com/volopivoshenko/poetry-dotenv/graphs/contributors">
    <img alt="contributors" src="https://img.shields.io/github/contributors/volopivoshenko/poetry-dotenv?logo=github">
  </a>
  <a href="https://github.com/volopivoshenko/poetry-dotenv/commits/main">
    <img alt="commit" src="https://img.shields.io/github/last-commit/volopivoshenko/poetry-dotenv?logo=github">
  </a>
</p>

<p align="center">
  <a href="https://www.buymeacoffee.com/volopivoshenko" target="_blank">
    <img alt="buymeacoffee" src="https://img.shields.io/badge/buy_me_-a_coffee-ff6964?logo=buymeacoffee">
  </a>
</p>

- [Overview](#overview)
  - [Usage](#usage)
- [Installation](#installation)

# Overview

`poetry-dotenv` - is the plugin that automatically loads environment variables from a dotenv file
into the environment before `poetry` commands are run.

This plugin doesn't have any dependencies, but therefore it also supports features that
`python-dotenv` supports (e.g. templates, interpolating variables using `POSIX` variable expansions etc).

## Usage

By default plugin will load the `.env` file from the current working directory or "higher directories".

To prevent ``poetry`` from loading the dotenv file, set the ``POETRY_DONT_LOAD_ENV``
environment variable.

If your dotenv file is located in a different path or has a different name you may set
the ``POETRY_DOTENV_LOCATION`` environment variable.

# Installation

```bash
poetry self add poetry-dotenv
```
