Skip to main content

RuBx
Rubika Client API Framework | Python 3
Document Telegram Rubika

Rubx | Rubika Client

Messenger Methods:

from rb import RubikaClient # rb: is main package

with RubikaClient('session', platform='rubx',) as client: # set the proxy, api client, api version, ...
   client.send_message('Hey There!', 'username') # username, chat id, prviate links

Or

from rb import RubikaClient

def respond(callable, params) -> dict:
    return callable(**params)

with RubikaClient(...) as client:
    print(
        respond(
            client.send_message,
            dict(
                chat_id=...,
                text='**Hey** @User@  __My__ ``Friend`` ~~How r u?~~'
                mention_user_ids=['u0...']),
            )
        )

    # for emoji
    # print(respond(client.send_message, dict(chat_id=..., sticker=True, emoji_character='😜', sticker_id=..., )))

Or

# shorcuts

from rb import RubikaClient
from rb.responses import Self

with RubikaClient(...) as client:
    print(client == Self.Text(text='Hey', chat_id='chat-guid')) # to send a message
    
    # print(client * 'chat-guid') # to get chat info
    # print(client['chat-guid']) # to get a message from chat
    # client['send_message'] = dict(text='Hey there', chat_id='chat-guid') # example to usage methods with setitem
    # use the all operators

if you forget the method name

from rb import RubikaClient

with RubikaClient('session') as client:
    print(client.getChatInfo(client, 'chat-guid')) # GetChatInfo, GETchatINFO, or ...
    # normally: client.get_chat_info('chat-guid')

Rubino Methods:

from rb import RubinoClient

with RubinoClient('session') as app:
    app.create_page(...)

Handler Methods:

Handler Examples

from rb import Handler, EventBuilder, Filters

client = Handler(...)

# handlers: HandShake, ChatsUpdates, MessagesUpdates
client.add_event_handling(func='ChatsUpdates', events=dict(get_chats=True, get_messages=True, pattern=('/start', 'Hey from rubx lib.')))

@client.handler
def hello(app, message: EventBuilder, event):
    # to print message: print(message) or print(event)
    # to use all methods: app.create_objcet_voice_chat(...)
    message.respond(message.pattern, Filters.author) # filters: chat, group, channel, author

Or

from rb import Handler, Filters, Performers

client = Handler('session')

def event(message):
    message.respond(message.pattern, Filters.author)
        
client.add_event_handling(func=Performers.hand_shake, events=dict(get_chats=True, get_messages=True, pattern=('/start', 'Hi from rubx lib.')))
client.starting = True
client.command_handler(event)

To using HandShake(WebSocket):

from rb import Handler, EventBuilder, Filters, Performers

client = Handler('abc...', 'u0...')
client.add_event_handling(func=Performers.hand_shake, events=dict(get_messages=True, get_chats=False))
@client.handler
def update(app, update, event):
    if update.message.text == '/start':
        message.reply(text='Hello my dear', chat_id=update.message.author_object_guid, reply_to_message_id=update.message.message_id)
        # or using repond: message.respond('Hey!', Filters.author)

Async Methods:

from rb import Client # Client: asycn reader

async def run(*args):
    async with Client(...) as client:
        result = await client.start(client.send_message, 'Hey! from rubx', 'chat-guid')
        print(result)

Client.run(run)

Bot API Methods:

example for api methods send message text

from rb import BotAPI

with BotAPI(__name__, 'token') as app:
    app.send_message('chat-id', 'Hey!')

Handler the Bot API

from rb import BotAPI

with BotAPI(__name__, 'token') as app:
    app.add_event_handling((r'\w{1}start .+', 'Hello'))
    
    @app.handler
    def update(methods, update, event):
        ...

Rubx - ⚡

  • Now the best ‍sync‍ and asycn library for Rubika's was developed
  • ⭐️ Thanks everyone who has starred the project, it means a lot!

Rubx is an sync Python 3 rubika library to interact with Rubika's API as a user or through a bot account (self API alternative).

🔴 If you have code using Rubx before its 8.0.5 version, you must
read docs to learn how to migrate. 💡

What is this?

🇮🇷 - Rubika is a popular messaging application. This library is meant to make it easy for you to write Python programs that can interact with Rubika. Think of it as a wrapper that has already done the heavy job for you, so you can focus on developing an application. This module provides all the desired methods with a very simple and beautiful user interface and has a very high speed. Give your employer the best experience of a project.

