sdk/python/examples/README.md
Each example folder contains runnable versions:
sync.py (public sync surface: Codex)async.py (public async surface: AsyncCodex)All examples intentionally use only public SDK exports from codex_app_server.
>=3.10Recommended setup (from sdk/python):
python -m venv .venv
source .venv/bin/activate
python -m pip install -U pip
python -m pip install -e .
When running examples from this repo checkout, the SDK source uses the local
tree and does not bundle a runtime binary. The helper in examples/_bootstrap.py
uses the installed codex-cli-bin runtime package.
If the pinned codex-cli-bin runtime is not already installed, the bootstrap
will download the matching GitHub release artifact, stage a temporary local
codex-cli-bin package, install it into your active interpreter, and clean up
the temporary files afterward.
Current pinned runtime version: 0.116.0-alpha.1
From sdk/python:
python examples/<example-folder>/sync.py
python examples/<example-folder>/async.py
The examples bootstrap local imports from sdk/python/src automatically, so no
SDK wheel install is required. You only need the Python dependencies for your
active interpreter and an installed codex-cli-bin runtime package (either
already present or automatically provisioned by the bootstrap).
python examples/01_quickstart_constructor/sync.py
python examples/01_quickstart_constructor/async.py
01_quickstart_constructor/
02_turn_run/
03_turn_stream_events/
04_models_and_metadata/
05_existing_thread/
06_thread_lifecycle_and_controls/
07_image_and_text/
08_local_image_and_text/
09_async_parity/
10_error_handling_and_retry/
11_cli_mini_app/
12_turn_params_kitchen_sink/
turn(...) configuration13_model_select_and_turn_params/
14_turn_controls/
steer() and interrupt() demos with concise summaries