turn-python
Documentation Links
Usage
-
Get an API token from Turn (currently only tokens are supported, not username / passwords)
-
Add this as an environment variable, or pass in to the turn client
$ export TURN_AUTH_TOKEN={your token}
-
Usage
from turn import TurnClient turn_client = TurnClient(token={optionally add your token here}) # Get a user's whatsapp id wa_id = turn_client.contacts.get_whatsapp_id('123456') # Send a message turn_client.messages.send_text(wa_id, 'Hello') # Send a media file with open("example.jpg", "rb") as file: turn_client.messages.send_media( whatsapp_id=wa_id, file=file, content_type="image/jpeg", media_type="image", caption="Here’s an image" )
Release files for turn-python 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| turn_python-1.0.0.tar.gz | 6.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| turn_python-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.4 kB
Release files / turn_python-1.0.0.tar.gz
| Download URL | turn_python-1.0.0.tar.gz |
|---|---|
| Size | 6.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4c925ec295b7ef1f48340747ee8f4eaebb5da7b6e9268a034491641f5eec3f7b
|
|
BLAKE2b-256 checksum How to use checksums |
4eb3e0d3b3f5d692f7faaa3bde4467e2adb5a0eb9a9d6af9d5efeea8991039be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.12
|
Release files / turn_python-1.0.0-py3-none-any.whl
| Download URL | turn_python-1.0.0-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9556523b6711deb8d8aa0bc5964a935056b5b2659cd1a0a0fc90f13b94607a25
|
|
BLAKE2b-256 checksum How to use checksums |
bde20aaa50ccf60b7d30738b473309665bfac611089c6f58873e499179a0aec9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.12
|