codex-python 0.1.1__py3-none-any.whl → 0.1.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codex-python
3
- Version: 0.1.1
3
+ Version: 0.1.2
4
4
  Summary: A minimal Python library scaffold for codex-python
5
5
  Project-URL: Homepage, https://github.com/gersmann/codex-python
6
6
  Project-URL: Repository, https://github.com/gersmann/codex-python
@@ -36,6 +36,7 @@ Classifier: Programming Language :: Python :: 3 :: Only
36
36
  Classifier: Programming Language :: Python :: 3.13
37
37
  Classifier: Typing :: Typed
38
38
  Requires-Python: >=3.13
39
+ Requires-Dist: pydantic>=2.11.7
39
40
  Description-Content-Type: text/markdown
40
41
 
41
42
  # codex-python
@@ -70,6 +71,18 @@ Options:
70
71
  - Full auto: `run_exec("scaffold a cli", full_auto=True)`
71
72
  - Run in another dir: `run_exec("...", cd="/path/to/project")`
72
73
 
74
+ Streaming JSON events (no PyO3 required):
75
+
76
+ ```
77
+ from codex.protocol.runtime import stream_exec_events
78
+
79
+ for event in stream_exec_events("explain this repo", full_auto=True):
80
+ # event is a dict with shape {"id": str, "msg": {...}}
81
+ print(event)
82
+ ```
83
+
84
+ The event payload matches the Pydantic models in `codex.protocol.types` (e.g., `EventMsg`).
85
+
73
86
  Using a client with defaults:
74
87
 
75
88
  ```
@@ -125,6 +138,19 @@ uv publish --token "$PYPI_API_TOKEN"
125
138
  - Format: `make fmt` (ruff formatter)
126
139
  - Pre-commit: `uvx pre-commit install && uvx pre-commit run --all-files`
127
140
 
141
+ ### Protocol bindings (from codex-rs)
142
+
143
+ - Prereq: Rust toolchain (`cargo`) installed.
144
+ - Generate Python types from the upstream protocol with:
145
+
146
+ ```
147
+ make gen-protocol
148
+ ```
149
+
150
+ This will:
151
+ - run `codex-proj/codex-rs/protocol-ts` to emit TypeScript types under `.generated/ts/`
152
+ - convert them to Python `TypedDict`/`Literal` aliases at `codex/protocol/types.py`
153
+
128
154
  ## Project Layout
129
155
 
130
156
  ```
@@ -0,0 +1,9 @@
1
+ codex/__init__.py,sha256=H12NLxWqZAOhHbkZO0rnMRhkdo_9y5DUVTmxyX2ncI0,514
2
+ codex/api.py,sha256=gabhwkBQpdu7QdA_K75m8TPpusC9a4LteyhiZN0cI1Y,5173
3
+ codex/protocol/runtime.py,sha256=lfnlkMYDg303Ug8awiu2FKwmbz3PGWnhTpFng-CsIe4,2229
4
+ codex/protocol/types.py,sha256=852vSY0cdepXcu9DOJakzhsZBYpa0xF9aqBBj9GI_hE,39108
5
+ codex/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
6
+ codex_python-0.1.2.dist-info/METADATA,sha256=swB6w-sW3820mh45KzPfoxlYBGIvAzWjN8N3efzySZg,5083
7
+ codex_python-0.1.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
8
+ codex_python-0.1.2.dist-info/licenses/LICENSE,sha256=ZhGahTKhsCbPWNmZ7ugZ14LVewMo4Gh1OeIOlQabyrI,1066
9
+ codex_python-0.1.2.dist-info/RECORD,,
@@ -1,7 +0,0 @@
1
- codex/__init__.py,sha256=FsirGg1w3wP202sQMBOAOHkjglZU20dtRI6ZFLbN3z4,514
2
- codex/api.py,sha256=aP1OcnMxSF-vJyxwVIllbydmrFiUESsuePvCyYkBXxo,4614
3
- codex/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
4
- codex_python-0.1.1.dist-info/METADATA,sha256=2_XGcNNm1g1q--mnoJSktrsdNo6IbZS3kcI0mcnXlcw,4351
5
- codex_python-0.1.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
6
- codex_python-0.1.1.dist-info/licenses/LICENSE,sha256=ZhGahTKhsCbPWNmZ7ugZ14LVewMo4Gh1OeIOlQabyrI,1066
7
- codex_python-0.1.1.dist-info/RECORD,,