You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7e202b7
Browse filesBrowse the repository at this point in the historyBrowse files
When you generate a client SDK using `cdd-python from_openapi to_sdk`, the generated directory will contain a `pyproject.toml` and GitHub Actions workflow.
3
+
When you generate a client SDK using `cdd-python-all from_openapi to_sdk`, the generated directory will contain a `pyproject.toml` and GitHub Actions workflow.
4
4
5
5
To automate SDK updates:
6
6
1. Schedule a GitHub Action to fetch the latest OpenAPI spec (e.g., via cron).
7
-
2. Run `cdd-python from_openapi to_sdk` on the fetched spec.
8
-
3. Compare `client.py` using `git status`. If changed, commit and bump the version in `pyproject.toml`.
7
+
2. Run `cdd-python-all from_openapi to_sdk` on the fetched spec.
8
+
3. Compare `src/client.py` using `git status`. If changed, commit and bump the version in `pyproject.toml`.
9
9
4. Run `python3 -m build` and upload to PyPI or your internal package registry.
The `cdd-python`CLI can be used in two main modes:
3
+
The `cdd-python-all` (also installed as `cdd-python`) CLI and `openapi_client` Python SDK provide lossless, bidirectional compilation between OpenAPI 3.2.0 / Swagger 2.0 / Arazzo 1.1.0 specifications and Python source code.
4
4
5
-
1.**from_openapi**: Generate Python SDK or server mock from OpenAPI JSON.
5
+
## CLI Modes
6
+
7
+
1.**`from_openapi`**: Generate a Python Client SDK (`to_sdk`), Client CLI (`to_sdk_cli`), or FastAPI + SQLAlchemy Server (`to_server`) from an OpenAPI JSON file (`-i`) or directory (`-d`).
4.**to_arazzo**: Extract Arazzo 1.1.0 JSON from Python workflow code (`workflows.py`, `cli_workflows.py`, `routes/workflows.py`, or `test_workflows.py`).
27
+
4.**`to_arazzo`**: Extract an Arazzo 1.1.0 JSON specification from Python workflow code (`workflows.py`, `cli_workflows.py`, `routes/workflows.py`, or `test_workflows.py`) or a project directory.
It can also sync directories (`--truth arazzo` or `--truth openapi`), generate docs, or serve a JSON-RPC / MCP interface.
32
+
5.**`sync`**: Synchronize a directory containing `client.py`, `models.py`, `mock_server.py`, `test_client.py`, `cli_main.py`, `workflows.py`, `openapi.json`, and `arazzo.json` with a configurable source of truth (`class`, `sqlalchemy`, `function`, `openapi`, `arazzo`, or `workflow`).
33
+
```bash
34
+
cdd-python-all sync -i my_client --truth openapi
35
+
```
36
+
37
+
6.**`to_docs_json`**: Generate documentation-ready Python code snippets JSON from an OpenAPI or Arazzo specification.
0 commit comments