cribl-control-plane 0.0.27__py3-none-any.whl → 0.0.28__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.

@@ -1,5 +1,6 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
1
3
  import hashlib
2
- import os
3
4
  import httpx
4
5
  import time
5
6
  from .types import (
@@ -20,13 +21,19 @@ class Credentials:
20
21
  client_id: str
21
22
  client_secret: str
22
23
  token_url: str
23
- audience: str
24
+ additional_properties: Dict[str, str]
24
25
 
25
- def __init__(self, client_id: str, client_secret: str, token_url: str):
26
+ def __init__(
27
+ self,
28
+ client_id: str,
29
+ client_secret: str,
30
+ token_url: str,
31
+ additional_properties: Optional[Dict[str, str]] = None,
32
+ ):
26
33
  self.client_id = client_id
27
34
  self.client_secret = client_secret
28
35
  self.token_url = token_url
29
- self.audience = os.getenv("CRIBLCONTROLPLANE_AUDIENCE", "https://api.cribl.cloud") # Set default audience here
36
+ self.additional_properties = additional_properties or {}
30
37
 
31
38
 
32
39
  class Session:
@@ -135,10 +142,17 @@ class ClientCredentialsHook(SDKInitHook, BeforeRequestHook, AfterErrorHook):
135
142
  if security is None or security.client_oauth is None:
136
143
  return None
137
144
 
145
+ # Extract additional properties from security object
146
+ additional_properties = {}
147
+ for key, value in dict(security.client_oauth).items():
148
+ if key not in ["client_id", "client_secret", "token_url"]:
149
+ additional_properties[key] = value
150
+
138
151
  return Credentials(
139
152
  client_id=security.client_oauth.client_id,
140
153
  client_secret=security.client_oauth.client_secret,
141
154
  token_url=security.client_oauth.token_url,
155
+ additional_properties=additional_properties,
142
156
  )
143
157
 
144
158
  def do_token_request(
@@ -153,12 +167,13 @@ class ClientCredentialsHook(SDKInitHook, BeforeRequestHook, AfterErrorHook):
153
167
  "client_secret": credentials.client_secret,
154
168
  }
155
169
 
156
- if credentials.audience is not None:
157
- payload["audience"] = credentials.audience
158
-
159
170
  if scopes is not None and len(scopes) > 0:
160
171
  payload["scope"] = " ".join(scopes)
161
172
 
173
+ # Add additional properties to payload
174
+ for key, value in credentials.additional_properties.items():
175
+ payload[key] = value
176
+
162
177
  token_url = credentials.token_url
163
178
  if not bool(urlparse(credentials.token_url).netloc):
164
179
  token_url = urljoin(hook_ctx.base_url, credentials.token_url)
@@ -3,10 +3,10 @@
3
3
  import importlib.metadata
4
4
 
5
5
  __title__: str = "cribl-control-plane"
6
- __version__: str = "0.0.27"
6
+ __version__: str = "0.0.28"
7
7
  __openapi_doc_version__: str = "4.14.0-alpha.1755179421376-c4612cd3"
8
- __gen_version__: str = "2.660.0"
9
- __user_agent__: str = "speakeasy-sdk/python 0.0.27 2.660.0 4.14.0-alpha.1755179421376-c4612cd3 cribl-control-plane"
8
+ __gen_version__: str = "2.684.0"
9
+ __user_agent__: str = "speakeasy-sdk/python 0.0.28 2.684.0 4.14.0-alpha.1755179421376-c4612cd3 cribl-control-plane"
10
10
 
11
11
  try:
12
12
  if __package__ is not None:
@@ -2,6 +2,7 @@
2
2
 
3
3
  from typing import TYPE_CHECKING
4
4
  from importlib import import_module
5
+ import builtins
5
6
 
6
7
  if TYPE_CHECKING:
7
8
  from .apierror import APIError
@@ -56,5 +57,5 @@ def __getattr__(attr_name: str) -> object:
56
57
 
57
58
 
58
59
  def __dir__():
59
- lazy_attrs = list(_dynamic_imports.keys())
60
- return sorted(lazy_attrs)
60
+ lazy_attrs = builtins.list(_dynamic_imports.keys())
61
+ return builtins.sorted(lazy_attrs)
@@ -2,6 +2,7 @@
2
2
 
3
3
  from typing import TYPE_CHECKING
4
4
  from importlib import import_module
5
+ import builtins
5
6
 
6
7
  if TYPE_CHECKING:
7
8
  from .addhectokenrequest import (
@@ -8382,5 +8383,5 @@ def __getattr__(attr_name: str) -> object:
8382
8383
 
8383
8384
 
8384
8385
  def __dir__():
8385
- lazy_attrs = list(_dynamic_imports.keys())
8386
- return sorted(lazy_attrs)
8386
+ lazy_attrs = builtins.list(_dynamic_imports.keys())
8387
+ return builtins.sorted(lazy_attrs)
@@ -9,6 +9,7 @@ from typing_extensions import Annotated, TypedDict
9
9
  class SchemeClientOauthTypedDict(TypedDict):
10
10
  client_id: str
11
11
  client_secret: str
12
+ audience: str
12
13
  token_url: str
13
14
 
14
15
 
@@ -21,4 +22,8 @@ class SchemeClientOauth(BaseModel):
21
22
  str, FieldMetadata(security=SecurityMetadata(field_name="clientSecret"))
22
23
  ]
23
24
 
25
+ audience: Annotated[
26
+ str, FieldMetadata(security=SecurityMetadata(field_name="audience"))
27
+ ]
28
+
24
29
  token_url: str = "https://login.cribl.cloud/oauth/token"
@@ -2,6 +2,7 @@
2
2
 
3
3
  from typing import TYPE_CHECKING
4
4
  from importlib import import_module
5
+ import builtins
5
6
 
6
7
  if TYPE_CHECKING:
7
8
  from .annotations import get_discriminator
@@ -183,5 +184,5 @@ def __getattr__(attr_name: str) -> object:
183
184
 
184
185
 
185
186
  def __dir__():
186
- lazy_attrs = list(_dynamic_imports.keys())
187
- return sorted(lazy_attrs)
187
+ lazy_attrs = builtins.list(_dynamic_imports.keys())
188
+ return builtins.sorted(lazy_attrs)
@@ -82,6 +82,11 @@ def get_security_from_env(security: Any, security_class: Any) -> Optional[BaseMo
82
82
  "CRIBLCONTROLPLANE_TOKEN_URL"
83
83
  )
84
84
 
85
+ if os.getenv("CRIBLCONTROLPLANE_AUDIENCE"):
86
+ security_dict.setdefault("client_oauth", {})["audience"] = os.getenv(
87
+ "CRIBLCONTROLPLANE_AUDIENCE"
88
+ )
89
+
85
90
  return security_class(**security_dict) if security_dict else None
86
91
 
87
92
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: cribl-control-plane
3
- Version: 0.0.27
3
+ Version: 0.0.28
4
4
  Summary: Python Client SDK Generated by Speakeasy.
5
5
  Author: Speakeasy
6
6
  Requires-Python: >=3.9.2
@@ -47,7 +47,15 @@ Cribl API Reference: This API Reference lists available REST endpoints, along wi
47
47
  >
48
48
  > Once a Python version reaches its [official end of life date](https://devguide.python.org/versions/), a 3-month grace period is provided for users to upgrade. Following this grace period, the minimum python version supported in the SDK will be updated.
49
49
 
50
- The SDK can be installed with either *pip* or *poetry* package managers.
50
+ The SDK can be installed with *uv*, *pip*, or *poetry* package managers.
51
+
52
+ ### uv
53
+
54
+ *uv* is a fast Python package installer and resolver, designed as a drop-in replacement for pip and pip-tools. It's recommended for its speed and modern Python tooling capabilities.
55
+
56
+ ```bash
57
+ uv add cribl-control-plane
58
+ ```
51
59
 
52
60
  ### PIP
53
61
 
@@ -166,7 +174,7 @@ with CriblControlPlane(
166
174
 
167
175
  </br>
168
176
 
169
- The same SDK client can also be used to make asychronous requests by importing asyncio.
177
+ The same SDK client can also be used to make asynchronous requests by importing asyncio.
170
178
  ```python
171
179
  # Asynchronous Example
172
180
  import asyncio
@@ -1,10 +1,10 @@
1
1
  cribl_control_plane/__init__.py,sha256=w2u919V3Tzv4zEPQ-OYJ79gQ_4_SyW7GOFFoHtqXDFA,401
2
2
  cribl_control_plane/_hooks/__init__.py,sha256=9_7W5jAYw8rcO8Kfc-Ty-lB82BHfksAJJpVFb_UeU1c,146
3
- cribl_control_plane/_hooks/clientcredentials.py,sha256=gVQkktlv3q4-AHOdbQl5r8i-GMv7TUY6nezBOx19JaQ,6713
3
+ cribl_control_plane/_hooks/clientcredentials.py,sha256=_scvqxVT_8CDEMWblZ02IQ9A1bMEI1B9Wq1L-UDkaZw,7237
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=0GRyiCsrGaLGVO726ENgnpQirTsT1clR2vfEowUEB10,542
7
+ cribl_control_plane/_version.py,sha256=sEnRH9F7eXlNHYil--ldgwH5vRhI-foNafx8vnuFK2E,542
8
8
  cribl_control_plane/acl.py,sha256=i5VLS1bV59xJtfyumzNXWCOd4TQJ5ULY5fYM4enlw-k,8185
9
9
  cribl_control_plane/auth_sdk.py,sha256=FQZpAERAlpw6Xk-mkUdalUDSekftklv_Du4i2TLDilk,496
10
10
  cribl_control_plane/basesdk.py,sha256=amvvB5iPT7c-L6NLo2Rhu2f7xWaapsa6OfQ37SICXOw,11954
@@ -14,7 +14,7 @@ cribl_control_plane/commits_files.py,sha256=maHYZmmJlz8RzsvFZElpbzukJcMXbxwGRFB8
14
14
  cribl_control_plane/configs_versions.py,sha256=hwLr0gKY6eyzbIWijvb_zNzWqF3Kas9nXXaU62Wgz2I,7650
15
15
  cribl_control_plane/destinations.py,sha256=vb-omjGCOLJqdZKU-0TbDU6fdtOmj4RNngHXGMkn4ew,36309
16
16
  cribl_control_plane/destinations_pq.py,sha256=XTEevuMoc0BXOej4j_eMI1mwiqDWWyJnHTL9WhIaQw8,14537
17
- cribl_control_plane/errors/__init__.py,sha256=Xyh3WNPYYsJGQfGBLeaaK6eqwsJOtx-__zmvwwr4Mns,1833
17
+ cribl_control_plane/errors/__init__.py,sha256=6d9IGiw8Z6n2sTijw-e11PthRPi-YUkLgzE6zV4MfFQ,1867
18
18
  cribl_control_plane/errors/apierror.py,sha256=Z3b3zk672zHljcdijGLJeJ2LiP1f3VpVDEqUuF7LDAA,1253
19
19
  cribl_control_plane/errors/criblcontrolplaneerror.py,sha256=P9SU33LkmvyURdJbndHJxXu2KW_3u059peZJ8C80LfM,724
20
20
  cribl_control_plane/errors/error.py,sha256=fZ72R_qeZ0-xd514dVqKKiqh7zzLmnkpPJfckpHOCj4,693
@@ -27,7 +27,7 @@ cribl_control_plane/health.py,sha256=mDYmC13IE_M9jTVKKBOr5aeZ5QArUURLT1PyPpvn5Ho
27
27
  cribl_control_plane/hectokens.py,sha256=Oe4_wjPk-UlWOaOmx5wxDteQReTsiCKvrjDopxPnHOM,18845
28
28
  cribl_control_plane/httpclient.py,sha256=Eu73urOAiZQtdUIyOUnPccxCiBbWEKrXG-JrRG3SLM4,3946
29
29
  cribl_control_plane/lakedatasets.py,sha256=Y0sEW-RZIbgKuDeAAhf7m4q8iNRJn1hg38sARR3eBfQ,46144
30
- cribl_control_plane/models/__init__.py,sha256=UbbunKgmUtu7_eECfqKi3vmp566uJUzz0exD83dMSA8,352650
30
+ cribl_control_plane/models/__init__.py,sha256=uWNcOyt8ad8F8sINQaVcs-jSeJbVDhWXhVh1IdmNtk0,352684
31
31
  cribl_control_plane/models/addhectokenrequest.py,sha256=mzQLKrMWlwxNheqEs5SM_yrT-gyenfCWgHKhmb5oXFQ,800
32
32
  cribl_control_plane/models/appmode.py,sha256=5xRJz9oP5ah4b6dcay4Q1IbQ9irm6k6x2BrTNysIMY4,300
33
33
  cribl_control_plane/models/authtoken.py,sha256=uW0aIs8j14CQzFM2ueY5GIWFulna91cigBWQ3oPlDgY,295
@@ -255,7 +255,7 @@ cribl_control_plane/models/routecloneconf.py,sha256=ESvEj0vl58BGOwJB5kYu3vMAm88J
255
255
  cribl_control_plane/models/routeconf.py,sha256=whFyvzWwmEqAo_0HoTFKJTZqQ2p8kdPKaZJIlh9nS58,1451
256
256
  cribl_control_plane/models/routes.py,sha256=2MRVmc4zvUjQw6moQmRYss_XaoGcaauj2Jpdb3VX8pA,2022
257
257
  cribl_control_plane/models/routesroute.py,sha256=7hFUWpgVDBj0N117IFxZRGkFqJntbe4NyBakVyMKsTY,2339
258
- cribl_control_plane/models/schemeclientoauth.py,sha256=MaZs9lOB3_y8uTZNTHIuAG_X66ZrEpRj0qZGAsBfXFM,712
258
+ cribl_control_plane/models/schemeclientoauth.py,sha256=cjePTTFIlKoYg8JZOOuvacOb1Zb5RqmgiqyQA9P3kvU,839
259
259
  cribl_control_plane/models/security.py,sha256=l8rMit25V2MUVLptnexODsL6wP-3l50g8D4kwRsAQvY,1097
260
260
  cribl_control_plane/models/teamaccesscontrollist.py,sha256=HLMck-wyuJYiKD-adSS5ti4yLbHE2snZaOAI0GwgfOI,483
261
261
  cribl_control_plane/models/updatecribllakedatasetbylakeidandidop.py,sha256=q_bOMXSkfqyNSNFN-qsseimaFl9xfRsbvjdMfAPAERI,1852
@@ -284,7 +284,7 @@ cribl_control_plane/teams.py,sha256=uEUfjr56W7_lzFVYdWfG7QVXr_sALvmlWoVBE1Yv1sc,
284
284
  cribl_control_plane/tokens.py,sha256=iP_0_Pl8LFgs_ektBTU-bvRjJq6JQ3q7qMWIeIIuXmc,7220
285
285
  cribl_control_plane/types/__init__.py,sha256=RArOwSgeeTIva6h-4ttjXwMUeCkz10nAFBL9D-QljI4,377
286
286
  cribl_control_plane/types/basemodel.py,sha256=L79WXvTECbSqaJzs8D3ud_KdIWkU7Cx2wbohDAktE9E,1127
287
- cribl_control_plane/utils/__init__.py,sha256=BQt6xIdX86A6mOHAnxAXBXaPgdUJtDy2-_4ymAsII_Y,5436
287
+ cribl_control_plane/utils/__init__.py,sha256=f0z1dsfJtiN5V5w4AE1dZb6W0_hDyMzVaDVq18RCbiQ,5470
288
288
  cribl_control_plane/utils/annotations.py,sha256=aR7mZG34FzgRdew7WZPYEu9QGBerpuKxCF4sek5Z_5Y,1699
289
289
  cribl_control_plane/utils/datetimes.py,sha256=oppAA5e3V35pQov1-FNLKxAaNF1_XWi-bQtyjjql3H8,855
290
290
  cribl_control_plane/utils/enums.py,sha256=REU6ydF8gsVL3xaeGX4sMNyiL3q5P9h29-f6Sa6luAE,2633
@@ -296,13 +296,13 @@ cribl_control_plane/utils/metadata.py,sha256=Per2KFXXOqOtoUWXrlIfjrSrBg199KrRW0n
296
296
  cribl_control_plane/utils/queryparams.py,sha256=MTK6inMS1_WwjmMJEJmAn67tSHHJyarpdGRlorRHEtI,5899
297
297
  cribl_control_plane/utils/requestbodies.py,sha256=ySjEyjcLi731LNUahWvLOrES2HihuA8VrOJx4eQ7Qzg,2101
298
298
  cribl_control_plane/utils/retries.py,sha256=6yhfZifqIat9i76xF0lTR2jLj1IN9BNGyqqxATlEFPU,6348
299
- cribl_control_plane/utils/security.py,sha256=quuubouAZskAohOFNQz5g-ZLwVayLG-3mY88Ah8isCM,6595
299
+ cribl_control_plane/utils/security.py,sha256=Pkd-6ntMV3j5YYzJ0mA2RKN-8Ajk2w2NATLtqPdIYS0,6773
300
300
  cribl_control_plane/utils/serializers.py,sha256=Hndks5M_rJXVub_N5lu0gKZQUoEmWrn6PN7R-0HwvOE,5999
301
301
  cribl_control_plane/utils/unmarshal_json_response.py,sha256=yxi3F_O3SCU0SrexiR3BvQS-E81pW2siLgpTXYegAyg,595
302
302
  cribl_control_plane/utils/url.py,sha256=BgGPgcTA6MRK4bF8fjP2dUopN3NzEzxWMXPBVg8NQUA,5254
303
303
  cribl_control_plane/utils/values.py,sha256=CcaCXEa3xHhkUDROyXZocN8f0bdITftv9Y0P9lTf0YM,3517
304
304
  cribl_control_plane/versions.py,sha256=Wdaxc2wZeEeD12wAh7SQ0RGG9KgwKaWQ7bc8qOQ8oAo,920
305
305
  cribl_control_plane/versions_configs.py,sha256=nPgG2iQyehB4MuRSeNbY4KFWZSPW_oNlr2306Oks58k,7178
306
- cribl_control_plane-0.0.27.dist-info/METADATA,sha256=zyE8LGuYyUrq6qShihdEpf62Zt2PgXDh97GC8ExVIig,38579
307
- cribl_control_plane-0.0.27.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
308
- cribl_control_plane-0.0.27.dist-info/RECORD,,
306
+ cribl_control_plane-0.0.28.dist-info/METADATA,sha256=v7F1z32dqcglhqR9sm7VKdIpZ8rm-J6c7X6xOVtylRY,38811
307
+ cribl_control_plane-0.0.28.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
308
+ cribl_control_plane-0.0.28.dist-info/RECORD,,