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

Files changed (87) hide show
  1. cribl_control_plane/_hooks/clientcredentials.py +1 -1
  2. cribl_control_plane/_version.py +4 -4
  3. cribl_control_plane/acl.py +5 -3
  4. cribl_control_plane/auth_sdk.py +6 -3
  5. cribl_control_plane/basesdk.py +11 -1
  6. cribl_control_plane/commits.py +5 -3
  7. cribl_control_plane/destinations.py +6 -4
  8. cribl_control_plane/errors/__init__.py +15 -3
  9. cribl_control_plane/groups_configs.py +8 -3
  10. cribl_control_plane/groups_sdk.py +6 -4
  11. cribl_control_plane/models/__init__.py +401 -1
  12. cribl_control_plane/models/input.py +2 -2
  13. cribl_control_plane/models/inputappscope.py +13 -0
  14. cribl_control_plane/models/inputazureblob.py +13 -0
  15. cribl_control_plane/models/inputcollection.py +13 -0
  16. cribl_control_plane/models/inputconfluentcloud.py +20 -0
  17. cribl_control_plane/models/inputcribl.py +13 -0
  18. cribl_control_plane/models/inputcriblhttp.py +13 -0
  19. cribl_control_plane/models/inputcribllakehttp.py +38 -4
  20. cribl_control_plane/models/inputcriblmetrics.py +13 -0
  21. cribl_control_plane/models/inputcribltcp.py +13 -0
  22. cribl_control_plane/models/inputcrowdstrike.py +13 -0
  23. cribl_control_plane/models/inputdatadogagent.py +13 -0
  24. cribl_control_plane/models/inputdatagen.py +13 -0
  25. cribl_control_plane/models/inputedgeprometheus.py +13 -0
  26. cribl_control_plane/models/inputelastic.py +13 -0
  27. cribl_control_plane/models/inputeventhub.py +13 -0
  28. cribl_control_plane/models/inputexec.py +13 -0
  29. cribl_control_plane/models/inputfile.py +13 -0
  30. cribl_control_plane/models/inputfirehose.py +13 -0
  31. cribl_control_plane/models/inputgooglepubsub.py +13 -0
  32. cribl_control_plane/models/inputgrafana.py +26 -14
  33. cribl_control_plane/models/inputhttp.py +13 -0
  34. cribl_control_plane/models/inputhttpraw.py +13 -0
  35. cribl_control_plane/models/inputjournalfiles.py +13 -0
  36. cribl_control_plane/models/inputkafka.py +20 -0
  37. cribl_control_plane/models/inputkinesis.py +13 -0
  38. cribl_control_plane/models/inputkubeevents.py +13 -0
  39. cribl_control_plane/models/inputkubelogs.py +13 -0
  40. cribl_control_plane/models/inputkubemetrics.py +13 -0
  41. cribl_control_plane/models/inputloki.py +13 -7
  42. cribl_control_plane/models/inputmetrics.py +13 -0
  43. cribl_control_plane/models/inputmodeldriventelemetry.py +14 -0
  44. cribl_control_plane/models/inputmsk.py +13 -0
  45. cribl_control_plane/models/inputnetflow.py +13 -0
  46. cribl_control_plane/models/inputoffice365mgmt.py +13 -0
  47. cribl_control_plane/models/inputoffice365msgtrace.py +13 -0
  48. cribl_control_plane/models/inputoffice365service.py +13 -0
  49. cribl_control_plane/models/inputopentelemetry.py +13 -0
  50. cribl_control_plane/models/inputprometheus.py +13 -0
  51. cribl_control_plane/models/inputprometheusrw.py +13 -0
  52. cribl_control_plane/models/inputrawudp.py +13 -0
  53. cribl_control_plane/models/inputs3.py +13 -0
  54. cribl_control_plane/models/inputs3inventory.py +13 -0
  55. cribl_control_plane/models/inputsecuritylake.py +13 -0
  56. cribl_control_plane/models/inputsnmp.py +13 -0
  57. cribl_control_plane/models/inputsplunk.py +13 -0
  58. cribl_control_plane/models/inputsplunkhec.py +13 -0
  59. cribl_control_plane/models/inputsplunksearch.py +13 -0
  60. cribl_control_plane/models/inputsqs.py +13 -0
  61. cribl_control_plane/models/inputsyslog.py +26 -0
  62. cribl_control_plane/models/inputsystemmetrics.py +13 -0
  63. cribl_control_plane/models/inputsystemstate.py +13 -0
  64. cribl_control_plane/models/inputtcp.py +13 -0
  65. cribl_control_plane/models/inputtcpjson.py +13 -0
  66. cribl_control_plane/models/inputwef.py +13 -0
  67. cribl_control_plane/models/inputwindowsmetrics.py +13 -0
  68. cribl_control_plane/models/inputwineventlogs.py +13 -0
  69. cribl_control_plane/models/inputwiz.py +13 -0
  70. cribl_control_plane/models/inputwizwebhook.py +13 -0
  71. cribl_control_plane/models/inputzscalerhec.py +13 -0
  72. cribl_control_plane/models/output.py +18 -18
  73. cribl_control_plane/models/outputazuredataexplorer.py +7 -0
  74. cribl_control_plane/models/outputconfluentcloud.py +7 -0
  75. cribl_control_plane/models/outputgrafanacloud.py +0 -14
  76. cribl_control_plane/models/outputkafka.py +7 -0
  77. cribl_control_plane/models/outputloki.py +0 -7
  78. cribl_control_plane/models/outputsyslog.py +68 -0
  79. cribl_control_plane/nodes.py +5 -3
  80. cribl_control_plane/sdk.py +15 -2
  81. cribl_control_plane/sources.py +5 -3
  82. cribl_control_plane/utils/__init__.py +15 -3
  83. cribl_control_plane/utils/eventstreaming.py +10 -0
  84. cribl_control_plane/versions.py +11 -6
  85. {cribl_control_plane-0.0.42.dist-info → cribl_control_plane-0.0.44.dist-info}/METADATA +1 -1
  86. {cribl_control_plane-0.0.42.dist-info → cribl_control_plane-0.0.44.dist-info}/RECORD +87 -87
  87. {cribl_control_plane-0.0.42.dist-info → cribl_control_plane-0.0.44.dist-info}/WHEEL +0 -0
