asyncyt.binaries module

AsyncYT - A comprehensive async Any website downloader library Uses yt-dlp and ffmpeg with automatic binary management

class asyncyt.binaries.BinaryManager(bin_dir: str | Path | None = None)[source]

Bases: object

Main Manager for managing binaries.

Parameters:

bin_dir (Optional[str | Path]) – Directory for binary files (yt-dlp, ffmpeg).

async health_check() HealthResponse[source]

Perform a health check on the required binaries (yt-dlp and ffmpeg).

Returns:

HealthResponse object with health status and binary availability.

Return type:

HealthResponse

Raises:

Exception – If an unexpected error occurs during the health check process.

async setup_binaries() None[source]

Download and setup yt-dlp and ffmpeg binaries.

Returns:

None

async setup_binaries_generator() AsyncGenerator[SetupProgress, Any][source]

Download and setup yt-dlp and ffmpeg binaries, yielding SetupProgress.

Returns:

Async generator yielding SetupProgress objects.

Return type:

AsyncGenerator[SetupProgress, Any]