Skip to content

beatgig/youtube_stats

Repository files navigation

Youtube Stats

A Rust library with Python bindings for Youtube stats

Installation

pip install youtube_stats

Local Development

Clone the repo

git clone [email protected]:beatgig/youtube_stats.git
cd youtube_stats

Configuration

Create a .env file in the root of the project with the following contents:

YOUTUBE_API_KEY=YOUR_API_KEY

Build Locally and Install the Extension in Python Environment

poetry run maturin develop

Run Tests

pytest -s test/

Usage

Python

from youtube_stats import YoutubeStats

stats = YoutubeStats()
stats.get_stats("https://www.youtube.com/watch?v=dQw4w9WgXcQ")

Rust

use youtube_stats::YoutubeStats;

let stats = YoutubeStats::new();
stats.get_stats("https://www.youtube.com/watch?v=dQw4w9WgXcQ");

Deployment

Any push to main will trigger a GitHub Actions workflow that will build and publish the Python package to PyPI.

License

MIT

About

A Rust library with Python bindings for Youtube stats

Resources

License

Stars

Watchers

Forks

Packages

No packages published