Skip to main content

pymaxbot

Python SDK для создания ботов в мессенджере MAX.

Установка

pip install pymaxbot

Быстрый старт

import asyncio
from max_bot import Bot, Dispatcher, run_polling

bot = Bot(token="YOUR_BOT_TOKEN")
dp = Dispatcher(bot)


@dp.message(commands=["start"])
async def start(msg):
    await msg.answer("Привет! Я эхо-бот.")


@dp.message()
async def echo(msg):
    await msg.answer(f"Вы написали: {msg.text}")


asyncio.run(run_polling(bot, dp))

Возможности

  • Отправка текстовых сообщений с поддержкой HTML-форматирования
  • Inline-кнопки и обработка callback-нажатий
  • Отправка изображений (одно или несколько)
  • Отправка файлов/документов
  • Удаление сообщений
  • Маршрутизация по командам и payload-ам через Dispatcher
  • Long polling из коробки

Примеры

Inline-кнопки

@dp.message(commands=["menu"])
async def menu(msg):
    await msg.answer(
        "Выберите вариант:",
        buttons=[
            [{"text": "Вариант А", "payload": "option_a"},
             {"text": "Вариант Б", "payload": "option_b"}],
            [{"text": "Отмена", "payload": "cancel"}],
        ]
    )


@dp.callback(payloads=["option_a", "option_b"])
async def on_option(cb):
    await cb.answer()
    await cb.reply(f"Вы выбрали: <b>{cb.payload}</b>", format="html")

Отправка изображений

@dp.message(commands=["photo"])
async def photo(msg):
    await msg.send_image("image.jpg", text="Подпись к фото")

Отправка файлов

@dp.message(commands=["doc"])
async def doc(msg):
    await msg.send_document("report.pdf")

Удаление сообщения

@dp.message(commands=["del"])
async def delete(msg):
    sent = await msg.answer("Удалится через 3 секунды...")
    await asyncio.sleep(3)
    await sent.delete()

Ссылки

Metadata

Release files for pymaxbot 0.1.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pymaxbot 0.1.8
File Size Uploaded Provenance Actions
pymaxbot-0.1.8.tar.gz 10.4 kB With provenance Details for pymaxbot-0.1.8.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pymaxbot 0.1.8
File Interpreter ABI Platform Actions
pymaxbot-0.1.8-py3-none-any.whl Python 3 none any Details for pymaxbot-0.1.8-py3-none-any.whl

Total release size: 22.1 kB

Release files / pymaxbot-0.1.8.tar.gz

Download URL pymaxbot-0.1.8.tar.gz
Size 10.4 kB
Tags Source
SHA-256 checksum
How to use checksums
97c4dd8c760f0ef08d67c32f34c66c3580076d47bab42ebc0c19f170bf2f06bd
BLAKE2b-256 checksum
How to use checksums
1ccd4c51f7a47eceeacc9b74af3d1eb2b2b785cda9988d370f59b49dbba5a25b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 10, 2026.

Transparency log

Release files / pymaxbot-0.1.8-py3-none-any.whl

Download URL pymaxbot-0.1.8-py3-none-any.whl
Size 11.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c9560aa312e91eb7296d043805be4c1280e78234b06ddaef04c5491b2ac16062
BLAKE2b-256 checksum
How to use checksums
ef064b26175715db3898639776a56d1270fc3cd0026468ea6f0bd0a1ed6eb3aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 10, 2026.

Transparency log

Security for pymaxbot 0.1.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pymaxbot-0.1.8.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 10, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page