cribl-control-plane 0.0.47__py3-none-any.whl → 0.0.49__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of cribl-control-plane might be problematic. Click here for more details.
- cribl_control_plane/_version.py +3 -3
- cribl_control_plane/sdk.py +2 -2
- cribl_control_plane/utils/annotations.py +32 -8
- {cribl_control_plane-0.0.47.dist-info → cribl_control_plane-0.0.49.dist-info}/METADATA +2 -1
- {cribl_control_plane-0.0.47.dist-info → cribl_control_plane-0.0.49.dist-info}/RECORD +6 -6
- {cribl_control_plane-0.0.47.dist-info → cribl_control_plane-0.0.49.dist-info}/WHEEL +1 -1
cribl_control_plane/_version.py
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
import importlib.metadata
|
|
4
4
|
|
|
5
5
|
__title__: str = "cribl-control-plane"
|
|
6
|
-
__version__: str = "0.0.
|
|
6
|
+
__version__: str = "0.0.49"
|
|
7
7
|
__openapi_doc_version__: str = "4.14.0-837595d5"
|
|
8
|
-
__gen_version__: str = "2.
|
|
8
|
+
__gen_version__: str = "2.716.10"
|
|
9
9
|
__user_agent__: str = (
|
|
10
|
-
"speakeasy-sdk/python 0.0.
|
|
10
|
+
"speakeasy-sdk/python 0.0.49 2.716.10 4.14.0-837595d5 cribl-control-plane"
|
|
11
11
|
)
|
|
12
12
|
|
|
13
13
|
try:
|
cribl_control_plane/sdk.py
CHANGED
|
@@ -88,7 +88,7 @@ class CriblControlPlane(BaseSDK):
|
|
|
88
88
|
"""
|
|
89
89
|
client_supplied = True
|
|
90
90
|
if client is None:
|
|
91
|
-
client = httpx.Client()
|
|
91
|
+
client = httpx.Client(follow_redirects=True)
|
|
92
92
|
client_supplied = False
|
|
93
93
|
|
|
94
94
|
assert issubclass(
|
|
@@ -97,7 +97,7 @@ class CriblControlPlane(BaseSDK):
|
|
|
97
97
|
|
|
98
98
|
async_client_supplied = True
|
|
99
99
|
if async_client is None:
|
|
100
|
-
async_client = httpx.AsyncClient()
|
|
100
|
+
async_client = httpx.AsyncClient(follow_redirects=True)
|
|
101
101
|
async_client_supplied = False
|
|
102
102
|
|
|
103
103
|
if debug_logger is None:
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
from enum import Enum
|
|
4
4
|
from typing import Any, Optional
|
|
5
5
|
|
|
6
|
+
|
|
6
7
|
def get_discriminator(model: Any, fieldname: str, key: str) -> str:
|
|
7
8
|
"""
|
|
8
9
|
Recursively search for the discriminator attribute in a model.
|
|
@@ -25,31 +26,54 @@ def get_discriminator(model: Any, fieldname: str, key: str) -> str:
|
|
|
25
26
|
|
|
26
27
|
if isinstance(field, dict):
|
|
27
28
|
if key in field:
|
|
28
|
-
return f
|
|
29
|
+
return f"{field[key]}"
|
|
29
30
|
|
|
30
31
|
if hasattr(field, fieldname):
|
|
31
32
|
attr = getattr(field, fieldname)
|
|
32
33
|
if isinstance(attr, Enum):
|
|
33
|
-
return f
|
|
34
|
-
return f
|
|
34
|
+
return f"{attr.value}"
|
|
35
|
+
return f"{attr}"
|
|
35
36
|
|
|
36
37
|
if hasattr(field, upper_fieldname):
|
|
37
38
|
attr = getattr(field, upper_fieldname)
|
|
38
39
|
if isinstance(attr, Enum):
|
|
39
|
-
return f
|
|
40
|
-
return f
|
|
40
|
+
return f"{attr.value}"
|
|
41
|
+
return f"{attr}"
|
|
41
42
|
|
|
42
43
|
return None
|
|
43
44
|
|
|
45
|
+
def search_nested_discriminator(obj: Any) -> Optional[str]:
|
|
46
|
+
"""Recursively search for discriminator in nested structures."""
|
|
47
|
+
# First try direct field lookup
|
|
48
|
+
discriminator = get_field_discriminator(obj)
|
|
49
|
+
if discriminator is not None:
|
|
50
|
+
return discriminator
|
|
51
|
+
|
|
52
|
+
# If it's a dict, search in nested values
|
|
53
|
+
if isinstance(obj, dict):
|
|
54
|
+
for value in obj.values():
|
|
55
|
+
if isinstance(value, list):
|
|
56
|
+
# Search in list items
|
|
57
|
+
for item in value:
|
|
58
|
+
nested_discriminator = search_nested_discriminator(item)
|
|
59
|
+
if nested_discriminator is not None:
|
|
60
|
+
return nested_discriminator
|
|
61
|
+
elif isinstance(value, dict):
|
|
62
|
+
# Search in nested dict
|
|
63
|
+
nested_discriminator = search_nested_discriminator(value)
|
|
64
|
+
if nested_discriminator is not None:
|
|
65
|
+
return nested_discriminator
|
|
66
|
+
|
|
67
|
+
return None
|
|
44
68
|
|
|
45
69
|
if isinstance(model, list):
|
|
46
70
|
for field in model:
|
|
47
|
-
discriminator =
|
|
71
|
+
discriminator = search_nested_discriminator(field)
|
|
48
72
|
if discriminator is not None:
|
|
49
73
|
return discriminator
|
|
50
74
|
|
|
51
|
-
discriminator =
|
|
75
|
+
discriminator = search_nested_discriminator(model)
|
|
52
76
|
if discriminator is not None:
|
|
53
77
|
return discriminator
|
|
54
78
|
|
|
55
|
-
raise ValueError(f
|
|
79
|
+
raise ValueError(f"Could not find discriminator field {fieldname} in {model}")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cribl-control-plane
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.49
|
|
4
4
|
Summary: Python Client SDK Generated by Speakeasy.
|
|
5
5
|
Author: Speakeasy
|
|
6
6
|
Requires-Python: >=3.9.2
|
|
@@ -176,6 +176,7 @@ with CriblControlPlane(
|
|
|
176
176
|
</br>
|
|
177
177
|
|
|
178
178
|
The same SDK client can also be used to make asynchronous requests by importing asyncio.
|
|
179
|
+
|
|
179
180
|
```python
|
|
180
181
|
# Asynchronous Example
|
|
181
182
|
import asyncio
|
|
@@ -4,7 +4,7 @@ cribl_control_plane/_hooks/clientcredentials.py,sha256=p1WN7LL3PHrAf4AxXrsOZF_NB
|
|
|
4
4
|
cribl_control_plane/_hooks/registration.py,sha256=1QZB41w6If7I9dXiOSQx6dhSc6BPWrnI5Q5bMOr4iVA,624
|
|
5
5
|
cribl_control_plane/_hooks/sdkhooks.py,sha256=ggXjME1_Rdv8CVCg1XHqB83eYtbxzKyhXyfQ36Yc1gA,2816
|
|
6
6
|
cribl_control_plane/_hooks/types.py,sha256=Tw_C4zTZm01rW_89VDEUpvQ8KQr1WxN0Gu_-s_fYSPc,2998
|
|
7
|
-
cribl_control_plane/_version.py,sha256=
|
|
7
|
+
cribl_control_plane/_version.py,sha256=M-sb37i2ySaffyQUw4gqxZHqxl_J_MRK7IEvXFNkeNs,512
|
|
8
8
|
cribl_control_plane/acl.py,sha256=8lvYOKAli4PzsQhOVaCU6YCwblPMh9jQo04L0r4HJuQ,9025
|
|
9
9
|
cribl_control_plane/auth_sdk.py,sha256=3sjf1VoyWwfhSyuMDQLixgWISSf03BOZwmkiT8g5Ruw,626
|
|
10
10
|
cribl_control_plane/basesdk.py,sha256=y4yIXSNVXLMd0sLS2htBFdTCI3gkPQbIWd-C671kg1I,12249
|
|
@@ -292,7 +292,7 @@ cribl_control_plane/pipelines.py,sha256=jeU-R5NDOsLXrV-5t7Cz-RPidsQ4KwNN4-_oW9iN
|
|
|
292
292
|
cribl_control_plane/py.typed,sha256=zrp19r0G21lr2yRiMC0f8MFkQFGj9wMpSbboePMg8KM,59
|
|
293
293
|
cribl_control_plane/routes_sdk.py,sha256=aqJkB-EbLzA2NSFtu9N7ERta5BvIbpDRg7OZcO_ndkA,33197
|
|
294
294
|
cribl_control_plane/samples.py,sha256=41bJGkB-lxj8WmeI-418PwgMT2KPKqlINp26CKwt0Yk,16067
|
|
295
|
-
cribl_control_plane/sdk.py,sha256=
|
|
295
|
+
cribl_control_plane/sdk.py,sha256=4sX7RKhsgrFTOlw5aXvG3Mrwt-pTzMdEip4cLZ-j9cA,8016
|
|
296
296
|
cribl_control_plane/sdkconfiguration.py,sha256=bit6SSOyHqvibdtgNad5_ZcgMotk8NJfgHpKsBK8HFg,1259
|
|
297
297
|
cribl_control_plane/sources.py,sha256=9JCNHdOGmMAGjBIYvzA7TSQsj6o6UEe89SHyQ_MGrSk,37120
|
|
298
298
|
cribl_control_plane/statuses.py,sha256=jVfnmt3M0aiKJ3tgB2WlMaCmKDPZCJoD-1Kh8p-37ZM,8013
|
|
@@ -302,7 +302,7 @@ cribl_control_plane/tokens.py,sha256=iP_0_Pl8LFgs_ektBTU-bvRjJq6JQ3q7qMWIeIIuXmc
|
|
|
302
302
|
cribl_control_plane/types/__init__.py,sha256=RArOwSgeeTIva6h-4ttjXwMUeCkz10nAFBL9D-QljI4,377
|
|
303
303
|
cribl_control_plane/types/basemodel.py,sha256=L79WXvTECbSqaJzs8D3ud_KdIWkU7Cx2wbohDAktE9E,1127
|
|
304
304
|
cribl_control_plane/utils/__init__.py,sha256=CAG0O76aEToGKXpT6Ft87Vd-iiQTh4XdBrQ37BVbsiM,5861
|
|
305
|
-
cribl_control_plane/utils/annotations.py,sha256=
|
|
305
|
+
cribl_control_plane/utils/annotations.py,sha256=FvfvVTUj8TUclm4HbGgY5yi2Ap7EzGmu2UPFU4FwC1w,2755
|
|
306
306
|
cribl_control_plane/utils/datetimes.py,sha256=oppAA5e3V35pQov1-FNLKxAaNF1_XWi-bQtyjjql3H8,855
|
|
307
307
|
cribl_control_plane/utils/enums.py,sha256=REU6ydF8gsVL3xaeGX4sMNyiL3q5P9h29-f6Sa6luAE,2633
|
|
308
308
|
cribl_control_plane/utils/eventstreaming.py,sha256=SgFqMcUOYKlrTQ4gAp_dNcKLvDXukeiEMNU3DP8mXk8,6692
|
|
@@ -320,6 +320,6 @@ cribl_control_plane/utils/url.py,sha256=BgGPgcTA6MRK4bF8fjP2dUopN3NzEzxWMXPBVg8N
|
|
|
320
320
|
cribl_control_plane/utils/values.py,sha256=CcaCXEa3xHhkUDROyXZocN8f0bdITftv9Y0P9lTf0YM,3517
|
|
321
321
|
cribl_control_plane/versions.py,sha256=4xdTYbM84Xyjr5qkixqNpgn2q6V8aXVYXkEPDU2Ele0,1156
|
|
322
322
|
cribl_control_plane/versions_configs.py,sha256=5CKcfN4SzuyFgggrx6O8H_h3GhNyKSbfdVhSkVGZKi4,7284
|
|
323
|
-
cribl_control_plane-0.0.
|
|
324
|
-
cribl_control_plane-0.0.
|
|
325
|
-
cribl_control_plane-0.0.
|
|
323
|
+
cribl_control_plane-0.0.49.dist-info/METADATA,sha256=OVrOii4-50sIxxS9J7VP-zv_bnYyTfPP_2yIaRhJn1w,38884
|
|
324
|
+
cribl_control_plane-0.0.49.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
325
|
+
cribl_control_plane-0.0.49.dist-info/RECORD,,
|