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.9.tar.gz (47.0 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.9-py3-none-any.whl (97.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: maxapi-0.8.9.tar.gz
  • Upload date:
  • Size: 47.0 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.9.tar.gz
Algorithm Hash digest
SHA256 663efb4addabb8b6eae6106cfee372f644c71ecb9a9dc7a6066229d4a6ebcc58
MD5 ccd2a11b2a7c16437abd4119981efe06
BLAKE2b-256 1e9eeb6d936ae17e70d5ef1c7c1c76f19e1e099353be72590528430afbcd7b70

See more details on using hashes here.

File details

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

File metadata

  • Download URL: maxapi-0.8.9-py3-none-any.whl
  • Upload date:
  • Size: 97.7 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.9-py3-none-any.whl
Algorithm Hash digest
SHA256 2f70b6da1a7d77c091d848c46778d2cbd4f1480c4a73fa1b077c81873cac90dc
MD5 96963523a6a3a0b0f1d60fcd67849562
BLAKE2b-256 612a2e0797c595969060c7ca7c2718f8ba3a16d2774bdc0e6c7e06e2d62b56cb

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