lagerfeuer / cryptocompare

Python3 Wrapper for the CryptoCompare API
MIT License
181 stars 73 forks source link

added API key to be passed as an environment variable #40

Closed PatrickAlphaC closed 3 years ago

PatrickAlphaC commented 3 years ago

This addresses https://github.com/lagerfeuer/cryptocompare/issues/39

All tests pass now. If you run the tests without an API key they hit rate limits. Also modified some formatting.

lagerfeuer commented 3 years ago

Thanks for the contribution! I'll think it over, I would like to combine it with #21 (in addition to #39) if possible. Also, I'd like to add the feature to pass the API key via an environment variable.

PatrickAlphaC commented 3 years ago

If you read the new readme it addresses setting it as an environment variable. Also #21 is a separate issue, I don't think having them in the same PR makes sense.

lagerfeuer commented 3 years ago

If you read the new readme it addresses setting it as an environment variable.

Ah, I missed that, sorry, busy week.

Also #21 is a separate issue, I don't think having them in the same PR makes sense.

Not like this, no. The point is to pass a dict to the get function so arbitrary URL parameters can be defined, the API key being one of them. So no, it's not separate, you just implemented it differently.

That being said, I feel like this feature should be a part of the library, I am going to merge it. Thanks for your help!

PatrickAlphaC commented 3 years ago

All good! Thanks for creating the package!