garf for YouTube Data API
garf-youtube-data-api simplifies fetching data from YouTube Data API using SQL-like queries.
Prerequisites
- YouTube Data API enabled.
- API key to access to access YouTube Data API.
Once generated expose API key as
export GARF_YOUTUBE_DATA_API_KEY=<YOUR_API_KEY>
Installation
pip install garf-youtube-data-api
Usage
Run as a library
from garf_youtube_data_api import report_fetcher
from garf_io import writer
# Specify query
query = 'SELECT id, snippet.title AS channel_name FROM channels'
# Fetch report
fetched_report = (
report_fetcher.YouTubeDataApiReportFetcher()
.fetch(query, id=[<YOUR_CHANNEL_ID_HERE>])
)
# Write report to console
console_writer = writer.create_writer('console')
console_writer.write(fetched_report, 'output')
Learn more on library usage.
Run via CLI
Install
garf-executorspackage to run queries via CLI (pip install garf-executors).
garf <PATH_TO_QUERIES> --source youtube-data-api \
--output <OUTPUT_TYPE> \
--source.<SOURCE_PARAMETER=VALUE>
where:
<PATH_TO_QUERIES>- local or remove files containing queries<OUTPUT_TYPE>- output supported bygarf-iolibrary.<SOURCE_PARAMETER=VALUE- key-value pairs to refine fetching, check available source parameters.
Learn more on CLI usage.
Documentation
You can find a documentation on garf-youtube-data-api here.
Samples
Sample queries for interacting with YouTube Data API are located in examples folder.
Metadata
Release files for garf-youtube-data-api 0.0.13
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 |
|---|---|---|---|---|
| garf_youtube_data_api-0.0.13.tar.gz | 8.0 kB | Without provenance | Details for garf_youtube_data_api-0.0.13.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| garf_youtube_data_api-0.0.13-py3-none-any.whl | Python 3 | none | any | Details for garf_youtube_data_api-0.0.13-py3-none-any.whl |
Total release size: 19.8 kB
Release files / garf_youtube_data_api-0.0.13.tar.gz
| Download URL | garf_youtube_data_api-0.0.13.tar.gz |
|---|---|
| Size | 8.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
20c656f379bc3fee64fcd9af9af9c3013f1eba40546cab241260ad3210883b83
|
|
BLAKE2b-256 checksum How to use checksums |
df2b99f8f44b7bf75bbfc8b87ae034a17c4732d3e1c4d77674687fb65b4abf87
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / garf_youtube_data_api-0.0.13-py3-none-any.whl
| Download URL | garf_youtube_data_api-0.0.13-py3-none-any.whl |
|---|---|
| Size | 11.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
12719a12e39467e04f32ea8ba6af052412f861fe5c469ca0a1c01bc00961099b
|
|
BLAKE2b-256 checksum How to use checksums |
7f4484350d6a170f635a02f44d677c129feeff4cb8906fdc94a0259632532e55
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for garf-youtube-data-api 0.0.13
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.