skillfed

casttube

YouTube chromecast api

casttube v0.2.1 208.5K downloads/30d#9,530 on PyPI58
Permissive license MIT Abandoned released

What it is and what it does

CastTube is a Python library that lets you control YouTube playback on Chromecast devices by sending commands through the YouTube Chromecast API. It wraps the API to let you play individual videos, manage playlists, queue videos, skip, and clear the queue—all from Python code rather than the YouTube app UI.

The package depends only on requests and installs with low friction. However, it has been abandoned since 2020 and receives no maintenance; the last commit was in 2023 but no releases have followed. This means the library may not work with current YouTube or Chromecast API versions, and any breaking changes will go unfixed.

Use it for:

  • Automate YouTube playback on a Chromecast from a home automation or media server script.
  • Build a custom remote control interface that sends YouTube videos to a Chromecast device.
  • Queue videos programmatically on a Chromecast without touching the YouTube app.
  • Integrate YouTube casting into a larger application that manages multiple media devices.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Interact with YouTube on Chromecast devices by sending commands to play videos, manage playlists, and control playback queues through the YouTube Chromecast API.

No, unless you are maintaining legacy code that already uses it. The package is abandoned and has not been updated since 2020, so it is likely incompatible with current YouTube and Chromecast APIs. For new projects, seek an actively maintained Chromecast library or use the official YouTube/Google Cast APIs directly.

Install

casttube on PyPI

pip

pip install casttube

uv

uv add casttube

poetry

poetry add casttube

Installing casttube

Before you install

Low install friction with a single runtime dependency (requests). However, the package is abandoned—last release was 2020-04-08, last commit 2023-02-11—so expect no bug fixes, security updates, or compatibility patches for newer Python or YouTube API changes.

License in practice

MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions.

Quickstart

pip install casttube

from casttube import YouTubeSession
session = YouTubeSession(screen_id)
session.play_video(video_id)

Requires a Chromecast device with the YouTube app already open and a valid screen_id to connect to.

Verify before relying

  • Whether the package still works with current YouTube Chromecast API endpoints (last updated 2020).
  • Python version compatibility; requires_python field is empty and no classifiers specify supported versions.
  • Whether screen_id discovery still works or has changed in newer Chromecast firmware.

Package facts

License MIT (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 1 — requests
Maintenance abandoned — 2,319 days since the last release
Last repo commit
First released
Downloads 208,520/month — #9,530 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: casttube-0.2.1-py3-none-any.whl

Keywords: youtube, chromecast, youtube-api

Tags

youtube chromecast controlchromecast youtube apicast youtube videoschromecast playback controlyoutube casting librarychromecast queue management
chromecastyoutube-apiabandoned

More Internet packages