Skip to content

Instantly share code, notes, and snippets.

@mnguyenngo
Last active August 31, 2018 00:50
Show Gist options
  • Save mnguyenngo/a3bec3ae561ac09dc0e91d2e232dd76c to your computer and use it in GitHub Desktop.
Save mnguyenngo/a3bec3ae561ac09dc0e91d2e232dd76c to your computer and use it in GitHub Desktop.
Reading a yaml file
import yaml
with open("apikey.yaml", 'r') as f:
try:
credentials_dict = yaml.load(f)
except yaml.YAMLError as exc:
print(exc)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment