In a quest for a .env lib for docker-compose we would like to integrate python-dotenv replacing the home brewed solution.
But there is a feature missing, which is variables with no value like in this test where the variables ENV_DEF and NO_DEF should be fetched from the environment (if possible).
So as return of dotenv_values(), that would be a key with value None. With this approach, the decision on what to do is up to the caller. In our case, we look for it in the current environment, fulfilled with the value found or suppressed if not present.
In a quest for a
.envlib for docker-compose we would like to integratepython-dotenvreplacing the home brewed solution.But there is a feature missing, which is variables with no value like in this test where the variables
ENV_DEFandNO_DEFshould be fetched from the environment (if possible).So as return of
dotenv_values(), that would be a key with valueNone. With this approach, the decision on what to do is up to the caller. In our case, we look for it in the current environment, fulfilled with the value found or suppressed if not present.