Skip to main content

pyVHL

CI PyPI

A Python library for uploading short clips to video and file hosting services.

pyVHL can also download clips from a growing list of sources (via youtube-dl) and upload them to a mirror host of your choice — or pick one at random for you.

Supported Hosts

Host Identifier Result type
Streamable streamable StreamableVideo
Catbox catbox CatboxVideo
qu.ax qu.ax QuaxVideo
pone.rs pone.rs PoneVideo
kappa.lol kappa.lol KappaVideo
segs.lol segs.lol SegsVideo

Supported Download Sources

pyVHL delegates extraction to youtube-dl, with dedicated handling for:

  • Twitch clips
  • YouTube
  • Facebook
  • Generic video pages (any site supported by youtube-dl's generic extractor)

Installation

pyVHL requires Python 3.10+.

pip install pyVHL

Or install from source with uv:

git clone https://github.com/problemxl/pyVHL.git
cd pyVHL
uv sync

Quickstart

Download a clip and mirror it to a random host:

from pyVHL.pyvhl import pyvhl

client = pyvhl()

# Download a clip and collect its metadata
video = client.get_video("https://clips.twitch.tv/FantasticTenaciousLlamaVoteYea-i8q-ElNjPqIFx7eA")

# Upload it to a randomly selected host
mirror = client.upload_video(video["title"], video["filename"])

print(f"Mirrored to {mirror.host}: {mirror.url}")

Skip the download and only inspect the metadata:

video = client.get_video(video_url, download=False)

Upload to a specific host and delete the local file afterwards:

mirror = client.upload_video(video["title"], video["filename"], host="streamable", delete_file=True)

API Reference

pyvhl()

The main client. Initialize it once and reuse it.

get_video(video_url: str, download: bool = True) -> dict

Extracts (and by default downloads) a clip via youtube-dl and returns its metadata as a dict:

Key Description
filename Path to the downloaded file (when download=True)
title Clip title
url Source URL of the clip
id Clip ID
streamer Channel / uploader name
date Upload date
extractor youtube-dl extractor used
file_size Size of the downloaded file in bytes

If the URL cannot be processed, the values are None.

upload_video(clip_title: str, filename: str, host: str = "", delete_file: bool = False) -> VideoClient

Uploads a local file to a mirror host.

  • clip_title — title passed to the host (used by Streamable).
  • filename — path to the local video file.
  • host — one of the identifiers in Supported Hosts. An empty string picks a random host.
  • delete_file — remove the local file after a successful upload.

Returns a VideoClient subclass (StreamableVideo, CatboxVideo, QuaxVideo, PoneVideo, KappaVideo, or SegsVideo) with:

  • host — the host identifier,
  • url — the public mirror URL,
  • shortcode — the host-specific short ID.

Raises ValueError for an unsupported host and FileNotFoundError if the file does not exist. Failed uploads are retried automatically.

Development

The project uses uv for dependency management, pytest for tests, and ruff for linting.

uv sync          # install dependencies
uv run pytest    # run the test suite
uv run ruff check pyvhl tests

Contributions follow GitFlow: branch off develop (feature/..., fix/..., doc/...) and open a pull request back into develop. Releases are cut through release/* branches into main.

License

This project does not currently include a license file. Please contact the maintainer if you intend to redistribute or reuse the code.

Metadata

Release files for pyVHL 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyVHL 0.2.0
File Size Uploaded
pyvhl-0.2.0.tar.gz 204.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyVHL 0.2.0
File Interpreter ABI Platform
pyvhl-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 213.5 kB

Release files / pyvhl-0.2.0.tar.gz

Download URL pyvhl-0.2.0.tar.gz
Size 204.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c2790473c947892f4ec76c99b9385ace6f19f990d7a3db858a0e1924f43b4096
BLAKE2b-256 checksum
How to use checksums
cb98d0ec9c40a6586520226540ab57def3036d387a2a25d57ec0d9f8a6046c6d
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 31, 2026.

Transparency log

Release files / pyvhl-0.2.0-py3-none-any.whl

Download URL pyvhl-0.2.0-py3-none-any.whl
Size 9.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a4e2739c2e8f2396440fca211bc96b6915d32b8e1af509611c5d199de0e7a096
BLAKE2b-256 checksum
How to use checksums
32d822346d8c01acc4f3d61131e616ab4685b1c76ade67113efca3f1bab1e2d7
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 31, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page