From the course: Data Pipeline Automation with GitHub Actions Using R and Python
Unlock the full course today
Join today to access over 24,500 courses taught by industry experts.
Setting an environment variable - GitHub Tutorial
From the course: Data Pipeline Automation with GitHub Actions Using R and Python
Setting an environment variable
- [Instructor] In this video, we will learn how to store the EIA_API_KEY as an environment variable on the Mac operating system. We will use the terminal to set the environment variable. There are a couple of ways to store environment variables in MacOS. We will use the .zshenv file, which as its name implies, it is designated file to store environment variables, which will be available to any application upon their launch. Let's now on the terminal open the .zshenv using Vim. I'm in the root folder, and the .zshenv file should be located under the root folder. So let's do Vim .zshenv, and here we go. And as you can see, the file is empty. To add the environment variable, click I to switch from the view to insert mode. As you can see, I clicked I, and now this is indicated I'm in insert mode. Now, let's set a variable by calling the variable EIA_API_KEY. I'm using all uppercase. You can choose either way. And let's assign the value. I copy/paste the value of my API key, and I will put…
Contents
-
-
-
(Locked)
EIA API2m 47s
-
(Locked)
Setting an environment variable3m 22s
-
(Locked)
The EIA API dashboard4m 10s
-
(Locked)
GET request structure5m 41s
-
Querying the data via the browser4m 4s
-
(Locked)
Querying data with R and Python2m 50s
-
(Locked)
Pulling metadata from API with R3m 5s
-
(Locked)
Sending a simple GET request with R5m 19s
-
(Locked)
API limitations with R4m 43s
-
Handling a large data request with R4m 27s
-
Pulling metadata from API with Python3m 47s
-
(Locked)
Sending a simple GET request with Python4m 44s
-
(Locked)
API limitations with Python3m 54s
-
(Locked)
Handling a large data request with Python3m 10s
-
(Locked)
Challenge: Query the API1m 2s
-
(Locked)
Solution: Query the API with R7m 28s
-
(Locked)
Solution: Query the API with Python7m 45s
-
(Locked)
-
-
-
-