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.0.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.0-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: maximus_client-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 32609212e1ce619d83c8640a3ba45412a5dcb9e8d0a1e5714dfba4fcd25b0f33
MD5 80177b0f9e02b9d8eb3e21e05951c13b
BLAKE2b-256 27c3d981b9257994d00e5ed03fdb3516ad5530b9bd3dab1efbef88a2d6361de2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: maximus_client-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.4 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 177a007ffcc359765ed055a92a33d0e0ca83ea24688de9afa67a5e7898c7fab8
MD5 c8987c3b2645f8f19c2bdc84522a814d
BLAKE2b-256 d30f1a0db91ee1ee5778f77a5ac6ad880f507adb18df78629bc42340cc1b2d63

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