Skip to main content

An advanced Python library for Bale messenger bots, inspired by Telegram Bot API

Project description

Baleh An advanced Python library for Bale messenger bots, inspired by Telegram Bot API.

Installation bash

کپی pip install baleh Features Send text messages, photos, videos, audio, stickers, and documents Manage chats (get chat info, ban/unban members) Handle incoming messages with decorators Asynchronous API with aiohttp Webhook support Type hints for better IDE support Usage Send a Message python

کپی from baleh import BaleClient import asyncio

async def main(): client = BaleClient("your_bot_token") await client.connect() message = await client.send_message(chat_id=123456789, text="Hello, Bale!") print(message.text) await client.disconnect()

asyncio.run(main()) Send a Photo python

کپی async def send_photo(): client = BaleClient("your_bot_token") await client.connect() message = await client.send_photo(chat_id=123456789, photo="path/to/photo.jpg", caption="My photo") await client.disconnect()

asyncio.run(send_photo()) Handle Incoming Messages python

کپی async def handle_messages(): client = BaleClient("your_bot_token")

@client.on_message()
async def on_message(message):
    await client.send_message(message.chat.id, f"Received: {message.text}")

await client.connect()
await client.start_polling()

asyncio.run(handle_messages()) Contributing Fork the repository at github.com/hamidrashidi98/baleh and submit pull requests.

Project details


Download files

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

Source Distribution

baleh-0.2.0.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

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

baleh-0.2.0-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

File details

Details for the file baleh-0.2.0.tar.gz.

File metadata

  • Download URL: baleh-0.2.0.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for baleh-0.2.0.tar.gz
Algorithm Hash digest
SHA256 06cbd243a5867d8bc62536a9ea3841429c40744babdd9b22bbf552f63785c410
MD5 8d53340c46663788117b74fb74a97dca
BLAKE2b-256 602703c80a7cbfeec9cdad4b27b1cee769a40733a2aa0662bad110d689bc100f

See more details on using hashes here.

File details

Details for the file baleh-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: baleh-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 2.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for baleh-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8004b064a1ab88364e1ea90208735b3f8f3b459b5d1edae69a6dda01ba62e0d8
MD5 06ff4dd7c7db90f343927b8e61c7e9dc
BLAKE2b-256 7893b4b9d044369cb1a704aa9e8eb779b252042fbadc49a1dcf92dede03094e6

See more details on using hashes here.

Supported by

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