🎵 YukiAPI — Official Python SDK
Official, ultra-fast Python SDK for the Yuki YouTube Media & Streaming Engine (https://music.yukiapi.site).
Designed for Telegram Music Bots (Yukki, AnonX, Fallen), Discord Bots, PyTgCalls, GroupCall streaming, and high-speed audio/video downloading.
⚡ Key Features
- 🏎️ Ultra-Fast 3-Way Async Search Race: Sub-second search & metadata resolution.
- 🎧 Instant Streaming & Token Auth: Direct stream URLs ready for PyTgCalls / FFmpeg.
- 📥 Atomic Disk Downloads: High-speed chunked MP3 & 720p MP4 downloads.
- 🔄 1-Line Drop-in Compatibility: Replace 1300+ lines of custom
Youtube.pyin Yukki / AnonX / Fallen bots with 1 line. - 🪶 Lightweight: Zero heavy scrapers on client machines (pure
aiohttp). - 💻 CLI Utility: Comes with
yuki-dl&yukiapiterminal tools.
📦 Installation
pip install yukiapi
🚀 Quickstart
1. Modern Async API (Pyrogram, Telethon, discord.py, aiogram)
import asyncio
from yukiapi import YukiAPI
async def main():
async with YukiAPI() as yuki:
# 1. Search tracks (sub-second 3-way race)
results = await yuki.search("Kesariya", limit=5)
for t in results:
print(f"{t.title} ({t.duration}) - {t.link}")
# 2. Get track details (supports tuple unpacking!)
title, dur_min, dur_sec, thumb, vidid = await yuki.details("Kesariya")
print(f"Playing: {title} [{dur_min}]")
# 3. Get direct streamable URL for PyTgCalls / GroupCall
stream_url = await yuki.get_stream("Kesariya", type="audio")
print(f"Stream URL: {stream_url}")
# 4. Download file to local disk (MP3 or MP4)
file_path = await yuki.download("Kesariya", type="audio", output_dir="downloads")
print(f"Downloaded to: {file_path}")
asyncio.run(main())
🤖 1-Line Drop-in Migration for Telegram Music Bots
If you run a Telegram Music Bot (YukkiMusic, AnonXMusic, FallenMusic, etc.), you can delete your entire 1300+ line platforms/Youtube.py and replace it with:
# In your bot's platforms/Youtube.py:
from yukiapi.compat import YouTubeAPI
YouTube = YouTubeAPI()
That's literally it! All your bot commands (track, details, title, duration, thumbnail, search, download, formats, playlist) will work seamlessly out of the box with zero server load.
📄 License
MIT © SUDEEPBOTS
Metadata
Release files for yukiapi 1.0.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 | |
|---|---|---|---|
| yukiapi-1.0.0.tar.gz | 10.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| yukiapi-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.3 kB
Release files / yukiapi-1.0.0.tar.gz
| Download URL | yukiapi-1.0.0.tar.gz |
|---|---|
| Size | 10.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
76f1248dd89ee1bd2097e01efb31087c57c3451d0acbe2e8a14ddd513e068e64
|
|
BLAKE2b-256 checksum How to use checksums |
d4bbae8308c8b87055a4239da439ec5f2052d1a5a4436f9b0623487d58bfbb14
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.15
|
Release files / yukiapi-1.0.0-py3-none-any.whl
| Download URL | yukiapi-1.0.0-py3-none-any.whl |
|---|---|
| Size | 10.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
80b8dfa73c53dee54d1218badbf1e2e62168508aecdb5658de23ba159d038ea8
|
|
BLAKE2b-256 checksum How to use checksums |
250d5ca81891b3ee5cad680defe1aa940bfe64e29daa277f77dda583c5abdea2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.15
|