Skip to main content

kobil-chat

KOBIL Chat (Mercury) client for Python, with automatic OAuth token management.

pip install kobil-chat
from kobil.chat import ChatClient

chat = ChatClient(
    chat_base_url="https://idp.cloud.kobil.com/auth/realms/{TENANT}/mpower/v1/users/{USER_ID}",
    tenant_name="acme",
    token_auth_mode="basic",  # chat token endpoint may require Basic auth
    media_download_url="https://idp.cloud.kobil.com/v1/mpower/tenants/{TENANT}/media/{MEDIA_ID}/download",
    # credentials optional if KOBIL_* env vars are set
)

chat.send_text(user_id, "Hi!", title="Update")
chat.send_choice(user_id, "Continue?", ["Yes", "No"])
chat.send_smart_screen(user_id, "Opening…", "service_client_id")
chat.send_attachment(user_id, open("a.pdf", "rb").read(), file_name="a.pdf", text="Please review")
data = chat.get_attachment_file(media_id)  # bytes

{TENANT} is filled from tenant_name, {USER_ID} from the call, {MEDIA_ID} from get_attachment_file. Send operations return {"messageId": ..., "instanceId": ...}. Failures raise kobil.chat.KobilChatError.

License

MIT

Metadata

Release files for kobil-chat 3.0.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 kobil-chat 3.0.0
File Size Uploaded Provenance Actions
kobil_chat-3.0.0.tar.gz 3.8 kB Without provenance Details for kobil_chat-3.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for kobil-chat 3.0.0
File Interpreter ABI Platform Actions
kobil_chat-3.0.0-py3-none-any.whl Python 3 none any Details for kobil_chat-3.0.0-py3-none-any.whl

Total release size: 7.8 kB

Release files / kobil_chat-3.0.0.tar.gz

Download URL kobil_chat-3.0.0.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
3100cd1f865fcabaebcb421d7362201767e0b3ff738864f914b97f0c68cd9737
BLAKE2b-256 checksum
How to use checksums
55f995fc5fc38415cc29aeda27cd17a6a1ec831831aaabb8c5abb65989b3fb3c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

Release files / kobil_chat-3.0.0-py3-none-any.whl

Download URL kobil_chat-3.0.0-py3-none-any.whl
Size 4.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
33b8657569b49136eef477a5a6a1c62c159b32356a5d9c2b237c97f11614e55a
BLAKE2b-256 checksum
How to use checksums
2e480578baea6ebf1852b9a58dadc1b9078d715c37220d0cada74bb94d1d0fe6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

Security for kobil-chat 3.0.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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