Skip to content

python-sdk: public Codex API, thread/turn controls, and UX examples#13954

Closed
shaqayeq-oai wants to merge 2 commits intomainfrom
shaqayeq/python-sdk-public-api
Closed

python-sdk: public Codex API, thread/turn controls, and UX examples#13954
shaqayeq-oai wants to merge 2 commits intomainfrom
shaqayeq/python-sdk-public-api

Conversation

@shaqayeq-oai
Copy link
Copy Markdown
Collaborator

Summary

Logic/UX PR stacked on top of #2.

This PR contains runtime-facing SDK logic and developer experience work:

  • public SDK logic layer (Codex, async wrappers, minimal surface, typed helpers)
  • standalone examples (each folder has runnable sync.py + async.py)
  • real integration coverage for examples (tests/test_real_app_server_integration.py)
  • advanced walkthrough notebook:
    • sdk/python/notebooks/sdk_walkthrough.ipynb

Scope boundary

Validation run

  • pytest passes
  • RUN_REAL_CODEX_TESTS=1 pytest tests/test_real_app_server_integration.py passes

Base

@etraut-openai etraut-openai added the oai PRs contributed by OpenAI employees label Mar 9, 2026
@shaqayeq-oai shaqayeq-oai force-pushed the shaqayeq/python-sdk-public-api branch from 03e34cb to f79e780 Compare March 10, 2026 07:59
## Summary
Foundation PR only (base for PR #3).

This PR contains the SDK runtime foundation and generated artifacts:

- pinned runtime binary in `sdk/python/bin/` (`codex` or `codex.exe` by
platform)
- single maintenance script:
`sdk/python/scripts/update_sdk_artifacts.py`
- generated protocol/types artifacts under:
  - `sdk/python/src/codex_app_server/generated/protocol_types.py`
  - `sdk/python/src/codex_app_server/generated/schema_types.py`
  - `sdk/python/src/codex_app_server/generated/v2_all/*`
- generation-contract test wiring (`tests/test_contract_generation.py`)

## Release asset behavior
`update_sdk_artifacts.py` now:
- selects latest release by channel (`--channel stable|alpha`)
- resolves the correct asset for current OS/arch
- extracts platform binary (`codex` on macOS/Linux, `codex.exe` on
Windows)
- keeps runtime on single pinned binary source in `sdk/python/bin/`

## Scope boundary
- ✅ PR #2 = binary + generation pipeline + generated types foundation
- ❌ PR #2 does **not** include examples/integration logic polish (that
is PR #3)

## Validation
- Ran: `python scripts/update_sdk_artifacts.py --channel stable`
- Regenerated and committed resulting generated artifacts
- Local tests pass on branch
Base automatically changed from shaqayeq/python-sdk-types-foundation to main March 10, 2026 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

oai PRs contributed by OpenAI employees

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants