theskumar / theskumar/python-dotenv
dotenv_values returns an OrderedDict
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8.9k
- Forks
- 581
- PR merge metrics
- No merged PRs in 30d
Description
From this example the value returned by dotenv_values is supposed to be a dict, but in reality (python 3.9) the value is of type OrderedDict:
from dotenv import dotenv_values
config = dotenv_values(".env") # config = {"USER": "foo", "EMAIL": "foo@example.org"}
This is what I get:
from dotenv import dotenv_values
config = dotenv_values('.env') # config = OrderedDict([('consumer_key', '****'), ('consumer_secret', '****'), ('access_token', '****'), ('access_secret', '****')])
dict(config) # {'consumer_key': '****', 'consumer_secret': '****', 'access_token': '****', 'access_secret': '****'}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the dotenv_values entry point and inspect how it constructs and returns the parsed configuration. Confirm the expected mapping type from the issue example, then add or update coverage so the result is a dict rather than an OrderedDict.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100