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.1.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.1.0-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: onec_webhook-0.1.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.1.0.tar.gz
Algorithm Hash digest
SHA256 84f3a0480611e60537b13d12b378bc50b270f448a1faa91e1ae0dc42b6bf2353
MD5 c65773e315956975102aa524eef10dd0
BLAKE2b-256 08ef85d58dd5d45f59b1caf83fc9db29b1006266e4bb4c2c5fda0f39e55d8db3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: onec_webhook-0.1.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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7774ec7944a344246e545193ed747a5f4c89431489d119219593e47ccfbad7a2
MD5 54bf08176939866cc0dad72d7088399f
BLAKE2b-256 c8e088f4d0a1b32f2045d192b907215d89d96325edcb8f6dea56991847dbb975

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