Skip to main content

Django app storing Google API OAuth credentials.

Project description

Stores Google OAuth credentials in Django ORM for easy API service access.

Installation:

  1. Install or add django-google-credentials to your Python path.

  2. Add google_credentials to your INSTALLED_APPS setting.

  3. Add google_credentials URL include to your project’s urls.py file:

    url(r'^google-credentials/', include('google_credentials.urls')),
  4. 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).

  5. 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'
  6. 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/authorize in your browser.

Once authorized you can retrieve 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-google-credentials-0.0.2.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_google_credentials-0.0.2-py2.7.egg (7.2 kB view details)

Uploaded Egg

File details

Details for the file django-google-credentials-0.0.2.tar.gz.

File metadata

File hashes

Hashes for django-google-credentials-0.0.2.tar.gz
Algorithm Hash digest
SHA256 dbef126c0e9fe29b4fa71fc3f69fdf5d34c9cb39efc3d48ccefd07e4ffddfc96
MD5 30281c4dfdba7574eb773c904ba1a780
BLAKE2b-256 01ac4fc1de17735b407e4f19ecaf929c493b9f92c0e138a8d337f227fc0d60b2

See more details on using hashes here.

File details

Details for the file django_google_credentials-0.0.2-py2.7.egg.

File metadata

File hashes

Hashes for django_google_credentials-0.0.2-py2.7.egg
Algorithm Hash digest
SHA256 95834fd2373dbc75e2470fb1686d9aab2e7737e1997bb36e0acc2021807641ff
MD5 8ee8e4a68c36a6c19204b705bf421459
BLAKE2b-256 2b9fcb91b2117bb25f1835d3240895ff858272073810154b1d0e564a46f13da4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page