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.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| kobil_chat-3.0.1.tar.gz | 3.8 kB | Without provenance | Details for kobil_chat-3.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| kobil_chat-3.0.1-py3-none-any.whl | Python 3 | none | any | Details for kobil_chat-3.0.1-py3-none-any.whl |
Total release size: 7.8 kB
Release files / kobil_chat-3.0.1.tar.gz
| Download URL | kobil_chat-3.0.1.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
05ab7e78226c60ee57d1593b4753d437e8b3ae061da1763123adfe4fafc960b3
|
|
BLAKE2b-256 checksum How to use checksums |
8d9379a3ce0317fae9da9e8871d76b94e57648b8bc5760049fdc75c2f0dddf15
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.16
|
Release files / kobil_chat-3.0.1-py3-none-any.whl
| Download URL | kobil_chat-3.0.1-py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
42fc3328ab0d80ec1f80820d4b9fb16b5baba6ed1831934a0f04e13481d2ae27
|
|
BLAKE2b-256 checksum How to use checksums |
51717f67dc1068d3617fba08016ae7dc1002c5dcaf3429fbd7acd1bc38af318b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.16
|
Security for kobil-chat 3.0.1
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.