casttube
YouTube chromecast api
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 casttubeuv
uv add casttubepoetry
poetry add casttubeInstalling 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
More Internet packages
Botocore provides low-level, data-driven access…
permissive · top 100 on PyPI
aiobotocoreProvides an async client for AWS services using…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
filelockProvides a platform-independent file locking…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
googleapis-common-protosProvides common Protocol Buffer message…
permissive · top 100 on PyPI
PyChromecastCommunicate with Google Chromecast devices over…
permissive · top 15,000 on PyPI
ytmusicapiytmusicapi lets you programmatically interact…
permissive · top 15,000 on PyPI
pytubepytube downloads YouTube videos and playlists…
permissive · top 5,000 on PyPI
youtube_dlCommand-line tool to download videos from…
permissive · top 15,000 on PyPI
PlexAPIUnofficial Python bindings for the Plex API…
permissive · top 15,000 on PyPI
spotifywebapipythonA Python library that wraps the Spotify Web…
permissive · top 15,000 on PyPI
youtube-transcript-apiFetches transcripts and subtitles from YouTube…
permissive · top 1,000 on PyPI
pytubefixDownloads YouTube videos, playlists, and…
permissive · top 15,000 on PyPI
youtube-search-pythonSearch YouTube for videos, channels, and…
permissive · top 15,000 on PyPI
python-youtubeA Python wrapper for the YouTube Data API V3…
permissive · top 15,000 on PyPI