Skip to main content

Библиотека для разработки чат-ботов с помощью API мессенджера MAX

Project description

Асинхронный MAX API

PyPI version Python Version License


📦 Установка

pip install maxapi

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

Если вы тестируете бота в чате - не забудьте дать ему права администратора!

import asyncio
import logging

from maxapi import Bot, Dispatcher
from maxapi.types import BotStarted, Command, MessageCreated

logging.basicConfig(level=logging.INFO)

bot = Bot('тут_ваш_токен')
dp = Dispatcher()


@dp.bot_started()
async def bot_started(event: BotStarted):
    await event.bot.send_message(
        chat_id=event.chat_id,
        text='Привет! Отправь мне /start'
    )


@dp.message_created(Command('start'))
async def hello(event: MessageCreated):
    await event.message.answer(f"Пример чат-бота для MAX 💙")


async def main():
    await dp.start_polling(bot)


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

📚 Документация

В разработке...


⭐️ Примеры


🧩 Возможности

  • ✅ Middleware
  • ✅ Роутеры
  • ✅ Билдер инлайн клавиатур
  • ✅ Простая загрузка медиафайлов
  • ✅ MagicFilter
  • ✅ Внутренние функции моделей
  • ✅ Контекстный менеджер
  • ✅ Поллинг
  • ✅ Вебхук
  • ✅ Логгирование

💬 Обратная связь и поддержка


📄 Лицензия

Этот проект распространяется под лицензией 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

maxapi-0.8.7.tar.gz (42.8 kB view details)

Uploaded Source

Built Distribution

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

maxapi-0.8.7-py3-none-any.whl (89.6 kB view details)

Uploaded Python 3

File details

Details for the file maxapi-0.8.7.tar.gz.

File metadata

  • Download URL: maxapi-0.8.7.tar.gz
  • Upload date:
  • Size: 42.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.0

File hashes

Hashes for maxapi-0.8.7.tar.gz
Algorithm Hash digest
SHA256 ffa3ba223f03f12cd500c183ca9963fc34e131219cbdec066133264972e8a7b3
MD5 10b9f43aeb5a69b08864b664c6d78335
BLAKE2b-256 f1f05efe2c542db169ed2d6a3376f50325fa916e155a173cad7cfff74efd2b59

See more details on using hashes here.

File details

Details for the file maxapi-0.8.7-py3-none-any.whl.

File metadata

  • Download URL: maxapi-0.8.7-py3-none-any.whl
  • Upload date:
  • Size: 89.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.0

File hashes

Hashes for maxapi-0.8.7-py3-none-any.whl
Algorithm Hash digest
SHA256 4087bfc86553f0fe6580fb4ed48f07e2be9aadd9cd9c6e3aecfbec9e949f2c85
MD5 5e67198641f14afb863f10a6df0ebe35
BLAKE2b-256 d47c16cb36fb656c06539c1bc715f1ae512bf2ca0ca449fdc2c331b9e08b642a

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