Skip to content

Read .env files #1

@sloria

Description

@sloria

Proposed API

env.read_env()  # searches for a .env in the file hierarchy, parses it into os.environ

Considerations

This is already implemented by envparse and django-environ (it's hard to tell, but I think original credit goes to the author of this gist: https://gist.github.com/bennylope/2999704).

I'm hesitant to just copy and paste the implementation from one of these sources into this library. I'm more inclined to release a separate library and just import that library here. That way, other libraries could reuse this code. Also, users may want to read .env files without having to use environs, envparse, etc.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions