-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for returning the file directory of loaded env file #362
Comments
This functionality doesn't exist within environs. I'd be open to a PR that just delegates to python-dotenv. We should also probably refactor |
I believe is not necessary to delegate to python-dotenv as it's already loading the environment with the path that read_env is searching. IMHO there is no right or wrong on how to implement this, just pros and cons. I notice that creating an instance of So I strongly advice to change For the PR I try to maintain the code style and not to break compatibility, just adding an optional parameter for the user to receive a boolean or string return type. |
Thanks for looking into this @senese . I like your proposal to change I think we can should just go ahead and make that change now, even though it is breaking. I plan to update Python version support anyway, so it's about time for a major release. Can you please update your PR accordingly? |
Hi @sloria! Glad you like my idea. I would suggest that we could add this feature with a minor release and work on the instance method in a next PR. I've seen on pypistats that environs had millions of downloads last month (kudos!!) and it will be nice to add a feature to the library before a breaking change. We don't know the environment and restrictions of the users and other libraries using environs. For this issue I fix the return type as the Union operator |
Works for me. Thanks! |
…nts #362 (#364) * feat: Add support for returning the file directory of loaded env file - Implements #362 * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix return type for python 3.8 and 3.9 (#362) * Update changelog --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Steven Loria <[email protected]>
closed by #364 |
I miss the
python-dotenv.find_dotenv()
feature of returning the directory which the env file is placed.Is there anything similar in
environs
? Are you accepting PR?Thanks!
The text was updated successfully, but these errors were encountered: