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())

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

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


⭐️ Примеры


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

  • ✅ Роутеры
  • ✅ Билдер инлайн клавиатур
  • ✅ Простая загрузка медиафайлов
  • ✅ 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.3.tar.gz (41.6 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.3-py3-none-any.whl (88.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: maxapi-0.8.3.tar.gz
  • Upload date:
  • Size: 41.6 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.3.tar.gz
Algorithm Hash digest
SHA256 f2a8e94d222f31578a78f5bc6415c16f58eb403cad4887e8cd7e8c66c8ced033
MD5 e91dc840effc8de3c15b9744813ecdfe
BLAKE2b-256 d0f6618f5b8463bc21fa55849c355d7124aeab995164f8fd965b22745862affe

See more details on using hashes here.

File details

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

File metadata

  • Download URL: maxapi-0.8.3-py3-none-any.whl
  • Upload date:
  • Size: 88.3 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2a657aba9e290ba6ed6d8592c836cff51443beb280967a65f15ee213f81563d1
MD5 4342439b64c968ac3136ce83c950b040
BLAKE2b-256 79e1d4baecc789aa98ec71a321be1b82c2a48e30a133c86569c214339f2a7b56

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