Skip to main content

turn-python

Documentation Links

Usage

  1. Get an API token from Turn (currently only tokens are supported, not username / passwords)

  2. Add this as an environment variable, or pass in to the turn client

    $ export TURN_AUTH_TOKEN={your token}
    
  3. 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"
        )
    

Metadata

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)

Source distribution for turn-python 1.0.0
File Size Uploaded Provenance Actions
turn_python-1.0.0.tar.gz 6.0 kB Without provenance Details for turn_python-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for turn-python 1.0.0
File Interpreter ABI Platform Actions
turn_python-1.0.0-py3-none-any.whl Python 3 none any Details for turn_python-1.0.0-py3-none-any.whl

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

Security for turn-python 1.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