The python bot-framework SDK for Teamwork (https://teamwork.app)
Project description
Teamwork Python Bot-framework SDK
The official Teamwork python bot-framework SDK.
Installation
Install the packages using pip:
pip install teamwork-python
Pre-requisites
Before you start, you need to create a bot on your Teamwork app console platform and get the API token.
Usage
You can use the SDK to interact with the Teamwork Bot-framework API.
Get user profile
from teamwork import AsyncClient
client = AsyncClient("ENDPOINT_URL", "API_TOKEN")
# by id
user = await client.user.by_id(1001)
# by username
user = await client.user.by_username("john.doe@example.com")
Send message
This is to let your bot account send a message to other end-user or group chats.
from teamwork import ReceiverType
# to a user
res = await client.message.send("Hello world!", 1001, ReceiverType.USER)
# to a group chat
res = await client.message.send("Hello everyone!", 59239, ReceiverType.GROUP)
Optionally, you can send a "typing" signal to the target, indicating that the bot is typing before you actually send the message
# first, send the signal
res = await client.message.sending_typing_signal(1001, ReceiverType.USER)
# Sometime later, send the actual message
res = await client.message.send("Hello world!", 1001, ReceiverType.USER)
License
This project is licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file teamwork_python-0.1.0.tar.gz.
File metadata
- Download URL: teamwork_python-0.1.0.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e7d11ccbcd6b1fd1817071c6dded8f7808df6f7d7007df826abd1a15a9b90cac
|
|
| MD5 |
6ef829bee5200b5b8f11245995d7dc0f
|
|
| BLAKE2b-256 |
e392d4bbc7e3e74c1d93b554fa79cae9636679e7e4dbaf715cd90c72773d007e
|
File details
Details for the file teamwork_python-0.1.0-py3-none-any.whl.
File metadata
- Download URL: teamwork_python-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50e9b845b34974e4d5e94505542d4f9a74e74db13ef8a090a6726f30f057757a
|
|
| MD5 |
0d5735e62f2df1d15895feb8b9fe513d
|
|
| BLAKE2b-256 |
da59010bb0edb8b53ad520e4e06417bda36cb644b54790e84c3526be7973b56a
|