Skip to main content

ITD ChatBot SDK

Поддерживаемые версии Python Версия пакета в PyPI Лицензия проекта

Python SDK для создания чат-ботов в мессенджере ИТД.

Что умеет SDK

  • Команды, фильтры, middleware и диалоги с состоянием.
  • Сообщения, реакции, форматирование, загрузка и скачивание файлов.
  • Обновление токена, сохранение курсора и защита от превышения лимитов.

Статус и гарантии

SDK работает от имени аккаунта ИТД. Статус Beta. Изменения сервера могут повлиять на работу. В 1.x сохраняются публичные имена, импорты и формы результатов. Устаревшие методы предупреждают через DeprecationWarning минимум два минорных выпуска.

Установка

Нужен Python 3.10 или новее (поддерживаемые версии видно по значку выше).

python -m pip install itd-chatbot-sdk

WebSocket входит в обычную установку. Для сжатия фото установите дополнение itd-chatbot-sdk[images].

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

Для отправки сообщений аккаунту бота нужна подписка «ИТД НУКСТА». Без неё SDK получает ошибку APIError с кодом nuksta_required: как обработать.

Вам понадобится refresh_token аккаунта бота. Как его получить?

Создайте готовый проект с командами /start и /ping:

python -m itd_bot init my-bot

Команда создаст папку my-bot, отдельную .venv и установит зависимости. Впишите токен в созданный .env, затем выполните команду запуска, которую покажет генератор. Активировать окружение не нужно.

Напишите аккаунту бота /start, затем /ping. Исходник bot.py можно сразу менять под свою задачу. Существующие папки генератор не перезаписывает.

Разбор по шагам и помощь при ошибках: первый бот.

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

Хочу... Читать
Запустить первого бота Первый бот
Получить токен и не потерять сессию Авторизация
Прочитать настройки из окружения или .env Настройки окружения
Отправлять сообщения, файлы, реакции Руководство
Использовать фильтры, middleware и несколько обработчиков Router
Написать диалог из нескольких шагов Состояния FSM
Найти нужный метод Справочник API
Понять, почему бот иногда ждёт Лимиты запросов
Посмотреть примеры Папка examples
Узнать, что изменилось История изменений
Опубликовать SDK в PyPI Публикация

Примеры

Участие в разработке

Хотите помочь? Начните с CONTRIBUTING.md. Быстрая проверка перед PR:

python -m pip install -e ".[dev]"
python -m ruff check itd_bot examples tests
python -m ruff format --check itd_bot examples tests
python -m mypy --strict itd_bot
python -m pytest -q
python -m build

Тесты идут без настоящих токенов и без подключения к ИТД. Остальное:

Лицензия

Проект распространяется по Apache License 2.0.

Metadata

Release files for itd-chatbot-sdk 1.6.0

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

Source distribution (sdist)

Source distribution for itd-chatbot-sdk 1.6.0
File Size Uploaded Provenance Actions
itd_chatbot_sdk-1.6.0.tar.gz 509.6 kB With provenance Details for itd_chatbot_sdk-1.6.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for itd-chatbot-sdk 1.6.0
File Interpreter ABI Platform Actions
itd_chatbot_sdk-1.6.0-py3-none-any.whl Python 3 none any Details for itd_chatbot_sdk-1.6.0-py3-none-any.whl

Total release size: 585.7 kB

Release files / itd_chatbot_sdk-1.6.0.tar.gz

Download URL itd_chatbot_sdk-1.6.0.tar.gz
Size 509.6 kB
Tags Source
SHA-256 checksum
How to use checksums
614868e060b866dce47dd18f27d65991508fd451c20d617cff72a4e209813640
BLAKE2b-256 checksum
How to use checksums
17b8bfe25fea40a0c47e7f8afc2df8d5668a18ea2da71c7b69b5512a08b61e55
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 30, 2026.

Transparency log

Release files / itd_chatbot_sdk-1.6.0-py3-none-any.whl

Download URL itd_chatbot_sdk-1.6.0-py3-none-any.whl
Size 76.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7fc75fd17f4e93a0a3b90fcda848e7aa3b80987729985fc736a35d357cb6d376
BLAKE2b-256 checksum
How to use checksums
687425a7e12dfb0f73e785e8b8e9f890c31e11eca3e0331cc43a677464d6f5f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 30, 2026.

Transparency log

Security for itd-chatbot-sdk 1.6.0

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 itd_chatbot_sdk-1.6.0.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 Nov 30, 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