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.3.tar.gz
(8.0 kB
view details)
Built Distribution
File details
Details for the file SlyYTDAPI-0.1.3.tar.gz
.
File metadata
- Download URL: SlyYTDAPI-0.1.3.tar.gz
- Upload date:
- Size: 8.0 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 | d7b818e2ad70ba9ab26e638fbd06eed75cf7be6188d149eae6cd756cb04c4504 |
|
MD5 | 89188747f5c521060ca4d13f01b1c58f |
|
BLAKE2b-256 | 7d33ff4c62d6d40f91d196308affc2699e3ecb46fb7578a67e621be6ecc70fd2 |
File details
Details for the file SlyYTDAPI-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: SlyYTDAPI-0.1.3-py3-none-any.whl
- Upload date:
- Size: 7.4 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 | 468326003219dad45b841ed58f2e53f6c3e6a35b1791dd76520226466ec96d08 |
|
MD5 | 7779471768c0dc694a5cbdf0cd7751e1 |
|
BLAKE2b-256 | 703b99bad8ca7c188a2e6289eb79481c2c1016e70c0492e58a5a9e31c32c01c3 |