Skip to content

Commit

Permalink
Merge pull request #291 from olivito/patch-1
Browse files Browse the repository at this point in the history
Update yaml example for secure credentials
  • Loading branch information
nbateshaus committed Aug 29, 2019
2 parents 8772c1d + 7276427 commit 159f60e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/user-guide/secure-credentials.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ Then ``pip install pyyaml`` read the credentials in your Python code::
from tamr_unify_client.auth import UsernamePasswordAuth
import yaml

creds = yaml.load("path/to/credentials.yaml") # replace with your credentials.yaml path
with open("path/to/credentials.yaml") as f: # replace with your credentials.yaml path
creds = yaml.safe_load(f)

auth = UsernamePasswordAuth(creds.username, creds.password)
auth = UsernamePasswordAuth(creds['username'], creds['password'])

As in this example, we recommend you use YAML as your format since YAML has
support for comments and is more human-readable than JSON.
Expand Down

0 comments on commit 159f60e

Please sign in to comment.