feldera 0.36.0__py3-none-any.whl → 0.38.0__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 feldera might be problematic. Click here for more details.
- feldera/rest/_httprequests.py +9 -0
- feldera/rest/config.py +4 -0
- feldera/rest/feldera_client.py +6 -1
- feldera/runtime_config.py +19 -3
- {feldera-0.36.0.dist-info → feldera-0.38.0.dist-info}/METADATA +1 -1
- {feldera-0.36.0.dist-info → feldera-0.38.0.dist-info}/RECORD +8 -8
- {feldera-0.36.0.dist-info → feldera-0.38.0.dist-info}/WHEEL +1 -1
- {feldera-0.36.0.dist-info → feldera-0.38.0.dist-info}/top_level.txt +0 -0
feldera/rest/_httprequests.py
CHANGED
|
@@ -10,6 +10,7 @@ from feldera.rest.errors import (
|
|
|
10
10
|
|
|
11
11
|
import json
|
|
12
12
|
import requests
|
|
13
|
+
from requests.packages import urllib3
|
|
13
14
|
from typing import Callable, Optional, Any, Union, Mapping, Sequence, List
|
|
14
15
|
|
|
15
16
|
|
|
@@ -22,6 +23,11 @@ class HttpRequests:
|
|
|
22
23
|
def __init__(self, config: Config) -> None:
|
|
23
24
|
self.config = config
|
|
24
25
|
self.headers = {"User-Agent": "feldera-python-sdk/v1"}
|
|
26
|
+
self.requests_verify = config.requests_verify
|
|
27
|
+
|
|
28
|
+
if not self.requests_verify:
|
|
29
|
+
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
|
|
30
|
+
|
|
25
31
|
if self.config.api_key:
|
|
26
32
|
self.headers["Authorization"] = f"Bearer {self.config.api_key}"
|
|
27
33
|
|
|
@@ -69,6 +75,7 @@ class HttpRequests:
|
|
|
69
75
|
headers=headers,
|
|
70
76
|
params=params,
|
|
71
77
|
stream=stream,
|
|
78
|
+
verify=self.requests_verify,
|
|
72
79
|
)
|
|
73
80
|
elif isinstance(body, bytes):
|
|
74
81
|
request = http_method(
|
|
@@ -78,6 +85,7 @@ class HttpRequests:
|
|
|
78
85
|
data=body,
|
|
79
86
|
params=params,
|
|
80
87
|
stream=stream,
|
|
88
|
+
verify=self.requests_verify,
|
|
81
89
|
)
|
|
82
90
|
else:
|
|
83
91
|
request = http_method(
|
|
@@ -87,6 +95,7 @@ class HttpRequests:
|
|
|
87
95
|
data=json_serialize(body) if serialize else body,
|
|
88
96
|
params=params,
|
|
89
97
|
stream=stream,
|
|
98
|
+
verify=self.requests_verify,
|
|
90
99
|
)
|
|
91
100
|
|
|
92
101
|
resp = self.__validate(request, stream=stream)
|
feldera/rest/config.py
CHANGED
|
@@ -12,15 +12,19 @@ class Config:
|
|
|
12
12
|
api_key: Optional[str] = None,
|
|
13
13
|
version: Optional[str] = None,
|
|
14
14
|
timeout: Optional[float] = None,
|
|
15
|
+
requests_verify: bool = True,
|
|
15
16
|
) -> None:
|
|
16
17
|
"""
|
|
17
18
|
:param url: The url to the Feldera API (ex: https://try.feldera.com)
|
|
18
19
|
:param api_key: The optional API key to access Feldera
|
|
19
20
|
:param version: The version of the API to use
|
|
20
21
|
:param timeout: The timeout for the HTTP requests
|
|
22
|
+
:param requests_verify: The `verify` parameter passed to the requests
|
|
23
|
+
library. `True` by default.
|
|
21
24
|
"""
|
|
22
25
|
|
|
23
26
|
self.url: str = url
|
|
24
27
|
self.api_key: Optional[str] = api_key
|
|
25
28
|
self.version: Optional[str] = version or "v0"
|
|
26
29
|
self.timeout: Optional[float] = timeout
|
|
30
|
+
self.requests_verify: bool = requests_verify
|
feldera/rest/feldera_client.py
CHANGED
|
@@ -29,15 +29,20 @@ class FelderaClient:
|
|
|
29
29
|
url: str,
|
|
30
30
|
api_key: Optional[str] = None,
|
|
31
31
|
timeout: Optional[float] = None,
|
|
32
|
+
requests_verify: bool = True,
|
|
32
33
|
) -> None:
|
|
33
34
|
"""
|
|
34
35
|
:param url: The url to Feldera API (ex: https://try.feldera.com)
|
|
35
36
|
:param api_key: The optional API key for Feldera
|
|
36
37
|
:param timeout: (optional) The amount of time in seconds that the client will wait for a response before timing
|
|
37
38
|
out.
|
|
39
|
+
:param requests_verify: The `verify` parameter passed to the requests
|
|
40
|
+
library. `True` by default.
|
|
38
41
|
"""
|
|
39
42
|
|
|
40
|
-
self.config = Config(
|
|
43
|
+
self.config = Config(
|
|
44
|
+
url, api_key, timeout=timeout, requests_verify=requests_verify
|
|
45
|
+
)
|
|
41
46
|
self.http = HttpRequests(self.config)
|
|
42
47
|
|
|
43
48
|
try:
|
feldera/runtime_config.py
CHANGED
|
@@ -37,6 +37,24 @@ class Resources:
|
|
|
37
37
|
self.__dict__.update(config)
|
|
38
38
|
|
|
39
39
|
|
|
40
|
+
class Storage:
|
|
41
|
+
"""Storage configuration for a pipeline.
|
|
42
|
+
|
|
43
|
+
:param min_storage_bytes: The minimum estimated number of bytes in a batch of data to write it to storage.
|
|
44
|
+
"""
|
|
45
|
+
|
|
46
|
+
def __init__(
|
|
47
|
+
self,
|
|
48
|
+
config: Optional[Mapping[str, Any]] = None,
|
|
49
|
+
min_storage_bytes: Optional[int] = None,
|
|
50
|
+
):
|
|
51
|
+
config = config or {}
|
|
52
|
+
|
|
53
|
+
self.min_storage_bytes = min_storage_bytes
|
|
54
|
+
|
|
55
|
+
self.__dict__.update(config)
|
|
56
|
+
|
|
57
|
+
|
|
40
58
|
class RuntimeConfig:
|
|
41
59
|
"""
|
|
42
60
|
Runtime configuration class to define the configuration for a pipeline.
|
|
@@ -45,13 +63,12 @@ class RuntimeConfig:
|
|
|
45
63
|
def __init__(
|
|
46
64
|
self,
|
|
47
65
|
workers: Optional[int] = None,
|
|
48
|
-
storage: Optional[
|
|
66
|
+
storage: Optional[Storage] = None,
|
|
49
67
|
tracing: Optional[bool] = False,
|
|
50
68
|
tracing_endpoint_jaeger: Optional[str] = "",
|
|
51
69
|
cpu_profiler: bool = True,
|
|
52
70
|
max_buffering_delay_usecs: int = 0,
|
|
53
71
|
min_batch_size_records: int = 0,
|
|
54
|
-
min_storage_bytes: Optional[int] = None,
|
|
55
72
|
clock_resolution_usecs: Optional[int] = None,
|
|
56
73
|
resources: Optional[Resources] = None,
|
|
57
74
|
):
|
|
@@ -62,7 +79,6 @@ class RuntimeConfig:
|
|
|
62
79
|
self.cpu_profiler = cpu_profiler
|
|
63
80
|
self.max_buffering_delay_usecs = max_buffering_delay_usecs
|
|
64
81
|
self.min_batch_size_records = min_batch_size_records
|
|
65
|
-
self.min_storage_bytes = min_storage_bytes
|
|
66
82
|
self.clock_resolution_usecs = clock_resolution_usecs
|
|
67
83
|
if resources is not None:
|
|
68
84
|
self.resources = resources.__dict__
|
|
@@ -5,16 +5,16 @@ feldera/enums.py,sha256=tI48tTF65AU5ZLem_IDnC5ycPVMKMv591lW2T__U4C8,7281
|
|
|
5
5
|
feldera/output_handler.py,sha256=64J3ljhOaKIhxdjOKYi-BUz_HnMwROfmN8eE-btYygU,1930
|
|
6
6
|
feldera/pipeline.py,sha256=yDU5vSRk-2I5P1VeV_Ix5rCDLbjNIkIYEP_gA2vWSIU,29705
|
|
7
7
|
feldera/pipeline_builder.py,sha256=4rmklRZ0-otvTUb-HTESfNsJopEK-E2jxpJXiYlKpps,3664
|
|
8
|
-
feldera/runtime_config.py,sha256=
|
|
8
|
+
feldera/runtime_config.py,sha256=hlIm2QTEqnUy7ucqS1iQN23ElR5d5aMwGvv_PxjHk8I,3243
|
|
9
9
|
feldera/rest/__init__.py,sha256=Eg-EKUU3RSTDcdxTR_7wNDnCly8VpXEzsZCQUmf-y2M,308
|
|
10
|
-
feldera/rest/_httprequests.py,sha256=
|
|
11
|
-
feldera/rest/config.py,sha256=
|
|
10
|
+
feldera/rest/_httprequests.py,sha256=e22YbpzOzy7MGo7hk9MOU7ZRTj3F314grY0Ygr-_goI,6636
|
|
11
|
+
feldera/rest/config.py,sha256=DYzZKngDEhouTEwqVFd-rDrBN9tWqsU07Jl_BTT4mXs,1008
|
|
12
12
|
feldera/rest/errors.py,sha256=b4i2JjrbSmej7jdko_FL8UeXklLKenSipwMT80jowaM,1720
|
|
13
|
-
feldera/rest/feldera_client.py,sha256=
|
|
13
|
+
feldera/rest/feldera_client.py,sha256=fGwczGCOG7sow9Av9qMggskgLUUiXzd1Tc9K-2PydTA,20786
|
|
14
14
|
feldera/rest/pipeline.py,sha256=o6BFLL3DuurvAhneX1LH7mLjbvX3dn4lCXziYRciUI4,2788
|
|
15
15
|
feldera/rest/sql_table.py,sha256=qrw-YwMzx5T81zDefNO1KOx7EyypFz1vPwGBzSUB7kc,652
|
|
16
16
|
feldera/rest/sql_view.py,sha256=hN12mPM0mvwLCIPYywpb12s9Hd2Ws31IlTMXPriMisw,644
|
|
17
|
-
feldera-0.
|
|
18
|
-
feldera-0.
|
|
19
|
-
feldera-0.
|
|
20
|
-
feldera-0.
|
|
17
|
+
feldera-0.38.0.dist-info/METADATA,sha256=5I1OChJnFC2FrG3qtmL9QaM0Q4xowg2oh7b43c_2dvk,2582
|
|
18
|
+
feldera-0.38.0.dist-info/WHEEL,sha256=nn6H5-ilmfVryoAQl3ZQ2l8SH5imPWFpm1A5FgEuFV4,91
|
|
19
|
+
feldera-0.38.0.dist-info/top_level.txt,sha256=fB6yTqrQiO6RCbY1xP2T_mpPoTjDFtJvkJJodiee7d0,8
|
|
20
|
+
feldera-0.38.0.dist-info/RECORD,,
|
|
File without changes
|