Simple Youtube API(full documentation) is a Youtube API wrapper for python, making it easier to search and upload your videos.
Examples
In this example we log in into a YouTube channel, set the appropriate variables for a video and upload the video to the YouTube channel that we logged into:
from simple_youtube_api.Channel import Channel
from simple_youtube_api.LocalVideo import LocalVideo
# loggin into the channel
channel = Channel()
channel.login("client_secret.json", "credentials.storage")
# setting up the video that is going to be uploaded
video = LocalVideo(file_path="test_vid.mp4")
# setting snippet
video.set_title("My Title")
video.set_description("This is a description")
video.set_tags(["this", "tag"])
video.set_category("gaming")
video.set_default_language("en-US")
# setting status
video.set_embeddable(True)
video.set_license("creativeCommon")
video.set_privacy_status("private")
video.set_public_stats_viewable(True)
# setting thumbnail
video.set_thumbnail_path('test_thumb.png')
# uploading video and printing the results
video = channel.upload_video(video)
print(video.id)
print(video)
# liking video
video.like()
Installation
Simple YouTube API needs API keys from Google in order to be able to make queries to YouTube.
Installation by hand: you can download the source files from PyPi or Github:
python setup.py install
Installation with pip: make sure that you have pip installed, type this in a terminal:
pip install simple-youtube-api
Generating YouTube API Keys
Log into https://console.cloud.google.com
Create a new Project
Search for “YouTube Data API V3”
Click Credentials
Click Create Credentials
For user data: 5. Select OAuth Client ID 6. Select that you will call API from “Web Server” 7. Download or copy your API key from the Credentials tab
For non-user data 5. Select API Key 6. Paste the key into a file
Running Tests
Run the python command
python setup.py test
References
Contribute
Fork the repository from Github
Clone your fork
git clone https://github.com/yourname/simple-youtube-api.git
Add the main repository as a remote
git remote add upstream https://github.com/jonnekaunisto/simple-youtube-api.git
Create a pull request and follow the guidelines
Maintainers
jonnekaunisto (owner)
Metadata
Release files for simple-youtube-api 0.2.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| simple-youtube-api-0.2.8.tar.gz | 18.5 kB | Without provenance | Details for simple-youtube-api-0.2.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| simple_youtube_api-0.2.8-py3-none-any.whl | Python 3 | none | any | Details for simple_youtube_api-0.2.8-py3-none-any.whl |
Total release size: 42.6 kB
Release files / simple-youtube-api-0.2.8.tar.gz
| Download URL | simple-youtube-api-0.2.8.tar.gz |
|---|---|
| Size | 18.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
36ebb05173a39c6d0c60b047dfcdbfc42f68f6b49a63c269d11f6da8ae1c789d
|
|
BLAKE2b-256 checksum How to use checksums |
d248045ff9d24ce4278ee3deb072f70eea704c66446c41e6f9f2c953a2f23e9c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.7
|
Release files / simple_youtube_api-0.2.8-py3-none-any.whl
| Download URL | simple_youtube_api-0.2.8-py3-none-any.whl |
|---|---|
| Size | 24.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
50435a1e7ee50abbecfb32917af9f1f09120d00f9eb7768842034fd23e6d68c4
|
|
BLAKE2b-256 checksum How to use checksums |
53559d820c6e2d8d088c0063adae95f70ae603a4a7f8be82295d1350ee1cfc5e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.7
|
Security for simple-youtube-api 0.2.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.