@@ -188,7 +188,7 @@ class ClientCredentialsHook(SDKInitHook, BeforeRequestHook, AfterErrorHook):
188
188
 
189
189
  response_data = response.json()
190
190
 
191
- if response_data.get("token_type") != "Bearer":
191
+ if response_data.get("token_type", "").lower() != "bearer":
192
192
  raise Exception("Unexpected token type from token endpoint")
193
193
 
194
194
  expires_at = None
@@ -3,10 +3,10 @@
3
3
  import importlib.metadata
4
4
 
5
5
  __title__: str = "cribl-control-plane"
6
- __version__: str = "0.0.42"
7
- __openapi_doc_version__: str = "4.14.0-alpha.1757000684650-0bcbd7ed"
8
- __gen_version__: str = "2.686.7"
9
- __user_agent__: str = "speakeasy-sdk/python 0.0.42 2.686.7 4.14.0-alpha.1757000684650-0bcbd7ed cribl-control-plane"
6
+ __version__: str = "0.0.44"
7
+ __openapi_doc_version__: str = "4.14.0-alpha.1757401089572-3ca67bed"
8
+ __gen_version__: str = "2.696.0"
9
+ __user_agent__: str = "speakeasy-sdk/python 0.0.44 2.696.0 4.14.0-alpha.1757401089572-3ca67bed cribl-control-plane"
10
10
 
11
11
  try:
12
12
  if __package__ is not None:
@@ -14,13 +14,15 @@ from typing import Any, Mapping, Optional
14
14
  class ACL(BaseSDK):
15
15
  teams: Teams
16
16
 
17
- def __init__(self, sdk_config: SDKConfiguration) -> None:
18
- BaseSDK.__init__(self, sdk_config)
17
+ def __init__(
18
+ self, sdk_config: SDKConfiguration, parent_ref: Optional[object] = None
19
+ ) -> None:
20
+ BaseSDK.__init__(self, sdk_config, parent_ref=parent_ref)
19
21
  self.sdk_configuration = sdk_config
20
22
  self._init_sdks()
21
23
 
22
24
  def _init_sdks(self):
