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.

Built Distribution

youtube_django-0.2.1-py2.py3-none-any.whl (8.7 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page