Async Python SDK for go-whatsapp-web-multidevice
Project description
gowa
Async Python SDK for go-whatsapp-web-multidevice, with Pydantic models and webhook helpers.
Current scope: REST API + webhook payload parsing. WebSocket support is not included yet.
Install
From PyPI:
pip install gowa
For local development:
uv pip install -e ./sdk-python-gowa
Quick start
import asyncio
from gowa_sdk import GoWaClient, SendMessageRequest
async def main() -> None:
async with GoWaClient(base_url="http://localhost:3000") as client:
resp = await client.send_message(
SendMessageRequest(phone="1234567890@s.whatsapp.net", message="Hello")
)
print(resp)
asyncio.run(main())
Multi-device support (v8+)
Device scoping required: All device-scoped REST API calls now require either:
X-Device-Idheader, ordevice_idquery parameter
If only one device is registered, it will be used as the default.
When running multiple devices, pass device_id on the client or per call. This is sent as the X-Device-Id header per the v8 API changes.
async with GoWaClient(base_url="http://localhost:3000", device_id="device_id") as client:
await client.get_status()
Webhook parsing
from gowa_sdk.webhooks import WebhookEnvelope, WebhookMessagePayload
envelope = WebhookEnvelope.model_validate(payload_dict)
if envelope.event == "message":
message = WebhookMessagePayload.model_validate(envelope.payload)
print(message.text)
Docs reference
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 gowa-0.1.0.tar.gz.
File metadata
- Download URL: gowa-0.1.0.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f02c18de8e332de8a15e4ac2acd60f9d639059b74d2a6fadec0b990290ec6dfa
|
|
| MD5 |
e9482d5c7ed5096680b8faaa27ef2383
|
|
| BLAKE2b-256 |
8711f2ae4ef9d6955cdbdd0812d087ab4d31234e3c41375e156b0215b1f0f7db
|
Provenance
The following attestation bundles were made for gowa-0.1.0.tar.gz:
Publisher:
publish.yml on ilanbenb/gowa-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gowa-0.1.0.tar.gz -
Subject digest:
f02c18de8e332de8a15e4ac2acd60f9d639059b74d2a6fadec0b990290ec6dfa - Sigstore transparency entry: 926227057
- Sigstore integration time:
-
Permalink:
ilanbenb/gowa-python@4816dbc2a20939d7fbe9d63bf934abcf407646dd -
Branch / Tag:
refs/heads/main - Owner: https://github.com/ilanbenb
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4816dbc2a20939d7fbe9d63bf934abcf407646dd -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file gowa-0.1.0-py3-none-any.whl.
File metadata
- Download URL: gowa-0.1.0-py3-none-any.whl
- Upload date:
- Size: 14.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42264ab04b6934cdd276a6373907e56ce65b59fc907c292c3e81a4938c1fcdc7
|
|
| MD5 |
6a2bd188dbe24f03a2f38e1f06b83a9b
|
|
| BLAKE2b-256 |
3ebe2b0e263bb82cf0c7fd30f621d277c0d3eb31281d0cee95ad869929d20c10
|
Provenance
The following attestation bundles were made for gowa-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on ilanbenb/gowa-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gowa-0.1.0-py3-none-any.whl -
Subject digest:
42264ab04b6934cdd276a6373907e56ce65b59fc907c292c3e81a4938c1fcdc7 - Sigstore transparency entry: 926227083
- Sigstore integration time:
-
Permalink:
ilanbenb/gowa-python@4816dbc2a20939d7fbe9d63bf934abcf407646dd -
Branch / Tag:
refs/heads/main - Owner: https://github.com/ilanbenb
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4816dbc2a20939d7fbe9d63bf934abcf407646dd -
Trigger Event:
workflow_dispatch
-
Statement type: