No-boilerplate, async and typed YouTube Data API access.
Project description
SlyYTDAPI: YouTube Data API
🚧 This library is an early work in progress! Breaking changes may be frequent.
🐍 For Python 3.10+
No-boilerplate, async and typed YouTube Data API access. 😋
pip install slyytdapi
This library does not have full coverage. All methods are read-only. Currently, the following topics are supported:
- Videos
- Channels
- Comment threads
- Video search
- Channel members (requires approval from YouTube)
Example usage:
import asyncio
from SlyYTDAPI import *
async def main():
# don't forget to keep your secrets secret!
yt = YouTubeData(open('api_key.txt').read())
my_video = await yt.video('dQw4w9WgXcQ')
print(F"Check this out!\n{my_video.link()}")
# keep it simple
_ = await my_video.comments(limit=10) # list[Comment]
# or opt in to generators
print('\n---\n'.join([
F"{c.author_name} > {c.body}"
async for c in my_video.comments(limit=10)
]))
asyncio.run(main())
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
SlyYTDAPI-0.1.0.tar.gz
(7.2 kB
view details)
Built Distribution
File details
Details for the file SlyYTDAPI-0.1.0.tar.gz
.
File metadata
- Download URL: SlyYTDAPI-0.1.0.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a2db08789fa7f60f33dfe2124e3f3715764dee014640f99d9f9b9391a8ee601 |
|
MD5 | 285364113332dc46463a2fba89e06c45 |
|
BLAKE2b-256 | 51c2540eec5c54f553aaa6ae0c831fa85b2649a0f894f3e85b18d87a491c2ee9 |
File details
Details for the file SlyYTDAPI-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: SlyYTDAPI-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92e4e99f5fbc813b138b6ca22ae0714570d4db2c474f71ac29fa45428157d8d9 |
|
MD5 | 716c3bee23dff9e0d77396326e0b6a58 |
|
BLAKE2b-256 | 6f6c19714e4f6a8ea23afc99c12cdee2ff15eb19074b9c15fedee609f469d195 |