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.6.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.6-py3-none-any.whl (89.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: maxapi-0.8.6.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.6.tar.gz
Algorithm Hash digest
SHA256 05f1a497dd5f06fd91d74ec3aa71c48b56effc2dd035cd94cda2a15a2a555e53
MD5 6d1fcc5f07e181d3d18943f04cf780df
BLAKE2b-256 b8e000707e5fbe9012d06f525eb48352f63e1dfb3937015aa568b9b5dd9a866b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: maxapi-0.8.6-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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 7fdcaa79b05c3d0ce3a9a7dd4780057a5e277d3ac08e314d92b1efaa72e792da
MD5 c7ba24e7a4aa6ddffc153e1987edad1f
BLAKE2b-256 e9522e4174099e4f908763b84c709dbf9730c6b3152bd8e224ad59b7b45a7b0c

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