Skip to main content

YouTube API Data V3 and Google Authentication implementation for Django

Project description

youtube-django

docs Documentation Status
tests CircleCI codecov Codacy Badge Requirements Status
package PyPI Package latest release PyPI Wheel Supported versions Supported implementations Commits since latest release

Install

$ pip install youtube-django

Add 'youtube_django' to your settings.

INSTALLED_APPS = [
    # [...]
    'youtube_django',
]

Run migrations:

$ python manage.py migrate

Add the following Google Oauth Settings to your settings.py:

GOOGLE_OAUTH2_CLIENT_ID = '<Your Client ID from Google Developer Console>'
GOOGLE_OAUTH2_CLIENT_SECRET = '<Your Client Secret from Google Developer Console>'
GOOGLE_OAUTH2_CALLBACK_VIEW = 'oauth2callback'  # your oauth callback view name

Add your views.Example:

from youtube_django.views import (
    VideoUploadView,
    AuthorizeView,
    Oauth2CallbackView,
)

urlpatterns = [
    path('^yt/upload/', VideoUploadView.as_view(), name='video_upload'),
    path('^yt/authorize/', AuthorizeView.as_view(), name='authorize'),
    path('^yt/oauth2callback/', Oauth2CallbackView.as_view(),
        name='oauth2callback')
]

Project details


Download files

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

Files for youtube-django, version 0.2.1
Filename, size File type Python version Upload date Hashes
Filename, size youtube_django-0.2.1-py2.py3-none-any.whl (8.7 kB) File type Wheel Python version py2.py3 Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page