23
- self.teams = Teams(self.sdk_configuration)
25
+ self.teams = Teams(self.sdk_configuration, parent_ref=self.parent_ref)
24
26
 
25
27
  def get(
26
28
  self,
@@ -3,15 +3,18 @@
3
3
  from .basesdk import BaseSDK
4
4
  from .sdkconfiguration import SDKConfiguration
5
5
  from cribl_control_plane.tokens import Tokens
6
+ from typing import Optional
6
7
 
7
8
 
8
9
  class AuthSDK(BaseSDK):
9
10
  tokens: Tokens
10
11
 
11
- def __init__(self, sdk_config: SDKConfiguration) -> None:
12
- BaseSDK.__init__(self, sdk_config)
12
+ def __init__(
13
+ self, sdk_config: SDKConfiguration, parent_ref: Optional[object] = None
14
+ ) -> None:
15
+ BaseSDK.__init__(self, sdk_config, parent_ref=parent_ref)
13
16
  self.sdk_configuration = sdk_config
14
17
  self._init_sdks()
15
18
 
16
19
  def _init_sdks(self):
17
- self.tokens = Tokens(self.sdk_configuration)
20
+ self.tokens = Tokens(self.sdk_configuration, parent_ref=self.parent_ref)
@@ -19,9 +19,19 @@ from urllib.parse import parse_qs, urlparse
19
19
 
20
20
  class BaseSDK:
21
21
  sdk_configuration: SDKConfiguration
22
+ parent_ref: Optional[object] = None
23
+ """
24
+ Reference to the root SDK instance, if any. This will prevent it from
25
+ being garbage collected while there are active streams.
26
+ """
22
27
 
23
- def __init__(self, sdk_config: SDKConfiguration) -> None:
28
+ def __init__(
29
+ self,
30
+ sdk_config: SDKConfiguration,
31
+ parent_ref: Optional[object] = None,
32
+ ) -> None:
24
33
  self.sdk_configuration = sdk_config
34
+ self.parent_ref = parent_ref
25
35
 
26
36
  def _get_url(self, base_url, url_variables):
27
37
  sdk_url, sdk_variables = self.sdk_configuration.get_server_details()
@@ -14,13 +14,15 @@ from typing import Any, List, Mapping, Optional
14
14
  class Commits(BaseSDK):
15
15
  files: CommitsFiles
16
16
 
17
- def __init__(self, sdk_config: SDKConfiguration) -> None:
18
- BaseSDK.__init__(self, sdk_config)
17
+ def __init__(
18
+ self, sdk_config: SDKConfiguration, parent_ref: Optional[object] = None
19
+ ) -> None:
20
+ BaseSDK.__init__(self, sdk_config, parent_ref=parent_ref)
19
21
  self.sdk_configuration = sdk_config
20
22
  self._init_sdks()
21
23
 
22
24
  def _init_sdks(self):
23
- self.files = CommitsFiles(self.sdk_configuration)
25
+ self.files = CommitsFiles(self.sdk_configuration, parent_ref=self.parent_ref)
24
26
 
25
27
  def create(
26
28
  self,
@@ -18,14 +18,16 @@ class Destinations(BaseSDK):
18
18
  pq: DestinationsPq
19
19
  samples: Samples
20
20
 
21
- def __init__(self, sdk_config: SDKConfiguration) -> None:
22
- BaseSDK.__init__(self, sdk_config)
21
+ def __init__(
22
+ self, sdk_config: SDKConfiguration, parent_ref: Optional[object] = None
23
+ ) -> None:
24
+ BaseSDK.__init__(self, sdk_config, parent_ref=parent_ref)
23
25
  self.sdk_configuration = sdk_config
24
26
  self._init_sdks()
25
27
 
26
28
  def _init_sdks(self):
27
- self.pq = DestinationsPq(self.sdk_configuration)
28
- self.samples = Samples(self.sdk_configuration)
29
+ self.pq = DestinationsPq(self.sdk_configuration, parent_ref=self.parent_ref)
30
+ self.samples = Samples(self.sdk_configuration, parent_ref=self.parent_ref)
29
31
 
30
32
  def list(
31
33
  self,
@@ -1,12 +1,13 @@
1
1
  """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
2
 
3
+ from .criblcontrolplaneerror import CriblControlPlaneError
3
4
  from typing import TYPE_CHECKING
4
5
  from importlib import import_module
5
6
  import builtins
7
+ import sys
6
8
 
7
9
  if TYPE_CHECKING:
8
10
  from .apierror import APIError
9
- from .criblcontrolplaneerror import CriblControlPlaneError
10
11
  from .error import Error, ErrorData
11
12
  from .healthstatus_error import HealthStatusError, HealthStatusErrorData
12
13
  from .no_response_error import NoResponseError
@@ -25,7 +26,6 @@ __all__ = [
25
26
 
26
27
  _dynamic_imports: dict[str, str] = {
27
28
  "APIError": ".apierror",
28
- "CriblControlPlaneError": ".criblcontrolplaneerror",
29
29
  "Error": ".error",
30
30
  "ErrorData": ".error",
31
31
  "HealthStatusError": ".healthstatus_error",
@@ -35,6 +35,18 @@ _dynamic_imports: dict[str, str] = {
35
35
  }
36
36
 
37
37
 
38
+ def dynamic_import(modname, retries=3):
39
+ for attempt in range(retries):
40
+ try:
41
+ return import_module(modname, __package__)
42
+ except KeyError:
43
+ # Clear any half-initialized module and retry
44
+ sys.modules.pop(modname, None)
45
+ if attempt == retries - 1:
46
+ break
47
+ raise KeyError(f"Failed to import module '{modname}' after {retries} attempts")
48
+
49
+
38
50
  def __getattr__(attr_name: str) -> object:
39
51
  module_name = _dynamic_imports.get(attr_name)
40
52
  if module_name is None:
@@ -43,7 +55,7 @@ def __getattr__(attr_name: str) -> object:
43
55
  )
44
56
 
45
57
  try:
46
- module = import_module(module_name, __package__)
58
+ module = dynamic_import(module_name)
47
59
  result = getattr(module, attr_name)
48
60
  return result
49
61
  except ImportError as e:
@@ -3,15 +3,20 @@
3
3
  from .basesdk import BaseSDK
4
4
  from .sdkconfiguration import SDKConfiguration
5
5
  from cribl_control_plane.configs_versions import ConfigsVersions
6
+ from typing import Optional
6
7
 
7
8
 
8
9
  class GroupsConfigs(BaseSDK):
9
10
  versions: ConfigsVersions
10
11
 
11
- def __init__(self, sdk_config: SDKConfiguration) -> None:
12
- BaseSDK.__init__(self, sdk_config)
12
+ def __init__(
13
+ self, sdk_config: SDKConfiguration, parent_ref: Optional[object] = None
14
+ ) -> None:
15
+ BaseSDK.__init__(self, sdk_config, parent_ref=parent_ref)
13
16
  self.sdk_configuration = sdk_config
14
17
  self._init_sdks()
15
18
 
16
19
  def _init_sdks(self):
17
- self.versions = ConfigsVersions(self.sdk_configuration)
20
+ self.versions = ConfigsVersions(
21
+ self.sdk_configuration, parent_ref=self.parent_ref
22
+ )
@@ -18,14 +18,16 @@ class GroupsSDK(BaseSDK):
18
18
  configs: GroupsConfigs
19
19
  acl: ACL
20
20
 
21
- def __init__(self, sdk_config: SDKConfiguration) -> None:
22
- BaseSDK.__init__(self, sdk_config)
21
+ def __init__(
22
+ self, sdk_config: SDKConfiguration, parent_ref: Optional[object] = None
23
+ ) -> None:
24
+ BaseSDK.__init__(self, sdk_config, parent_ref=parent_ref)
23
25
  self.sdk_configuration = sdk_config
24
26
  self._init_sdks()
25
27
 
26
28
  def _init_sdks(self):
27
- self.configs = GroupsConfigs(self.sdk_configuration)
28
- self.acl = ACL(self.sdk_configuration)
29
+ self.configs = GroupsConfigs(self.sdk_configuration, parent_ref=self.parent_ref)
30
+ self.acl = ACL(self.sdk_configuration, parent_ref=self.parent_ref)
29
31
 
30
32
  def list(
31
33
  self,