In order to be able to post our workout data while we're out and about, it would be easier if we can access the console and run the code in Repl.it

However, because Repl.it is open source, we don't want other people to see our API keys and secrets.

1. Using what you know about Environment Variables (see Day 35), update your code to use environment variables for all sensitive data including:

APP_ID

API_KEY

SHEET_ENDPOINT

USERNAME

PASSWORD

TOKEN


HINT 1: You'll need to import the os module.

Here's how you would set environment variables

APP_ID = os.environ["APP_ID"]
API_KEY = os.environ["API_KEY"]

and here is how you would get an environment variable

APP_ID = os.environ.get("APP_ID")
API_KEY = os.environ.get("API_KEY")


2. Use the Repl.it documentation to work out how to create a .env file in Repl.it and store your Environment Variables in there.

https://docs.repl.it/repls/secret-keys#:~:text=env%20files%20are%20used%20for,see%20the%20contents%20of%20the%20.


HINT 2: Environment variables are declared without spaces!

HINT 3: https://stackoverflow.com/questions/4906977/how-to-access-environment-variable-values

HINT 4

SOLUTION