Skip to content

Instantly share code, notes, and snippets.

@thenationofalex
Created November 12, 2016 10:16
Show Gist options
  • Save thenationofalex/dcfc0609662453a6d77c87cc36b98d05 to your computer and use it in GitHub Desktop.
Save thenationofalex/dcfc0609662453a6d77c87cc36b98d05 to your computer and use it in GitHub Desktop.
Load Google service account keys from a file in Python/Django
#!/usr/bin/env python3
import os
...
os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = os.path.join(BASE_DIR, 'google-service-account-key.json')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment