question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add support for environment variables at pyproject.toml

See original GitHub issue

It would be handy to have support for using values from environment vars on pyproject.toml The use case I have is that I need to use different repository urls depending on my environment. Something like:

[[tool.poetry.source]]                                                          
name = "private"                                                          
url = "${PRIVATE_REPO_URL}"

I’m still new to poetry, but I could help implementing the feature with some guidance.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:149
  • Comments:53 (7 by maintainers)

github_iconTop GitHub Comments

44reactions
SpicySyntaxcommented, Sep 25, 2020

What should we do in the case that the url for the private repo contains private username and password? I.E.

[[tool.poetry.source]]                                                          
name = "private"                                                          
url = "https://${ARTIFACTORY_USER}:${ARTIFACTORY_APIKEY}@artifactory.corperation.com/artifactory/api/pypi/pip-local/simple"
24reactions
Pequecommented, Jul 6, 2019

Pipenv implements this feature. As they mention, it is “quite useful if you need to authenticate to a private PyPI”. That is my case too.

@sdispater Being ranked as the 11th most popular issue in this repository (out of 400+), would you reconsider accepting pull-requests for this? 😇

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to insert test-time environment variable with pytest ...
pytest supports pyproject.toml since 6.0. How is an Environment Variable supposed be defined in this format? The following does not work:
Read more >
envtoml - PyPI
A simple way of using environment variables in TOML configs (via interpolation)
Read more >
Configuration | Documentation | Poetry - Python dependency ...
Poetry supports this and any setting can be set by using environment variables. The environment variables must be prefixed by POETRY_ and are...
Read more >
Configure a Poetry environment | DataSpell Documentation
Project dependencies are recorded in the pyproject.toml file that ... adding the folder with the poetry executable to the PATH variable.
Read more >
config - pypyr
pyproject.toml; {user config dir}/pypyr/config.yaml ... If these environment variables are not set, pypyr will use the XDG Base Dir defaults ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found