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 = await 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.1.tar.gz
(7.3 kB
view details)
Built Distribution
File details
Details for the file SlyYTDAPI-0.1.1.tar.gz
.
File metadata
- Download URL: SlyYTDAPI-0.1.1.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 34a13697f56a761bcdb1a5710b4be04864a0aec6a695dae2b497d9769206df6e |
|
MD5 | 19ee5dbd2a457e540d6df10081bb68fa |
|
BLAKE2b-256 | 48df12517aa4756fc228a1e1732c65fb15245ebc459f8e9891981fc3ff3ad610 |
File details
Details for the file SlyYTDAPI-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: SlyYTDAPI-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5b9b734b73f502f7d30e4885d189c6bff0ddd39b555f7e05b0c2b2c6a1695c1 |
|
MD5 | 19655dcbb43ed49b7839f08914383ab2 |
|
BLAKE2b-256 | 5834b4e9fb71900eba78b5e953526a815318ec7dd7f0d46dd55c87b6e0d2403a |