Skip to main content

Python library for working with MAX messenger API through WebSocket connections

Project description

Maximus Client

Python library for working with MAX messenger API through WebSocket connections.

Installation

pip install maximus-client

Quick Start

import asyncio
from maximus import MaxClient

async def main():
    client = MaxClient(session="session.maximus", debug=True)
    
    @client.on("ready")
    async def on_ready():
        print("Authorization successful!")
        print(f"User: {client.user.name if client.user else 'Unknown'}")
        print(f"Chats: {len(client.chats)}")
    
    @client.on("new_message")
    async def on_new_message(message):
        print(f"[{message.chat_title}] {message.sender_name}: {message.text}")
        
        if message.text.lower() == "hello":
            await message.reply("Hello! How are you?")
    
    phone_number = "YOUR_PHONE_NUMBER"
    await client.start(phone=phone_number)
    await client.run_until_disconnected()

if __name__ == "__main__":
    asyncio.run(main())

Features

  • Asynchronous WebSocket-based communication
  • Event-driven architecture
  • Session management
  • Message handling and sending
  • Contact management
  • Chat operations

Documentation

Requirements

  • Python 3.8+
  • websockets>=12.0
  • sqlalchemy>=2.0.0

License

MIT License

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

maximus_client-0.1.2.tar.gz (14.2 kB view details)

Uploaded Source

Built Distribution

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

maximus_client-0.1.2-py3-none-any.whl (15.5 kB view details)

Uploaded Python 3

File details

Details for the file maximus_client-0.1.2.tar.gz.

File metadata

  • Download URL: maximus_client-0.1.2.tar.gz
  • Upload date:
  • Size: 14.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.10

File hashes

Hashes for maximus_client-0.1.2.tar.gz
Algorithm Hash digest
SHA256 7c497be80258dae9721d809dbbc79d14f99dd9d8b4e63bb01ccf840322c6ff0a
MD5 a0c6ce6e62763a3b6b22ee77dd4ce06e
BLAKE2b-256 3ac1a8c50c626164f3ad62ed225f21e53e576c72e3505900c7663c5f5c75bcd6

See more details on using hashes here.

File details

Details for the file maximus_client-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: maximus_client-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 15.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.10

File hashes

Hashes for maximus_client-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5b029e07220937ac558bb501fc8bcbfa8973ab108a005cabb526314f0f330586
MD5 f336d4124ac230e769b68511af9b00fc
BLAKE2b-256 3d229297ca5443cdb5a979686b9c7f714bfc120b574013596f3f1ba90caf792f

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