snip.api.schemas¶
Interface with schema related endpoints.
Provides functions to retrieve available schemas and specific schema details from a given snip deployment.
Functions
|
Get all available schemas from the deployment. |
|
Get a schema from the deployment. |
Module Functions
- snip.api.schemas.get_available_schemas(deployment: str | None = None, **kwargs) list[str]¶
Get all available schemas from the deployment.
- Parameters:
deployment (str, optional) – The deployment to get the available schemas from. If None, the default deployment is used.
**kwargs (Any) – Additional keyword arguments to pass to the requests.get function.
- Returns:
The list of available schemas.
- Return type:
- Raises:
requests.HTTPError – If the request to the deployment fails. Should only happen if the deployment is not reachable.
- snip.api.schemas.get_schema(name: str, deployment: str | None = None, **kwargs) Dict¶
Get a schema from the deployment.
- Parameters:
- Returns:
The schema object.
- Return type:
Dict
- Raises:
requests.HTTPError – If the request to the deployment fails. Can happen if the deployment is not reachable or if the schema is not found. Check the response for more information.