TivalTube
TivalTube is a small Python library and terminal command for downloading YouTube media that you own or have permission to save. It uses yt-dlp as its download engine.
Install
From this project folder:
python -m pip install .
Install FFmpeg for combining high-quality video/audio and converting MP3 files:
sudo apt update
sudo apt install ffmpeg
Python examples
from tivaltube import download, download_audio, download_playlist, get_info
url = "https://www.youtube.com/watch?v=VIDEO_ID"
info = get_info(url)
print(info["title"])
video = download(url, output_dir="my_videos", quality="720p")
print(video.files)
audio = download_audio(url, output_dir="my_music", audio_format="mp3")
print(audio.title)
items = download_playlist(
"https://www.youtube.com/playlist?list=PLAYLIST_ID",
output_dir="playlists",
quality="1080p",
)
print(f"Downloaded {len(items)} videos")
For progress updates:
from tivaltube import Downloader
def progress(status):
if status["status"] == "downloading":
print(status.get("_percent_str", ""), status.get("_speed_str", ""))
elif status["status"] == "finished":
print("Download finished; processing media...")
downloader = Downloader("downloads", progress=progress)
downloader.video("https://www.youtube.com/watch?v=VIDEO_ID", quality="720p")
Terminal examples
tivaltube "VIDEO_URL" --quality 720p
tivaltube "VIDEO_URL" --audio --audio-format mp3
tivaltube "PLAYLIST_URL" --playlist --quality 1080p
tivaltube "VIDEO_URL" --subtitles
tivaltube "VIDEO_URL" --info
Some age-restricted or account-authorized content may require your own browser session:
tivaltube "VIDEO_URL" --cookies-from-browser firefox
Never share exported cookies. YouTube changes regularly, so keep the engine current:
python -m pip install --upgrade yt-dlp
Run tests
python -m pip install -e ".[dev]"
pytest
Responsible use
Only download content you own, content licensed for download, or content whose owner has given permission. Follow copyright law, YouTube's terms, and any applicable access restrictions.
Powered by tivalsdeveloper.
Metadata
Release files for tivaltube 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tivaltube-0.1.0.tar.gz | 6.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tivaltube-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.1 kB
Release files / tivaltube-0.1.0.tar.gz
| Download URL | tivaltube-0.1.0.tar.gz |
|---|---|
| Size | 6.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ab2cd110ab9cc824a35573480ae8e8b57451e85c73f808508d82b8285a0a3bbf
|
|
BLAKE2b-256 checksum How to use checksums |
dde243b8fa7d09054ee6204d9fdcefbe7c64f62cd119e9419d2f7a16556b5b32
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 29, 2026.
Transparency logRelease files / tivaltube-0.1.0-py3-none-any.whl
| Download URL | tivaltube-0.1.0-py3-none-any.whl |
|---|---|
| Size | 6.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5e323cc97b598c360c6420023e2ae7ce92450232c40d5f7bf435175d0fdaa20b
|
|
BLAKE2b-256 checksum How to use checksums |
429837b431ccaae231664a21c81befc1f69657e1a0e42102259278e2fbc26dd6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 29, 2026.
Transparency log