Django app storing Google API OAuth credentials.
Project description
Stores Google OAuth credentials in DJango ORM for easy API service access.
Installation:
Install or add django-google-credentials to your Python path.
Add google_credentials to your INSTALLED_APPS setting.
Add google_credentials URL include to your project’s urls.py file:
url(r'^google-credentials/', include('google_credentials.urls')),
Create your project on the Google API Console, specifying the redirect URL as http://your.domain.com/google-credentials/callback (or however you setup your urls.py as described above).
Add the following settings to your project’s settings.py file populated with values as retrieved from Google in the previous step, i.e.:
GA_CLIENT_ID = '32749234234.apps.googleusercontent.com' GA_CLIENT_SECRET = 'DKSFY87sd6fHJGdsf6' GA_SCOPE = 'https://www.googleapis.com/auth/analytics.readonly' GA_REDIRECT_URI = 'http://your.domain.com/google-credentials/callback'
Run syncdb to generate required models.
Usage
Before you can start using a service you have to authorize it with your Google account. To do this open http://your.domain.com/google-credentials/callback in your browser.
Once authorized you can retrive a service for further querying like so:
from google_credentials import utils service = utils.get_service()
To purge previously generated credentials open http://your.domain.com/google-credentials/purge in your browser.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for django-google-credentials-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21cd603ce14c50bb238a041e274b5eaa1d1d4e08ee6636414184c178b81967ab |
|
MD5 | b0e63587f894fab4221bff9a5c4734ce |
|
BLAKE2b-256 | f881747e32d80fc3f6b0e286bef2adefdd749c83da3ab52951860d5c81fa2da4 |
Hashes for django_google_credentials-0.0.1-py2.7.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b3d57f4b86de1e3e399f83857afbbdb85e3c455e6e0863a232e9e89620b15b6 |
|
MD5 | 64b23b7d7258bec0f388976b8b362758 |
|
BLAKE2b-256 | 3773ddb19d586cf6a9cbd1891afae5efcbf5d5a17e7980b7da2c5d1910a40c1e |