Nasdaq / data-link-python

A Python library for Nasdaq Data Link's RESTful API
MIT License
428 stars 70 forks source link

DRY local configuration changes and apikey autoloading #3

Closed couture-ql closed 2 years ago

couture-ql commented 2 years ago

This series introduces a change to reduce duplication of configuration file derivation as well as tucking config files into a default standard path.

Building on top of the standard path, introduce apikey autoload. When imported, attempt to find the apikey in our standard path: if a file exists try to read it. Adds convenience to avoid unnecessary boilerpate; help prevent people from committing their api key.

A future topic will allow API key to be defined via environment variables.