File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 17
17
"""
18
18
19
19
import json
20
+ import os
20
21
import sys
21
22
import time
22
23
@@ -265,12 +266,17 @@ def main():
265
266
'aggregation' ,
266
267
]
267
268
268
- # Testing class with demo API key
269
+ # Testing class with demo API key or one of your API key
270
+ # by enviroment variable
269
271
# http://panel.slicingdice.com/docs/#api-details-api-connection-api-keys-demo-key
272
+
273
+ API_KEY = os .environ .get (
274
+ "SD_API_KEY" ,
275
+ ('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfX3NhbHQiOiJkZW1vMW0'
276
+ 'iLCJwZXJtaXNzaW9uX2xldmVsIjozLCJwcm9qZWN0X2lkIjoyMCwiY2xpZW5'
277
+ '0X2lkIjoxMH0.xRBHeDxTzYAgFyuU94SWFbjITeoxgyRCQGdIee8qrLA' ))
270
278
sd_tester = SlicingDiceTester (
271
- api_key = ('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfX3NhbHQiOiJkZW1vMW0'
272
- 'iLCJwZXJtaXNzaW9uX2xldmVsIjozLCJwcm9qZWN0X2lkIjoyMCwiY2xpZW5'
273
- '0X2lkIjoxMH0.xRBHeDxTzYAgFyuU94SWFbjITeoxgyRCQGdIee8qrLA' ),
279
+ api_key = API_KEY ,
274
280
verbose = False )
275
281
276
282
try :
You can’t perform that action at this time.
0 commit comments