Skip to content

Commit 62de77f

Browse files
committed
use os environment key as default credential
1 parent 6465203 commit 62de77f

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

samples/vision/inkrecognition_tkinter_sample.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import os
12
import six
23
if six.PY2:
34
from Tkinter import *
@@ -12,7 +13,8 @@
1213

1314
# Ink Recognizer Client Config
1415
URL = "https://api.cognitive.microsoft.com/inkrecognizer"
15-
CREDENTIAL = "FakeCredential" # Put Azure credential instance here
16+
CREDENTIAL = os.environ['INK_RECOGNIZER_SUBSCRIPTION_KEY'].strip()
17+
# You can also use Azure credential instance
1618

1719

1820
# Recognition Config

samples/vision/inkrecognition_wxpython_sample.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import os
12
import wx
23
from azure.cognitiveservices.inkrecognizer import ApplicationKind, InkPointUnit, InkStrokeKind
34
from azure.cognitiveservices.inkrecognizer import InkRecognizerClient
@@ -6,7 +7,8 @@
67

78
# Ink Recognizer Client Config
89
URL = "https://api.cognitive.microsoft.com/inkrecognizer"
9-
CREDENTIAL = "FakeCredential" # Put Azure credential instance here
10+
CREDENTIAL = os.environ['INK_RECOGNIZER_SUBSCRIPTION_KEY'].strip()
11+
# You can also use Azure credential instance
1012

1113

1214
# Recognition Config

0 commit comments

Comments
 (0)