Python SDK examples README overstates async.py coverage
Open 💬 2 comments Opened Jun 1, 2026 by bar-d
What happened?
sdk/python/examples/README.md says:
Each example folder contains runnable versions:
- sync.py
- async.py
However, sdk/python/examples/09_async_parity/ currently contains sync.py but no async.py. The generic run instructions also tell users to run python examples/<example-folder>/async.py, which does not work for that folder.
Expected behavior
Either every example folder should contain both sync.py and async.py, or the examples README should call out exceptions such as 09_async_parity.
Additional context
I searched open issues and PRs for 09_async_parity, the README wording, and Python SDK examples, and did not find an existing open item that appears to cover this examples-doc mismatch.
2 Comments
I did a quick review and confirmed the documentation mismatch.
The current
sdk/python/examples/README.mdstates:and later instructs users to run:
However,
sdk/python/examples/09_async_parity/currently contains:with no corresponding
async.py.As a result, the README currently establishes a repository-wide contract that is not satisfied by at least one example directory.
---
Root Cause
The issue appears to be documentation drift.
The README assumes a uniform example structure:
while
09_async_parityfollows:Therefore, the documentation and repository contents have diverged.
---
Possible Fixes
Option A — Update Documentation (Recommended)
Adjust the README to describe the actual repository structure.
Suggested patch:
Update execution instructions as well:
or
Option B — Add async.py to 09_async_parity
If the intention is that every example directory should provide both interfaces, then an
async.pyimplementation could be added.Example skeleton:
This preserves the README contract but introduces additional maintenance burden if the example is intentionally sync-only.
---
Best Fit
I recommend Option A.
Reasons:
---
Regression Prevention
To prevent future README/example mismatches, a lightweight validation test could be added.
Example:
Alternatively, if the project wants stronger guarantees, the README itself could become the source of truth and be validated against the filesystem during CI.
---
I'd be happy to prepare a PR implementing the documentation update and adding a regression test if maintainers agree with the proposed direction.
By Anup Das
anupddas8@gmail.com
I prepared a small targeted implementation for this on my fork, since external PRs to this repo appear to be invitation-gated.
Compare: https://github.com/openai/codex/compare/main...SylvainWinning:codex/python-sdk-examples-docs?expand=1
Branch: https://github.com/SylvainWinning/codex/tree/codex/python-sdk-examples-docs
Commit: 9f672b142f09aeb2e751ebdbd1fad2ebd459c26f
What it changes:
sdk/python/examples/README.mdso it says most example folders have bothsync.pyandasync.py.09_async_parity/currently provides onlysync.py.async.pyrun command as# when present.Validation run locally:
uv run --frozen --project sdk/python --only-group test pytest sdk/python/tests/test_artifact_workflow_and_binaries.py -k 'examples_readme'-> 2 passeduv run --frozen --project sdk/python --only-group format ruff format --check sdk/python/tests/test_artifact_workflow_and_binaries.py-> passeduv run --frozen --project sdk/python --only-group format ruff check sdk/python/tests/test_artifact_workflow_and_binaries.py-> passeduv run --frozen --project sdk/python pytest sdk/python/tests/test_artifact_workflow_and_binaries.py-> 36 passedgit diff --check-> passedI did not open a duplicate issue; this comment is intended to keep the implementation attached to this existing report.