Skip to content

[4/6] Define Python SDK public API surface#21896

Open
aibrahim-oai wants to merge 3 commits intocodex/python-sdk-cifrom
codex/python-sdk-public-root-api
Open

[4/6] Define Python SDK public API surface#21896
aibrahim-oai wants to merge 3 commits intocodex/python-sdk-cifrom
codex/python-sdk-public-root-api

Conversation

@aibrahim-oai
Copy link
Copy Markdown
Collaborator

@aibrahim-oai aibrahim-oai commented May 9, 2026

Stack

This PR is the fourth change in the stack, on top of #21895.

Why

The Python SDK package root should stay small and ergonomic. Generated app-server schema objects are still useful for typing, response handling, and notification matching, but exporting them from the root makes it unclear which names are SDK entrypoints and which names are wire/value models.

Python cannot hide shipped submodules, so this PR makes the public import contract explicit: root exports are the client-facing SDK API, and codex_app_server.types is the supported home for app-server value and event models.

What changed

  • Shrink codex_app_server.__all__ to config, clients/handles, input helpers, retry helpers, and public errors.
  • Add codex_app_server.types for supported app-server response, event, enum, and helper model exports.
  • Update SDK docs and runnable examples to import app-server types from codex_app_server.types.
  • Extend public API tests to lock root exports, type-module exports, star-import behavior, and examples’ public import surface.

Verification

  • git diff --check
  • CI is running on this PR.

Co-authored-by: Codex <noreply@openai.com>
@aibrahim-oai
Copy link
Copy Markdown
Collaborator Author

aibrahim-oai and others added 2 commits May 9, 2026 10:39
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
@aibrahim-oai aibrahim-oai changed the title [4/4] Narrow Python SDK root exports [4/4] Define Python SDK public API surface May 9, 2026
@aibrahim-oai aibrahim-oai changed the title [4/4] Define Python SDK public API surface [4/4] Define Python SDK public package surface May 9, 2026
@aibrahim-oai aibrahim-oai force-pushed the codex/python-sdk-public-root-api branch from 78c0d5c to 9306e60 Compare May 9, 2026 08:43
@aibrahim-oai aibrahim-oai changed the title [4/4] Define Python SDK public package surface [4/5] Define Python SDK public API surface May 9, 2026
@aibrahim-oai aibrahim-oai changed the title [4/5] Define Python SDK public API surface [4/6] Define Python SDK public API surface May 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant