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
Release history Release notifications | RSS feed
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.1.tar.gz
(14.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file maximus_client-0.1.1.tar.gz.
File metadata
- Download URL: maximus_client-0.1.1.tar.gz
- Upload date:
- Size: 14.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f61bf2aa0ee1722c2e2e477c99c03406558b5bd72d064fe7e3d3815fdeda282f
|
|
| MD5 |
23c904ab1f06f67e231ba0a341b28e92
|
|
| BLAKE2b-256 |
bf347b56d4e031649606cff1fe0c72f57fd24525af374650b92e7066b7b1bec3
|
File details
Details for the file maximus_client-0.1.1-py3-none-any.whl.
File metadata
- Download URL: maximus_client-0.1.1-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92e2eabea101ff1c3b2c662395856fc1db1ab1f1832094b4b23fd6cac5d2081f
|
|
| MD5 |
ffe1174db42405cf80e46c0a415631e5
|
|
| BLAKE2b-256 |
dd30b18d188a12fd269181d48b50c57d54b44521326f30d599bf88e4eb80da62
|