Skip to main content

weflow-sdk

Typed Python client for weflow-server, a read-only HTTP/SSE service over local WeChat 4.x databases.

Install

pip install weflow-sdk

Minimal example

import asyncio

from weflow_sdk import Client


async def main() -> None:
    client = Client(base_url="http://127.0.0.1:5033", token="<token>")
    await client.health()
    sessions = await client.list_all_sessions()
    await client.aclose()

asyncio.run(main())

SyncClient mirrors Client method-for-method and drives its own private event-loop thread.

Generated and handwritten layers

Types are generated; the behavior layer is handwritten. Never edit generated/ — run python scripts/regen.py.

Scope

Source databases stay read-only. sync refreshes the in-memory index; media export writes local copies.

SNS timelines are the one gap: the server has those endpoints, the generated layer does not wrap them yet.

Targeted media recovery

Restore one unique message with export_media_by_message(talker, platform_message_id, sender, timestamp).

The result provides the actual mediaId, fileName and credential-free relative mediaUrl.

media_bytes tries the existing filename first. After a 404 it exports the target once and fetches the returned handle once.

  • 404: target or original media missing.
  • 409: ambiguous target or registration changed.
  • 422: no supported local media.
  • 405/501: server lacks targeted export; upgrade it before recovery.

I/O and decode errors propagate. No recent-message search is used.

Metadata

Release files for weflow-sdk 0.11.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 weflow-sdk 0.11.0
File Size Uploaded Provenance Actions
weflow_sdk-0.11.0.tar.gz 101.4 kB With provenance Details for weflow_sdk-0.11.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for weflow-sdk 0.11.0
File Interpreter ABI Platform Actions
weflow_sdk-0.11.0-py3-none-any.whl Python 3 none any Details for weflow_sdk-0.11.0-py3-none-any.whl

Total release size: 243.1 kB

Release files / weflow_sdk-0.11.0.tar.gz

Download URL weflow_sdk-0.11.0.tar.gz
Size 101.4 kB
Tags Source
SHA-256 checksum
How to use checksums
b1dea0c8679a01714fcd2c2a0a0fcd2fcf5f8d3e694bef9b189fd74c846bf939
BLAKE2b-256 checksum
How to use checksums
a647ea9f5c59fe7515ed0e3ac7baf64326ad3833b07188f081e1f2a560a0e34f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.

Transparency log

Release files / weflow_sdk-0.11.0-py3-none-any.whl

Download URL weflow_sdk-0.11.0-py3-none-any.whl
Size 141.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cedcb7de6815e102c166a875284bbabd2513378f1f0247b450d45fc787b67954
BLAKE2b-256 checksum
How to use checksums
1124ed9c1b131bc4e6454e31ebf8d53a0b71370c87adf2dc6d8be71789d8c921
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.

Transparency log

Security for weflow-sdk 0.11.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for weflow_sdk-0.11.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.

Transparency log

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