We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 2d9416b + e45243f commit 56fd748Copy full SHA for 56fd748
1 file changed
PyPortal/Dashblock_API/code.py
@@ -8,19 +8,13 @@
8
then display the number of learn guides on the site
9
"""
10
11
+import os
12
import time
13
import board
14
from adafruit_pyportal import PyPortal
15
-# Get wifi details and more from a secrets.py file
16
-try:
17
- from secrets import secrets
18
-except ImportError:
19
- print("WiFi settings are kept in settings.py, please add them there!")
20
- raise
21
-
22
# Set up where we'll be fetching data from
23
-DATA_SOURCE = "https://api.dashblock.io/model/v1?api_key=" + secrets['dashblock_key']
+DATA_SOURCE = "https://api.dashblock.io/model/v1?api_key=" + os.getenv("DASHBLOCK_KEY")
24
GUIDE_COUNT = ['entities', 0, 'guide count']
25
CAPTION = 'total tutorials:'
26
0 commit comments