philsv / myeia

Python wrapper for the U.S. Energy Information Administration (EIA) API v2

Home Page:https://pypi.org/project/myeia/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Friendly implementation of API token imports

shubhamcodez opened this issue · comments

Hello, I just started using this API. I noticed that this strictly requires one to have a .env file and a token named EIA_TOKEN.
I was wondering if a more flexible and convenient way would be to also allow declaring the variables inside our script, which would be much more easier for use in notebooks.

I was thinking something like a parameter passed with the class API, eg: API(api_key = EIA_token)
Something like this would be great. I would love to work on this, I actually tried doing this but I don't exactly know how. If this is something you'd be interesting in adding, I would love some help to make it happen.

I just rechecked and I don't think it's that big of a deal, so I am closing.