14 lines
826 B
Markdown
14 lines
826 B
Markdown
# Plan: Add async examples to the wiki usage guide
|
|
|
|
The `docs/usage.md` guide currently only shows sync usage in its per-section examples. The user wants every major example to also demonstrate the equivalent async pattern with `AsyncConduitClient` and `await`.
|
|
|
|
## Approach
|
|
|
|
1. Keep the existing sync examples intact.
|
|
2. Add matching async examples immediately after each sync snippet (Authentication, Gateway keys/SMS/media/torrents/wiki/compute/DNS, timeouts/retries, error handling, free-form bodies).
|
|
3. Make the pattern consistent across all snippets:
|
|
- sync: `with ConduitClient(...) as client:`
|
|
- async: `async with AsyncConduitClient(...) as client:` and `await client...`
|
|
4. Ensure required imports (`asyncio`, `AsyncConduitClient`) are shown where needed.
|
|
5. Run `ruff` and `pytest` to confirm nothing broke.
|