A lightweight WeCom (WeChat Work) webhook client using httpx with custom User-Agent
Project description
qwsend
WeCom (企业微信) webhook client based on httpx with a clear, reusable API. It sets a custom User-Agent built from the project name and version.
- Sync and async clients
- Message types: text, markdown/markdown_v2, image, news, file, voice, template_card
- Media upload helper (file/voice)
- Simple CLI:
qwsend "hello" --key <key>
Install
pip install qwsend
Quick start
from qwsend import WebhookClient
client = WebhookClient(key="<your_key>")
client.send_text("hello world")
client.send_markdown("**bold**")
client.close()
Async:
import asyncio
from qwsend import AsyncWebhookClient
async def main():
client = AsyncWebhookClient(key="<your_key>")
await client.send_text("hello async")
await client.aclose()
asyncio.run(main())
CLI:
# PowerShell
$env:QWSEND_WEBHOOK_KEY = "<your_key>"
qwsend "hello from CLI"
qwsend "**markdown**" --markdown
User-Agent
The client uses a UA like: qwsend/0.1.0 (+https://pypi.org/project/qwsend/).
Tests
- Dry tests: run without network
- Wet tests: live webhook calls, enabled when
QWSEND_WEBHOOK_KEYis set
pytest -m "not wet" # dry only
pytest -m wet # wet only (requires env)
Packaging
This project uses pyproject.toml with setuptools. Build and publish:
python -m build
python -m twine upload dist/*
License
MIT
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 qwsend-0.1.0.tar.gz.
File metadata
- Download URL: qwsend-0.1.0.tar.gz
- Upload date:
- Size: 8.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ffe614462f959ef21428bd5ff0ee5875965ce71032be38b8068486db848163ea
|
|
| MD5 |
2c74e4a51e039d4487b09083e5c12ccf
|
|
| BLAKE2b-256 |
38e0a318a4768350b376d8514ed07481edafb2e4ad798aebaeec2e393a04bfa9
|
Provenance
The following attestation bundles were made for qwsend-0.1.0.tar.gz:
Publisher:
release.yml on ZhulongNT/qwsend
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qwsend-0.1.0.tar.gz -
Subject digest:
ffe614462f959ef21428bd5ff0ee5875965ce71032be38b8068486db848163ea - Sigstore transparency entry: 630059852
- Sigstore integration time:
-
Permalink:
ZhulongNT/qwsend@7779f3c126c285651a919ccf4ee25e95534aecf3 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/ZhulongNT
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7779f3c126c285651a919ccf4ee25e95534aecf3 -
Trigger Event:
release
-
Statement type:
File details
Details for the file qwsend-0.1.0-py3-none-any.whl.
File metadata
- Download URL: qwsend-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.2 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 |
c0d8e52c4a5d37b9e561a303923b1da2647c430cca9343ce7197ab97c2d7ca85
|
|
| MD5 |
50ff774863c448c62821600b2a527f9a
|
|
| BLAKE2b-256 |
d79c0e8dd5778e3a1f3685b329e2f69934f6811c51d31ef3208e0c00b96c978d
|
Provenance
The following attestation bundles were made for qwsend-0.1.0-py3-none-any.whl:
Publisher:
release.yml on ZhulongNT/qwsend
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qwsend-0.1.0-py3-none-any.whl -
Subject digest:
c0d8e52c4a5d37b9e561a303923b1da2647c430cca9343ce7197ab97c2d7ca85 - Sigstore transparency entry: 630059859
- Sigstore integration time:
-
Permalink:
ZhulongNT/qwsend@7779f3c126c285651a919ccf4ee25e95534aecf3 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/ZhulongNT
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7779f3c126c285651a919ccf4ee25e95534aecf3 -
Trigger Event:
release
-
Statement type: