Skip to main content

⚡ RubiFlow (روبی‌فلو)

فریم‌ورک فوق‌سریع، ناهمگام (Async) و مدرن پایتون برای پیام‌رسان و سوپراپ روبیکا
Next-Generation High-Performance Async Python Framework for Rubika Messenger & SuperApp

PyPI version Documentation Python 3.9+ License: MIT

📚 وب‌سایت مستندات آنلاین (مشابه Telegram Bot API):
👉 https://iliasync.github.io/rubiflow/


🌟 چرا RubiFlow؟

  • نام کاملاً اختصاصی و جدید: نامی تک و ثبت‌نشده در PyPI که به جریان روان، غیرهمزمان و پرسرعت اشاره دارد.
  • Async-First و با بالاترین بازده: با موتور شبکه aiohttp، مدیریت Connection Pooling و رمزنگاری با توابع C در cryptography.
  • رعایت کامل استانداردهای PEP 8 و Clean Architecture: استفاده دقیق از Type Hints، مدل‌های داده‌ای (dataclasses) و مدیریت خطا با استثناهای اختصاصی.
  • شناسایی خودکار سشن فایرفاکس: توانایی اتصال آنی به حساب فعال در فایرفاکس (بدون نیاز به دریافت کد پیامکی مجدد).
  • پشتیبانی از StringSession: خروجی سشن به صورت یک رشته متنی فشرده و امن با پیشوند RubiFlow$... جهت استقرار روی سرورها.
  • پوشش جامع بیش از ۳۰۰ متد: پشتیبانی از پیام‌رسان کامل، روبینو (Rubino)، فیلم و سریال (VOD) و کیف پول.
  • توابع کمکی و شی‌گرایی پیشرفته: ارسال آسان پیام، ریپلای مستقیم با message.reply("...")، حذف و ویرایش، دریافت چت‌ها و پیام‌ها.

📦 نصب

pip install rubiflow

یا نصب نسخه سورس مستقیم از گیت‌هاب:

pip install git+https://github.com/iliasync/rubiflow.git

🚀 شروع سریع (Quickstart)

۱. اتصال خودکار از طریق سشن فایرفاکس

import asyncio
from rubiflow import Client

async def main():
    # اتصال مستقیم به سشن مرورگر فایرفاکس شما
    app = Client.from_firefox()

    async with app:
        me = await app.get_me()
        print(f"Logged in as: {me.full_name} (@{me.username})")

        # ارسال پیام
        msg = await app.send_message("u0...", "سلام از روبی‌فلو!")
        print(f"پیام ارسال شد با آیدی: {msg.message_id}")

asyncio.run(main())

۲. ساخت بات پاسخگوی خودکار (Event-Driven Echo Bot)

from rubiflow import Client, Message

app = Client.from_firefox()

@app.on_message()
async def handle_message(msg: Message):
    if msg.text == "سلام":
        await msg.reply("درود! پیام شما توسط بات RubiFlow دریافت شد.")

# اجرای مداوم بات
app.run()

۳. استفاده از رشته سشن (StringSession) برای سرور

import asyncio
from rubiflow import Client

async def export_session():
    app = Client.from_firefox()
    async with app:
        # دریافت رشته امن برای قرار دادن روی سرور یا متغیرهای محیطی
        string_session = app.session.to_string()
        print("Your StringSession:", string_session)

        # بازیابی مجدد سشن
        new_app = Client(session=string_session)
        async with new_app:
            me = await new_app.get_me()
            print("Connected with StringSession as:", me.username)

asyncio.run(export_session())

📂 ساختار ماژولار پروژه

rubika-lib/
├── pyproject.toml              # پیکربندی استاندارد بسته پایتون
├── README.md                   # راهنمای کامل
├── rubiflow/
│   ├── __init__.py             # اکسپورت کلاس‌ها و توابع اصلی
│   ├── client.py               # هسته کلاینت و متدهای سطح بالا
│   ├── crypto.py               # موتور پرسرعت رمزنگاری روبیکا V6 (AES-256 + RSA-SHA256)
│   ├── session.py              # مدیریت سشن (Firefox, StringSession, FileSession)
│   ├── network.py              # ارتباطات ناهمگام با Connection Pooling
│   ├── exceptions.py           # استثناهای اختصاصی (InvalidAuthError, ApiError, ...)
│   └── models/
│       ├── user.py             # کلاس داده کاربر (User)
│       ├── chat.py             # کلاس داده گفتگو (Chat)
│       └── message.py          # کلاس داده پیام همراه متدهای reply, delete, edit
├── docs/
│   ├── RUBIKA_API_FULL_REFERENCE.md   # کاتالوگ جامع بیش از ۳۰۰ متد روبیکا
│   └── RUBIKA_CRYPTO_AND_PROTOCOL.md  # جزئیات مهندسی معکوس و رمزنگاری
└── examples/
    └── rubiflow_quickstart.py  # نمونه کد تست زنده و جامع

🛡️ لایسنس

توسعه داده شده تحت لایسنس MIT.

Metadata

Release files for rubiflow 1.0.1

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

Source distribution (sdist)

Source distribution for rubiflow 1.0.1
File Size Uploaded Provenance
rubiflow-1.0.1.tar.gz 30.3 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 64.4 kB

Release files / rubiflow-1.0.1.tar.gz

Download URL rubiflow-1.0.1.tar.gz
Size 30.3 kB
Tags Source
SHA-256 checksum
How to use checksums
079f93b8a21226cc5608d4dc38f83f33ba438b8387cbeab97216b77b06d3903a
BLAKE2b-256 checksum
How to use checksums
b3e303bcabd8cb115efacde11f78fd815bde8792c4fcc535b7086de9c5fbf211
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / rubiflow-1.0.1-py3-none-any.whl

Download URL rubiflow-1.0.1-py3-none-any.whl
Size 34.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2d2ad043c512446116fbd6f77035d141dbdbae22a72e6f3838af444abbfb0216
BLAKE2b-256 checksum
How to use checksums
8d83a2787666e53717d4d7da73f7c2c075b4659317ebb285c6996965f4fe4df5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Security for rubiflow 1.0.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files No provenance

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