We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 17396cd + fdd8736 commit 42bffd3Copy full SHA for 42bffd3
dataSources/iucn/api/config.json
@@ -4,7 +4,6 @@
4
"path": "./processing.py",
5
"function": "retrieve",
6
"args": [
7
- "./apiKey.txt",
8
"{OUT-PATH}"
9
],
10
"output": "iucn.csv"
dataSources/iucn/api/scripts/processing.py
@@ -4,15 +4,13 @@
from lib.bigFiles import RecordWriter
import time
import lib.dataframes as dff
+from lib.secrets import secrets
-def retrieve(apiKeyPath: Path, outputFilePath: Path):
- with open(apiKeyPath) as fp:
- apiKey = fp.read().rstrip(" \n")
11
-
+def retrieve(outputFilePath: Path):
12
baseURL = "https://api.iucnredlist.org/api/v4"
13
headers = {
14
"accept": "application/json",
15
- "Authorization": apiKey
+ "Authorization": secrets.iucn.key
16
}
17
18
session = requests.Session()
0 commit comments