Updates - 🌀 :

- Complete documentation and optimization.

INSTALLING

pip install rubx

UPGRADE

pip install rubx --upgrade

self rubika client with python3 RUBX module


Python 3|2.7|3.x

License

Creator

Telegram


issues forks version stars license icon


special:

  • [RUBX] > a library 'official' for rubika messnger with client server.
  • [RUBX] > use api's rubika, and full methods.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rubx-10.6.9.tar.gz (69.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rubx-10.6.9-py3-none-any.whl (74.5 kB view details)

Uploaded Python 3

File details

Details for the file rubx-10.6.9.tar.gz.

File metadata

  • Download URL: rubx-10.6.9.tar.gz
  • Upload date:
  • Size: 69.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for rubx-10.6.9.tar.gz
Algorithm Hash digest
SHA256 3641ede162d554baeadde90db56d4509eb3afbbb12b6aaa06da75c096d7e32d8
MD5 7908782af8f6143f5ce8742882ba388c
BLAKE2b-256 8f37824ee6aa941baef6c56ae428a223326e226c3db49598df6c01d25c1428f8

See more details on using hashes here.

File details

Details for the file rubx-10.6.9-py3-none-any.whl.

File metadata

  • Download URL: rubx-10.6.9-py3-none-any.whl
  • Upload date:
  • Size: 74.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for rubx-10.6.9-py3-none-any.whl
Algorithm Hash digest
SHA256 7530b97c1c72d8656d0c73b2cb7c2160659384e7d478682adc5ad911655689d4
MD5 115c381cc4acb6a2b7917af12d670b1b
BLAKE2b-256 ee8cf156ea4814b71504d29e78a17d454e01a321aac0975827a4e19cecd09990

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

10.6.9 This release

2 files

10.6.8

2 files

10.6.7

2 files

10.6.6

2 files

10.6.5

2 files

10.6.4

2 files

10.6.3

2 files

10.6.2

2 files

10.6.1

2 files

10.6.0

2 files

10.5.9

2 files

10.5.8

2 files

10.5.7

2 files

10.5.6

2 files

10.5.5

2 files

10.5.4

2 files

10.5.3

2 files

10.5.2

2 files

10.5.1

2 files

10.5.0

2 files

10.4.9

2 files

10.4.8

2 files

10.4.7

2 files

10.4.6

2 files

10.4.5

2 files

10.4.4

2 files

10.4.3

2 files

10.4.2

2 files

10.4.1

2 files

10.4.0

2 files

10.3.9

2 files

10.3.8

2 files

10.3.7

2 files

10.3.6

2 files

10.3.5

2 files

10.3.4

2 files

10.3.3

2 files

10.3.2

2 files

10.3.1

2 files

10.3.0

2 files

10.2.9

2 files

10.2.8

2 files

10.2.7

2 files

10.2.6

2 files

10.2.5

2 files

10.2.4

2 files

10.2.3

2 files

10.2.2

2 files

10.2.1

2 files

10.2.0

2 files

10.1.9

2 files

10.1.8

2 files

10.1.7

2 files

10.1.6

2 files

10.1.5

2 files

10.1.4

2 files

10.1.3

2 files

10.1.2

2 files

10.1.1

2 files

10.1.0

2 files

10.0.9

2 files

10.0.8

2 files

10.0.7

2 files

10.0.6

2 files

10.0.5

2 files

10.0.4

2 files

10.0.3

2 files

10.0.2

2 files

10.0.1

2 files

10.0.0

2 files

9.0.6

2 files

9.0.4

2 files

9.0.3

2 files

9.0.2

2 files

9.0.1

2 files

9.0.0

2 files

8.0.5

2 files

8.0.4

2 files

8.0.3

2 files

8.0.2

2 files

8.0.1

2 files

8.0.0

2 files

7.8.7

2 files

7.7.7

2 files

7.0.0

2 files

6.6.6

2 files

6.0.3

2 files

6.0.1

2 files

6.0.0

2 files

5.1.0

2 files

5.0.2

2 files

5.0.1

2 files

5.0.0

2 files

4.0.1

2 files

4.0.0

2 files

3.3.4

2 files

3.3.3

2 files

2.2.2

2 files

2.0.1

1 file

2.0.0

2 files

1.0.3

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page