![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
poetry-dotenv-plugin
Advanced tools
A Poetry plugin to automatically load environment variables from .env files
A Poetry plugin that automatically loads environment variables from .env
files into the environment before poetry commands are run.
Supports Python 3.7+
$ cat .env
MY_ENV_VAR='Hello World'
$ poetry run python -c 'import os; print(os.environ.get("MY_ENV_VAR"))'
Hello World
This plugin depends on the python-dotenv
package for its functionality and therefore also supports features that python-dotenv
supports. Interpolating variables using POSIX variable expansion for example.
Initial implementation based on the event handler application plugin example in the Poetry docs.
poetry self add poetry-dotenv-plugin
If you are transitioning from pipenv
there shouldn't be much to change with regard to the .env
loading. If you were a user of pipenv
's environment variables to control .env
loading then you can use the analogous environment variables listed below.
Pipenv env var | Poetry env var |
---|---|
PIPENV_DOTENV_LOCATION | POETRY_DOTENV_LOCATION |
PIPENV_DONT_LOAD_ENV | POETRY_DONT_LOAD_ENV |
By default, this plugin will override existing environment variables. This is because this plugin was built to make onboarding for users coming from pipenv
as seamless as possible. If you want to prevent existing environment variables from being overridden, you can set the POETRY_DOTENV_DONT_OVERRIDE
environment variable to true
.1
FAQs
A Poetry plugin to automatically load environment variables from .env files
We found that poetry-dotenv-plugin demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.