Skip to main content

No project description provided

Project description

BaleClient

BaleClient is a maintained fork / rework of Aiobale, an asynchronous Python client for Bale Messenger.

The original library is great but contains several bugs and incomplete implementations. This project fixes those issues and adds improvements for reliability, stability, and usability.


Installation

Install from PyPI:

pip install baleclient

Upgrade to the latest version:

pip install -U baleclient

Install from source:

git clone https://github.com/Foad-KhAb/baleclient.git
cd baleclient
pip install -e .

Requirements

  • Python 3.11+

Quick Example

from baleclient import Client

async def main():
    async with Client("session") as client:
        me = await client.get_me()
        print(me)

Features

  • Fully asynchronous API
  • Lightweight and fast
  • Improved parsing reliability
  • Better error handling
  • Maintained fork of Aiobale

Based On

This project is based on:

Aiobale https://github.com/Enalite/aiobale

Credit to the original author for the initial implementation.


Why BaleClient?

While using Aiobale in real projects, I encountered several issues such as:

  • parsing bugs
  • inconsistent API responses
  • missing validations
  • edge cases not handled

BaleClient fixes these problems and introduces improvements to make the library more stable for production usage.


Fixes

List of fixes applied to the original library:

  • Fix dialog response parsing

  • Fix message caption parsing

  • Fix incorrect type validations

  • Allow GroupPeer.access_hash to be optional to handle peers returned without an access hash

  • (this list will grow as more issues are discovered)


Added Improvements

Additional features and improvements:

  • Better error handling when reading corrupted or modified session files

Changelog

v0.1.0

  • Initial release
  • Fork of Aiobale with several fixes
  • Improved session error handling

Documentation

Documentation will be expanded in future releases.

For now, refer to:

  • The source code
  • Example usage in the repository

Notes

  • BaleClient is not an official Bale API library
  • The Bale API is internal and may change without notice

License

This project follows the same license as the original project unless otherwise specified.

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

baleclient-1.0.2.tar.gz (109.3 kB view details)

Uploaded Source

Built Distribution

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

baleclient-1.0.2-py3-none-any.whl (215.2 kB view details)

Uploaded Python 3

File details

Details for the file baleclient-1.0.2.tar.gz.

File metadata

  • Download URL: baleclient-1.0.2.tar.gz
  • Upload date:
  • Size: 109.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for baleclient-1.0.2.tar.gz
Algorithm Hash digest
SHA256 e002261757fe5f8260673baa4bd53d064855dd225a19faef15737ff332ff4bcc
MD5 fc132b2275afe521d8f7472c01aa6bc6
BLAKE2b-256 50cb8293c6391406dc631ad76e8d648e23add3c964a98f371035a179048ef6b1

See more details on using hashes here.

Provenance

The following attestation bundles were made for baleclient-1.0.2.tar.gz:

Publisher: workflow.yml on Foad-KhAb/baleclient

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file baleclient-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: baleclient-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 215.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for baleclient-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 02f4b502283c1da200c5b3c6ea999ae114fa1edfd340a2cf2076544a02889540
MD5 d868d4ca8b6015c1ff20f57a88a51d1d
BLAKE2b-256 d503365ae2f6af599583647091d6b0300c4863c4f1a228944ae84fcb15eb3bcf

See more details on using hashes here.

Provenance

The following attestation bundles were made for baleclient-1.0.2-py3-none-any.whl:

Publisher: workflow.yml on Foad-KhAb/baleclient

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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