{"id":15297410,"url":"https://github.com/mester-root/rubx","last_synced_at":"2025-04-13T22:32:27.301Z","repository":{"id":50653225,"uuid":"519749420","full_name":"Mester-Root/rubx","owner":"Mester-Root","description":"rubika client framework for python 3","archived":false,"fork":false,"pushed_at":"2023-04-07T17:36:58.000Z","size":1371,"stargazers_count":21,"open_issues_count":3,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-27T13:04:49.144Z","etag":null,"topics":["bot","python","robot","rubika","rubika-bot","rubika-library","rubx","self","vpn"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Mester-Root.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-31T10:53:10.000Z","updated_at":"2025-01-01T04:00:20.000Z","dependencies_parsed_at":"2024-10-15T03:21:48.147Z","dependency_job_id":"a0062ada-3366-4d77-87aa-95045a8e2aed","html_url":"https://github.com/Mester-Root/rubx","commit_stats":{"total_commits":393,"total_committers":1,"mean_commits":393.0,"dds":0.0,"last_synced_commit":"4f5f7c322f1efe40931ff8205170cfdf51856d1d"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mester-Root%2Frubx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mester-Root%2Frubx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mester-Root%2Frubx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mester-Root%2Frubx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mester-Root","download_url":"https://codeload.github.com/Mester-Root/rubx/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248790726,"owners_count":21162079,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","python","robot","rubika","rubika-bot","rubika-library","rubx","self","vpn"],"created_at":"2024-09-30T19:17:19.342Z","updated_at":"2025-04-13T22:32:26.583Z","avatar_url":"https://github.com/Mester-Root.png","language":"Python","readme":"\u003cp align=\"center\"\u003e\r\n    \u003ca href=\"https://github.com/mester-root/rubx\"\u003e\r\n        \u003cimg src=\"https://raw.githubusercontent.com/Mester-Root/rubx/main/icons/action-rubx.jpg\" alt=\"Rubx\" width=\"320\"\u003e\r\n    \u003c/a\u003e\r\n    \u003cbr\u003e\r\n    \u003cb\u003eRubika Client API Framework for Python\u003c/b\u003e\r\n    \u003cbr\u003e\r\n    \u003ca href=\"https://pypi.org/project/rubx\"\u003e\r\n        Homepage\r\n    \u003c/a\u003e\r\n    •\r\n    \u003ca href=\"https://github.com/Mester-Root/rubx/tree/main/docs\"\u003e\r\n        Documentation\r\n    \u003c/a\u003e\r\n    •\r\n    \u003ca href=\"https://github.com/Mester-Root/rubx/tree/main/Examples\"\u003e\r\n        Examples\r\n    \u003c/a\u003e\r\n    •\r\n    \u003ca href=\"https://github.com/Mester-Root/rubx/tree/main/Tools\"\u003e\r\n        Tools\r\n    \u003c/a\u003e\r\n\u003c/p\u003e\r\n\r\n\r\n\r\n# Rubx | 🔶 | روبیکس :\r\n\r\nis so fast\r\n---------------------\r\n\r\n\r\n\r\n## Messenger Methods - مثال پیامرسان:\r\n\r\n```python\r\n\r\nfrom rb import RubikaClient # rb: is main package\r\n\r\nwith RubikaClient('session') as client:\r\n   client.send_message('**Hey** __from__ ``rubx``', '@username')\r\n\r\n```\r\n\r\n### Or\r\n\r\n```python\r\nfrom rb import RubikaClient as Client\r\n\r\ndef respond(callable, params) -\u003e dict:\r\n    return callable(**params)\r\n\r\nwith Client(...) as client:\r\n    print(\r\n        respond(\r\n            client.send_message,\r\n            dict(chat_id=..., text='Hey')\r\n            )\r\n        )\r\n```\r\n\r\n### Or\r\n\r\n### Shorcuts | مثالی از چند میانبر\r\n\r\n```python\r\nfrom rb import RubikaClient\r\n\r\nwith RubikaClient(...) as client:\r\n    print(client == dict(text='Hey', chat_id='chat-guid')) # to send message\r\n    # print(client * 'chat-guid') # to get chat info\r\n   # use the operators\r\n```\r\n\r\n#### برای دیدن میانبر های کامل به مستندات ماژول مراجعه کنید.\r\n\r\n### for: if you forget the method name\r\n```python\r\nfrom rb import RubikaClient\r\n\r\nwith RubikaClient('session') as client:\r\n    print(client.getChatInfo(client, 'chat-guid')) # GetChatInfo, GETchatINFO, or ...\r\n    # normally: client.get_chat_info('chat-guid')\r\n```\r\n\r\n## Rubino Methods | مثال کلاینت روبینو :\r\n\r\n``` python\r\n\r\nfrom rb import RubinoClient\r\n\r\nwith RubinoClient(__name__, 'session') as client:\r\n    client.create_page(...)\r\n\r\n```\r\n\r\n## Handler Methods | هندلر :\r\n#### Handler Examples\r\n\r\n```python\r\nfrom rb import Handler, EventBuilder, Filters, Performers\r\n\r\nclient = Handler(...)\r\n\r\n# handlers: HandShake, ChatsUpdates, MessagesUpdates\r\nclient.add_event_handling(func=Performers.chats_updates, events=dict(get_chats=True, get_messages=True, pattern=('/start', 'Hey from rubx lib.')))\r\n\r\n@client.handler\r\ndef hello(app, message: EventBuilder, event):\r\n    # to print message: print(message) or print(event)\r\n    # to use all methods: app.create_objcet_voice_chat(...)\r\n    message.respond(message.pattern, Filters.author) # filters: chat, group, channel, author\r\n```\r\n\r\n### Or\r\n\r\n```python\r\nfrom rb import Handler, NewMessage, Filters, EventBuilder, Performers\r\n\r\nclient = Handler(...)\r\n\r\n@client.on(NewMessage(client.handle, handle_name=Performers.chats_updates))\r\ndef update(event: EventBuilder):\r\n    ... # event.respond('Hey', Filters.chat)\r\n\r\n```\r\n\r\n### Or\r\n\r\n```python\r\nfrom rb import Handler, Filters, Performers\r\n\r\nclient = Handler('session')\r\n\r\ndef event(message):\r\n    message.respond(message.pattern, Filters.author)\r\n        \r\nclient.add_event_handling(func=Performers.chats_updates, event=dict(get_chats=True, get_messages=True, pattern=('/start', 'Hi from rubx lib.')))\r\nclient.starting = True\r\nclient.command_handler(event)\r\n```\r\n\r\n## To using HandShake(WebSocket):\r\n\r\n```python\r\nfrom rb import Handler, EventBuilder, Filters, Performers\r\n\r\nclient = Handler('abc...', 'u0...')\r\nclient.add_event_handling(func=Performers.hand_shake, events=dict(get_messages=True, get_chats=False))\r\n@client.handler\r\ndef update(app, update, event):\r\n    if update.message.text == '/start':\r\n        message.reply(text='Hello my dear', chat_id=update.message.author_object_guid, reply_to_message_id=update.message.message_id)\r\n        # or using repond: message.respond('Hey!', Filters.author)\r\n```\r\n\r\n## Async Methods:\r\n\r\n```python\r\nfrom rb import Client # Client: asycn reader\r\n\r\nasync def run(*args):\r\n    async with Client(...) as client:\r\n        result = await client.start(client.send_message, 'Hey! from rubx', 'chat-guid')\r\n        print(result)\r\n\r\nClient.run(run)\r\n```\r\n\r\n\r\n## Bot API Methods:\r\n\r\n### Example for api methods send message text\r\n```python\r\nfrom rb import BotAPI\r\n\r\nwith BotAPI(__name__, 'token') as app:\r\n    app.send_message('chat-id', 'Hey!')\r\n```\r\n\r\n### Handler\r\n```python\r\nfrom rb import BotAPI\r\n\r\nwith BotAPI(__name__, 'token') as app:\r\n    app.add_event_handling(('\\w{1}start', 'Hello'))\r\n    \r\n    @app.handler\r\n    def update(methods, update, event):\r\n        ...\r\n```\r\n\r\n\r\n___________________________\r\n\r\n## INSTALLING | نصب\r\n\r\n```bash\r\npip install --user rubx\r\n```\r\n\r\n## UPGRADE | بروز رسانی\r\n\r\n```\r\npip install rubx --upgrade\r\n```\r\n\r\n_____________________________\r\n\r\nRubx - ⚡\r\n========\r\n\r\n  - Now the best ‍`sync‍` and `async` library for Rubika's was developed\r\n  - ⭐️ Thanks **everyone** who has starred the project, it means a lot!\r\n\r\n**Rubx** is an sync **Python 3** rubika library to interact with Rubika's API\r\nas a user or through a bot account (self API alternative).\r\n\r\n    🔴 If you have code using Rubx before its 8.0.5 version, you must\r\n    read docs to learn how to migrate. 💡\r\n\r\nWhat is this?\r\n-------------\r\n\r\n🇮🇷 - Rubika is a popular messaging application. This library is meant\r\nto make it easy for you to write Python programs that can interact\r\nwith Rubika. Think of it as a wrapper that has already done the\r\nheavy job for you, so you can focus on developing an application.\r\nThis module provides all the desired methods with a very simple and beautiful user interface and has a very high speed.\r\nGive your employer the best experience of a project.\r\n\r\n\r\nUpdates - 🌀 :\r\n--------\r\n   - The complete documentation and optimization.\r\n\r\n\r\n# rubika client self with python3 | RUBX module ![](https://i.imgur.com/fe85aVR.png)\r\n\r\n\r\n_______________________\r\n\r\n[![Python 3|2.7|3.x](https://img.shields.io/badge/python-3|3.0|3.x-yellow.svg)](https://www.python.org/)   | [![License](https://img.shields.io/badge/license-GPLv2-red.svg)](https://raw.githubusercontent.com/Mester-Root/rubx/main/LICENSE)\r\n\r\n[![creator: ](https://img.shields.io/badge/Telegram-Channel-33A8E3)](https://t.me/rubx_library) | [![Telegram](https://img.shields.io/badge/-telegram-red?color=white\u0026logo=telegram\u0026logoColor=black)](https://t.me/ClientUser)\r\n\r\n![issues](https://img.shields.io/github/issues/mester-root/rubx)      | ![forks](https://img.shields.io/github/forks/mester-root/rubx)\r\n\r\n![stars](https://img.shields.io/github/stars/mester-root/rubx)   | ![license](https://img.shields.io/github/license/mester-root/rubx)\r\n\r\n________________________\r\n\r\n\r\n## **special**:\r\n- *[RUBX] \u003e a library 'official' for rubika messnger with client server.*\r\n- *[RUBX] \u003e full method .*\r\n\r\n\r\n𝙍𝙪𝙗𝙭 𝙈𝙚𝙨𝙨𝙚𝙣𝙜𝙚𝙧\r\n---------------\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmester-root%2Frubx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmester-root%2Frubx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmester-root%2Frubx/lists"}