Skip to content

Add Pipfile and Memoize API requests#1

Open
jack-michaud wants to merge 2 commits intoCalvinYan:masterfrom
jack-michaud:master
Open

Add Pipfile and Memoize API requests#1
jack-michaud wants to merge 2 commits intoCalvinYan:masterfrom
jack-michaud:master

Conversation

@jack-michaud
Copy link

Just added a couple of things for QOL

  • Made Pipfile and .env file for easy installations and portability. pipenv install to install and pipenv shell to have access to the environment. Environment variables in .env are automatically loaded once calling pipenv shell
  • Parameterized metascouter user in addition to password
  • Added memoization for API calls. Stores API responses in .cache.json so you don't need to incur extra network overhead. To make sure a call is fresh, you can invalidate by deleting a key from .cache.json or by using api_request(url, invalidate=True)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant