Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 37 additions & 23 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
lockVersion: 2.0.0
id: 897b2045-55e2-49ca-a37b-2daf10d4e6ea
management:
docChecksum: ff02bf1e8c144fe95e7799aea0b1be3c
docChecksum: 4353aad0a1f8d81581b43bdce3806df7
docVersion: "1.0"
speakeasyVersion: 1.790.3
generationVersion: 2.918.4
releaseVersion: 0.4.0
configChecksum: 9f6d12a6cb2cde14d7e1a9633326a251
speakeasyVersion: 1.795.2
generationVersion: 2.932.9
releaseVersion: 0.5.0
configChecksum: 472a910954f5a15b8cadfca259274c3f
repoURL: https://github.com/criblio/cribl_cloud_management_sdk_python.git
installationURL: https://github.com/criblio/cribl_cloud_management_sdk_python.git
published: true
persistentEdits:
generation_id: 59c86bea-51aa-4897-b765-3e2af6d24759
pristine_commit_hash: e4b11ccb5011daf00f77ad3a66919fb72294116b
pristine_tree_hash: f9f5c3a414e780dfb018386ff748efb804a6ea4d
generation_id: b7536947-c5e4-4983-8d79-67d8646c85ca
pristine_commit_hash: 733a83582536440adc8fa818cc2bfb8104dec381
pristine_tree_hash: 84f96db8fcd3d29377cfe74e3b02d1b943a38d71
features:
python:
additionalDependencies: 1.1.0
core: 6.0.34
core: 6.1.0
defaultEnabledRetries: 0.2.0
devContainers: 3.0.0
enumUnions: 0.1.1
Expand All @@ -30,10 +30,10 @@ features:
groups: 3.0.1
methodArguments: 1.1.1
nameOverrides: 3.0.3
oauth2ClientCredentials: 2.1.5
oauth2ClientCredentials: 2.1.6
openEnums: 1.0.4
responseFormat: 1.1.0
retries: 3.0.7
retries: 3.1.0
sdkHooks: 1.3.0
trackedFiles:
.devcontainer/README.md:
Expand Down Expand Up @@ -106,8 +106,8 @@ trackedFiles:
pristine_git_object: a4886fefe1c5169da6561abde34b4849eb323ca4
docs/models/product.md:
id: c91436bbe13a
last_write_checksum: sha1:6e30dbc5e1039740113430bfe3e9d35f7bce10bf
pristine_git_object: 55e3863ae7faeccffc5a45c62df55304b28fe97c
last_write_checksum: sha1:c7e1f67231481691208aab0f00a23ad1e2a1f74d
pristine_git_object: 58ada7e3069307d112964bd63a7f23368db5ce15
docs/models/productroleschema.md:
id: 38abbf7af6b1
last_write_checksum: sha1:2db58f983775333af362f740d602d6bd30c64d1e
Expand Down Expand Up @@ -250,8 +250,8 @@ trackedFiles:
pristine_git_object: fde5e0418e98324b2b3b2a8e02559e575b2f6cfa
pyproject.toml:
id: 5d07e7d72637
last_write_checksum: sha1:4ba9858e221e1db13f1e061708c802ffdd8e074c
pristine_git_object: 105d87499423c0bece9467c8a384b64faf0396ed
last_write_checksum: sha1:233cd39744c45c64f28ff31323c4294f3b463187
pristine_git_object: 9dca51ddcf109d052ff300feb73d71bd480a0e0f
scripts/prepare_readme.py:
id: e0c5957a6035
last_write_checksum: sha1:24bfcb3bc609310d0b86cb75ca844b42d4c9c248
Expand Down Expand Up @@ -282,8 +282,8 @@ trackedFiles:
pristine_git_object: c4dbfc9dc2f712029811f523ecfa50bebebb13fc
src/cribl_mgmt_plane/_version.py:
id: 8ec199fcd31a
last_write_checksum: sha1:9fe734a713c4e7172283349501a7030b2ff9bc50
pristine_git_object: cd3491b2d64738e8b38e70c13543aa9524479c81
last_write_checksum: sha1:e0e72ed6eaa48b2aa178764a9588b518efe5bdbe
pristine_git_object: 61e620a6593e19e76da700ce321b357f386b87f8
src/cribl_mgmt_plane/apicredentials.py:
id: d344dfa0de1f
last_write_checksum: sha1:ba1681e1e3515d0fcdfe1b49e24c47f6eb2b6058
Expand Down Expand Up @@ -362,8 +362,8 @@ trackedFiles:
pristine_git_object: 535a5ee57d35197513688f8e9ef04074b4bf2a09
src/cribl_mgmt_plane/models/productroleschema.py:
id: 248b5fc5d37e
last_write_checksum: sha1:0f31f589c6a96f55c2e2fd39340b7f34677ce551
pristine_git_object: e1b2262bf15625accae3ad852fc18eebc415327c
last_write_checksum: sha1:1da1d6d39e57d615855e7884a37fe5dcbe45b7fd
pristine_git_object: cbb45ca40ac0e2588512fa836056269312ae8c50
src/cribl_mgmt_plane/models/schemeclientoauth.py:
id: f12e60add63a
last_write_checksum: sha1:efd1cb34c025d16dde8f018f43e65cce0c9a2eea
Expand Down Expand Up @@ -506,8 +506,8 @@ trackedFiles:
pristine_git_object: 591415af8e64baa410627b507d2740afb5387d13
src/cribl_mgmt_plane/utils/retries.py:
id: e0e855f01c10
last_write_checksum: sha1:3585b891142f30a597fbf7a2f0340700babef8e4
pristine_git_object: ca7b59efebbbd9545744d0207ef42725c4cc5143
last_write_checksum: sha1:481dfc7cd6a07a3987f0f443e91bee72888ae41d
pristine_git_object: c7418a62826fc73990a52e70df0d54093c5e2a57
src/cribl_mgmt_plane/utils/security.py:
id: 6e9559bdd145
last_write_checksum: sha1:b978112e0dd964d585f424d151228d1d18995ba0
Expand All @@ -526,8 +526,8 @@ trackedFiles:
pristine_git_object: c78ccbae426ce6d385709d97ce0b1c2813ea2418
src/cribl_mgmt_plane/utils/values.py:
id: 5b5277a50d83
last_write_checksum: sha1:acaa178a7c41ddd000f58cc691e4632d925b2553
pristine_git_object: dae01a44384ac3bc13ae07453a053bf6c898ebe3
last_write_checksum: sha1:65e1ee8607767a4fc1ae7a55c74d77a23ab3cef1
pristine_git_object: ac217f473c5d52a454a2979b3eb35e66175d365c
src/cribl_mgmt_plane/workspaces.py:
id: bd7d8da788fc
last_write_checksum: sha1:9cb4d3fbd5714fd2657327a0c61aada6af9d8385
Expand Down Expand Up @@ -654,6 +654,20 @@ examples:
examplesVersion: 1.0.2
generatedTests:
dummyServiceStatus: "2025-07-02T19:49:08+02:00"
releaseNotes: |
## Python SDK Changes

This version of the SDK is generated for Cribl.Cloud.

### API Credentials — Insights product

`insights` is now a valid product on API credential workspace roles: set on create and update; returned on list and get.

* `cribl_mgmt_plane.api_credentials.list()` — `response.items[].roles.workspaces[].products[].product` (`insights`)
* `cribl_mgmt_plane.api_credentials.create()` — `request.roles.workspaces[].products[].product`; `response.roles.workspaces[].products[].product` (`insights`)
* `cribl_mgmt_plane.api_credentials.update()` — `request.roles.workspaces[].products[].product` (`insights`)
* `cribl_mgmt_plane.api_credentials.get()` — `response.roles.workspaces[].products[].product` (`insights`)

generatedFiles:
- .devcontainer/README.md
- .devcontainer/devcontainer.json
Expand Down
3 changes: 2 additions & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ generation:
generateNewTests: false
skipResponseBodyAssertions: false
python:
version: 0.4.0
version: 0.5.0
additionalDependencies:
dev: {}
main: {}
Expand Down Expand Up @@ -66,6 +66,7 @@ python:
flatteningOrder: parameters-first
forwardCompatibleEnumsByDefault: true
forwardCompatibleUnionsByDefault: tagged-only
httpClientLibrary: httpx
imports:
option: openapi
paths:
Expand Down
1 change: 1 addition & 0 deletions .speakeasy/out.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@ components:
- search
- stream
- lake
- insights
description: Product name.
x-speakeasy-unknown-values: allow
ProductRole:
Expand Down
14 changes: 7 additions & 7 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
speakeasyVersion: 1.790.3
speakeasyVersion: 1.795.2
sources:
Cribl Cloud Management API:
sourceNamespace: cribl-cloud-management-api
sourceRevisionDigest: sha256:c77143c6cb9382b2267881145e8d9d5fb9cbf56d913cefe254f03dbc74c7268b
sourceBlobDigest: sha256:32512a0b7eb4acffcb144a9e07fd8a594085173d114e19a807308a643222a105
sourceRevisionDigest: sha256:1eaa211c894b44b2abc6795067df9d2292386945b19ad82fbb863d769a8ea301
sourceBlobDigest: sha256:eccfe34b7970af39365b1dfd2c0b84acb516f3fc1883022e065314dcf6c1c9a4
tags:
- latest
- "1.0"
targets:
cribl-mgmt-plane:
source: Cribl Cloud Management API
sourceNamespace: cribl-cloud-management-api
sourceRevisionDigest: sha256:c77143c6cb9382b2267881145e8d9d5fb9cbf56d913cefe254f03dbc74c7268b
sourceBlobDigest: sha256:32512a0b7eb4acffcb144a9e07fd8a594085173d114e19a807308a643222a105
sourceRevisionDigest: sha256:1eaa211c894b44b2abc6795067df9d2292386945b19ad82fbb863d769a8ea301
sourceBlobDigest: sha256:eccfe34b7970af39365b1dfd2c0b84acb516f3fc1883022e065314dcf6c1c9a4
codeSamplesNamespace: cribl-cloud-management-api-python-code-samples
codeSamplesRevisionDigest: sha256:7ca3ddec5b2004440921f1ffb6bc66c7f0858950fad9a7f39b5186f508550f13
codeSamplesRevisionDigest: sha256:6d21022fef78a08dc976aad3e8bb650a915ac8f35e1f4f9098bcadc59573d81a
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.790.3
speakeasyVersion: 1.795.2
sources:
Cribl Cloud Management API:
inputs:
Expand Down
14 changes: 14 additions & 0 deletions README-PYPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,20 @@ class CustomClient(AsyncHttpClient):

s = CriblMgmtPlane(async_client=CustomClient(httpx.AsyncClient()))
```
### httpx2 (Pydantic's httpx fork)

[httpx2](https://httpx2.pydantic.dev/) is Pydantic's maintained fork of `httpx`. To run this SDK on httpx2, call `alias_httpx()` at your program's entry point, before importing the SDK, so every `import httpx` — including the ones inside the SDK — resolves to `httpx2`:
```python
import httpx2

httpx2.alias_httpx()

from cribl_mgmt_plane import CriblMgmtPlane

s = CriblMgmtPlane()
```

An SDK can also be generated against httpx2 directly, so it depends on the fork instead of `httpx`, by setting `python.httpClientLibrary: httpx2` in `gen.yaml`.
<!-- End Custom HTTP Client [http-client] -->

<!-- Start Resource Management [resource-management] -->
Expand Down
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,20 @@ class CustomClient(AsyncHttpClient):

s = CriblMgmtPlane(async_client=CustomClient(httpx.AsyncClient()))
```
### httpx2 (Pydantic's httpx fork)

[httpx2](https://httpx2.pydantic.dev/) is Pydantic's maintained fork of `httpx`. To run this SDK on httpx2, call `alias_httpx()` at your program's entry point, before importing the SDK, so every `import httpx` — including the ones inside the SDK — resolves to `httpx2`:
```python
import httpx2

httpx2.alias_httpx()

from cribl_mgmt_plane import CriblMgmtPlane

s = CriblMgmtPlane()
```

An SDK can also be generated against httpx2 directly, so it depends on the fork instead of `httpx`, by setting `python.httpClientLibrary: httpx2` in `gen.yaml`.
<!-- End Custom HTTP Client [http-client] -->

<!-- Start Resource Management [resource-management] -->
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -368,4 +368,14 @@ Based on:
### Generated
- [python v0.4.0] .
### Releases
- [PyPI v0.4.0] https://pypi.org/project/cribl-mgmt-plane/0.4.0 - .
- [PyPI v0.4.0] https://pypi.org/project/cribl-mgmt-plane/0.4.0 - .

## 2026-08-24 14:53:04
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.795.2 (2.932.9) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.5.0] .
### Releases
- [PyPI v0.5.0] https://pypi.org/project/cribl-mgmt-plane/0.5.0 - .
13 changes: 7 additions & 6 deletions docs/models/product.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ value = Product.EDGE

## Values

| Name | Value |
| -------- | -------- |
| `EDGE` | edge |
| `SEARCH` | search |
| `STREAM` | stream |
| `LAKE` | lake |
| Name | Value |
| ---------- | ---------- |
| `EDGE` | edge |
| `SEARCH` | search |
| `STREAM` | stream |
| `LAKE` | lake |
| `INSIGHTS` | insights |
2 changes: 1 addition & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@

[project]
name = "cribl-mgmt-plane"
version = "0.4.0"
version = "0.5.0"
description = "Python Client SDK Generated by Speakeasy."
authors = [{ name = "Speakeasy" },]
readme = "README-PYPI.md"
requires-python = ">=3.10"
dependencies = [
"httpcore >=1.0.9",
"httpx >=0.28.1",
"pydantic >=2.11.2,<2.13",
"pydantic >=2.11.2",
]

[tool.poetry]
Expand Down
6 changes: 3 additions & 3 deletions src/cribl_mgmt_plane/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
import importlib.metadata

__title__: str = "cribl-mgmt-plane"
__version__: str = "0.4.0"
__version__: str = "0.5.0"
__openapi_doc_version__: str = "1.0"
__gen_version__: str = "2.918.4"
__user_agent__: str = "speakeasy-sdk/python 0.4.0 2.918.4 1.0 cribl-mgmt-plane"
__gen_version__: str = "2.932.9"
__user_agent__: str = "speakeasy-sdk/python 0.5.0 2.932.9 1.0 cribl-mgmt-plane"

try:
if __package__ is not None:
Expand Down
1 change: 1 addition & 0 deletions src/cribl_mgmt_plane/models/productroleschema.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class Product(str, Enum, metaclass=utils.OpenEnumMeta):
SEARCH = "search"
STREAM = "stream"
LAKE = "lake"
INSIGHTS = "insights"


class Role(str, Enum, metaclass=utils.OpenEnumMeta):
Expand Down
34 changes: 24 additions & 10 deletions src/cribl_mgmt_plane/utils/retries.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,18 @@ def __init__(self, inner: Exception):
self.inner = inner


_TRANSPORT_ERROR_NAMES = frozenset({"NetworkError", "TimeoutException"})
_TRANSPORT_ERROR_BASES = frozenset({"TransportError", "RequestError", "HTTPError"})


def _is_transport_error(exception: BaseException) -> bool:
"""Report whether an exception is a connection or timeout failure."""
if isinstance(exception, (httpx.NetworkError, httpx.TimeoutException)):
return True
names = {base.__name__ for base in type(exception).__mro__}
return bool(names & _TRANSPORT_ERROR_NAMES) and _TRANSPORT_ERROR_BASES <= names


def _parse_retry_after_header(response: httpx.Response) -> Optional[int]:
"""Parse Retry-After header from response.

Expand Down Expand Up @@ -207,14 +219,15 @@ def do_request() -> httpx.Response:

if res.status_code == parsed_code:
raise TemporaryError(res)
except (httpx.NetworkError, httpx.TimeoutException) as exception:
if retries.config.retry_connection_errors:
raise

raise PermanentError(exception) from exception
except TemporaryError:
raise
except Exception as exception:
if (
_is_transport_error(exception)
and retries.config.retry_connection_errors
):
raise

raise PermanentError(exception) from exception

return res
Expand Down Expand Up @@ -252,14 +265,15 @@ async def do_request() -> httpx.Response:

if res.status_code == parsed_code:
raise TemporaryError(res)
except (httpx.NetworkError, httpx.TimeoutException) as exception:
if retries.config.retry_connection_errors:
raise

raise PermanentError(exception) from exception
except TemporaryError:
raise
except Exception as exception:
if (
_is_transport_error(exception)
and retries.config.retry_connection_errors
):
raise

raise PermanentError(exception) from exception

return res
Expand Down
2 changes: 2 additions & 0 deletions src/cribl_mgmt_plane/utils/values.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,11 @@ def match_status_codes(status_codes: List[str], status_code: int) -> bool:

T = TypeVar("T")


def cast_partial(typ):
return partial(cast, typ)


def get_global_from_env(
value: Optional[T], env_key: str, type_cast: Callable[[str], T]
) -> Optional[T]:
Expand Down
Loading