Skip to main content

Python-библиотека для интеграции с системой взаимодействия 1С

Project description

onec_webhook

onec_webhook — это Python-библиотека для интеграции с системой обсуждений 1С через Webhook. Позволяет отправлять сообщения, создавать обсуждения и управлять пользователями.

🔧 Установка

Установите библиотеку через pip:

pip install onec_webhook  

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

1. Импортируйте библиотеку:

from onec_webhook.webhook import OneCWebhookClient  

2. Создайте клиента:

webhook_url = "https://integrations.1cdialog.com/integration/webhook/********:****************************/callback"  
client = OneCWebhookClient(webhook_url)  

3. Отправьте сообщение в обсуждение:

client.send_message(  
    ext_id="1",  
    text="Привет, 1С!",  
    ext_user_id="1",  
    ext_conversation_id="10"  
)  

📌 Функциональность

  • send_message(ext_id, text, ext_user_id, ext_conversation_id, text_format="text/plain")
    Отправляет сообщение в обсуждение.

  • create_conversation(ext_conversation_id, title, ext_user_id=None, members=None)
    Создаёт новое обсуждение.

  • create_user(ext_user_id, name, full_name="", picture=None)
    Создаёт пользователя интеграции.

  • update_conversation(ext_conversation_id, title=None, ext_user_id=None, add_members=None, remove_members=None)
    Обновляет параметры обсуждения.

  • update_message(ext_id, text, ext_user_id, ext_conversation_id, text_format="text/plain")
    Изменяет существующее сообщение.

🛠 Требования

  • Python 3.7+
  • requests

📄 Лицензия

Проект распространяется под лицензией MIT.

📬 Обратная связь

Если у вас есть вопросы или предложения, создайте issue в репозитории.

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

onec_webhook-0.2.0.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

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

onec_webhook-0.2.0-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

File details

Details for the file onec_webhook-0.2.0.tar.gz.

File metadata

  • Download URL: onec_webhook-0.2.0.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for onec_webhook-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e68b12cbe1057b5b2150762ae0afe3bef6732cadc1119e9d1d437bd27e6bcacf
MD5 81a2ec505abf9c7d35f70af3e93284ab
BLAKE2b-256 0b9dc1b1c015409cc9e0e0a3677e8ab034daccec54b13cd7b4d99e223fff6b81

See more details on using hashes here.

File details

Details for the file onec_webhook-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: onec_webhook-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 2.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for onec_webhook-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f505766894ced3b1e73bfc3da4d32547de92710be510dec2d7731fbfd5672bbc
MD5 5878823b5cad1d66482810b49364345e
BLAKE2b-256 6fd0f9906e38471c1956d8c85f27655ead34dc3f9affef930ce0deccc6eed119

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