No-boilerplate, async and typed YouTube Analytics API access.
Project description
Sly YTAAPI for Python
🚧 This library is an early work in progress! Breaking changes may be frequent.
🐍 For Python 3.10+
No boilerplate, async and typed Youtube Analytics API access. 😋
pip install slyytaapi
This library does not have full coverage. Currently, the following topics are supported:
- Targeted queries for channels and videos
You can directly grant user tokens using the command line, covering the whole OAuth 2 grant process.
Example usage:
import asyncio
from SlyYTAAPI import *
async def main():
analytics = await YouTubeAnalytics('UCxATMl-Cv8BEF0FtZMRvRgA', 'test/app.json', 'test/user.json')
result = await analytics.query(
since=date(2020, 1, 1),
metrics=Metrics.SubsGained+Metrics.SubsLost+Metrics.WatchTime,
dims=Dimensions.Day
)
result.saveCSV('test/test.csv')
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
SlyYTAAPI-0.1.0.tar.gz
(4.4 kB
view details)
Built Distribution
File details
Details for the file SlyYTAAPI-0.1.0.tar.gz
.
File metadata
- Download URL: SlyYTAAPI-0.1.0.tar.gz
- Upload date:
- Size: 4.4 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 | 115ecc7dd0a4272783c5921ea681f797987ceda8af237144f7bbf3029306663c |
|
MD5 | b2a77e71a575c1a540128621baec19a1 |
|
BLAKE2b-256 | 9d482eb5c9f6383d9ca1fc7e9063618d1c8a215754a3c0c27935f02caec9e5f2 |
File details
Details for the file SlyYTAAPI-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: SlyYTAAPI-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.5 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 | 2bb832505861a2e5a9f851bf14d13732ca8770a5e646dea2b940d0880daa55ea |
|
MD5 | 0014d803531c513f43964f6b3fdc6e23 |
|
BLAKE2b-256 | 29c4e267726472025f35a157e58056af8cf6460f43843df9e15bf75236c541ce |