Metadata-Version: 2.4
Name: vibegram
Version: 1.5.1
Summary: Python client library for Vibe Messenger (MTProto over WebSocket)
Author-email: Ali VEX <lyrdaadhrpyk802@gmail.com>
License-Expression: MIT
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: websockets>=13.0
Requires-Dist: pycryptodome>=3.20
Requires-Dist: telethon>=1.36
Requires-Dist: python-socks[asyncio]>=2.4
Requires-Dist: rsa>=4.9
Requires-Dist: aiohttp>=3.9
Provides-Extra: dev
Requires-Dist: scapy>=2.5; extra == "dev"
Requires-Dist: pytest>=7.0; extra == "dev"
Dynamic: license-file

# pyvibe

Python client library for Vibe Messenger (vibegram.chat).
MTProto over WebSocket with Vibe's custom authentication scheme.

## API Modes

This library provides two ways to interact with Vibe Messenger:

1. **MTProto (User & Legacy Bot)**: High-level client wrapping Telethon (`userapi.VibeClient` and `botapi.VibeBot`). Fully reverse-engineered protocol over WebSocket.
2. **HTTP Bot API (`botapi.VibeBotHTTP`)**: A Telegram-compatible HTTP Bot API client. Highly recommended for creating bots, fully supporting inline buttons, file uploads, and webhooks. See `botapi/README.md` for details.

## About the Author
- Name: Ali VEX
- Email: lyrdaadhrpyk802@gmail.com
- GitHub: lyrdaadhrpyk802-ux
- Jabber: @UserBoT

(درباره سازنده: علی، توسعه‌دهنده پایتون. این پروژه در محیط Termux اندروید بدون روت توسعه یافته است.)

## Project Status
- 852 high-level methods available directly on VibeClient.
- Full passthrough to 875 Telethon TL requests (raw API).
- Verified end-to-end: Login, Messaging, Media, Stories, Forums, JSON Backups.

(وضعیت پروژه: کتابخانه به صورت کامل روی سرور Vibe تست شده است. احراز هویت اختصاصی Vibe، ارسال و دریافت مدیا، استوری، فروم و بکاپ‌گیری کاملاً عملیاتی هستند.)

## Installation
cd pyvibe
pip install -e .

## Quick Start
import asyncio
from userapi import VibeClient

async def main():
    c = VibeClient()
    await c.connect()
    
    if not await c.is_authorized():
        phone = input("Phone: ")
        await c.request_code(phone)
        code = input("OTP: ")
        await c.sign_in(phone, code)
        
    me = await c.get_me()
    print(f"Logged in as {me.first_name}")
    
    await c.send_message("me", "Hello from pyvibe")
    await c.disconnect()

asyncio.run(main())

## Documentation
- ARCHITECTURE.md - Technical details of transport and auth.
- VIBE_COMPAT.md - Feature support matrix.
- examples/ - 11 guided examples with Persian comments.


## Development Notes (Project Origin)

This library was entirely conceived, reverse-engineered, and developed on an **Android device using Termux**, without access to a traditional PC or root privileges.

The challenge involved analyzing captured network traffic to reverse-engineer Vibe's custom authentication scheme (RSA and obfuscated2), successfully implementing it in Python, and wrapping it around the Telethon framework to provide over 850 high-level methods. 

This project proves that a complete, production-ready SDK can be built entirely from a mobile environment.

> **یادداشت توسعه:**
> این کتابخانه به طور کامل روی یک گوشی اندروید (در محیط Termux و بدون روت) و بدون دسترسی به کامپیوتر نوشته شده است. چالش اصلی، مهندسی معکوس الگوریتم احراز هویت اختصاصی سرور وایب بود که با تحلیل ترافیک شبکه انجام شد. این پروژه اثبات می‌کند که می‌توان یک کتابخانه حرفه‌ای و کامل را تنها با یک گوشی موبایل توسعه داد.

## License
MIT License
