Thank you for your interest in contributing to the IonQ Python client.
git clone https://github.com/ionq/ionq-core-python.git
cd ionq-core-python
uv syncuv run pytest # tests
uv run ruff check # lint
uv run ruff format --check # format check
uv run ty check ionq_core/ # type checkMost of the code in ionq_core/ is auto-generated from the IonQ OpenAPI specification. Do not edit generated files directly -- they will be overwritten on regeneration.
Generated (do not edit):
ionq_core/api/-- endpoint modulesionq_core/models/-- request/response modelsionq_core/client.py,errors.py,types.py
Hand-written (edit freely):
ionq_core/__init__.py-- public API exportsionq_core/ionq_client.py-- IonQClient convenience wrapperionq_core/_exceptions.py-- exception hierarchyionq_core/_extensions.py-- extension API for downstream SDKsionq_core/_transport.py-- retry transportionq_core/_pagination.py-- pagination helpersionq_core/_polling.py-- job polling helperstests/-- all tests
curl -s https://api.ionq.co/v0.4/api-docs -o openapi.json
if [ -f openapi-overlay.yaml ]; then
uvx oas-patch==0.6.0 overlay openapi.json openapi-overlay.yaml -o /tmp/patched-spec.json
else
cp openapi.json /tmp/patched-spec.json
fi
uvx openapi-python-client==0.28.3 generate \
--path /tmp/patched-spec.json \
--meta none \
--config openapi-python-client-config.yaml \
--custom-template-path custom-templates \
--output-path ionq_core \
--overwrite- Keep PRs focused on a single change.
- Add tests for new hand-written code.
- CI must pass before merging (lint, tests, type check, generated code staleness check).
- The generated code staleness check on PRs verifies that
ionq_core/matches what the generator produces. If it fails, regenerate and commit the result.