Skip to content

New CDS API Client Interface#81

Open
nmearl wants to merge 10 commits into
cosmicds:mainfrom
nmearl:client-interface
Open

New CDS API Client Interface#81
nmearl wants to merge 10 commits into
cosmicds:mainfrom
nmearl:client-interface

Conversation

@nmearl

@nmearl nmearl commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

This PR introduces an api client interface that is built automatically from the openapi specs produced in the cds-api package.

Generated pydantic models are created by running the /scripts/generate_models.sh file. This produces (currently) two _generated_*.py files in the src/cds_client/models directory. These generated models are then wrapped by proxy models in the src/cds_client/models/base.py and src/cds_client/models/hubble.py files. This is done so that if api definitions change or get renamed, down-stream packages that rely on cds-client will not need to change their model reference names, since they would be using the proxy models.

The README provides examples of using the client to interface with the API.

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