feldera 0.37.0__tar.gz → 0.39.0__tar.gz
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-0.37.0 → feldera-0.39.0}/PKG-INFO +1 -1
- {feldera-0.37.0 → feldera-0.39.0}/feldera/rest/_httprequests.py +9 -0
- {feldera-0.37.0 → feldera-0.39.0}/feldera/rest/config.py +4 -0
- {feldera-0.37.0 → feldera-0.39.0}/feldera/rest/feldera_client.py +8 -3
- {feldera-0.37.0 → feldera-0.39.0}/feldera/rest/pipeline.py +1 -0
- {feldera-0.37.0 → feldera-0.39.0}/feldera.egg-info/PKG-INFO +1 -1
- {feldera-0.37.0 → feldera-0.39.0}/pyproject.toml +10 -1
- {feldera-0.37.0 → feldera-0.39.0}/tests/test_pipeline.py +1 -0
- {feldera-0.37.0 → feldera-0.39.0}/README.md +0 -0
- {feldera-0.37.0 → feldera-0.39.0}/feldera/__init__.py +0 -0
- {feldera-0.37.0 → feldera-0.39.0}/feldera/_callback_runner.py +0 -0
- {feldera-0.37.0 → feldera-0.39.0}/feldera/_helpers.py +0 -0
- {feldera-0.37.0 → feldera-0.39.0}/feldera/enums.py +0 -0
- {feldera-0.37.0 → feldera-0.39.0}/feldera/output_handler.py +0 -0
- {feldera-0.37.0 → feldera-0.39.0}/feldera/pipeline.py +0 -0
- {feldera-0.37.0 → feldera-0.39.0}/feldera/pipeline_builder.py +0 -0
- {feldera-0.37.0 → feldera-0.39.0}/feldera/rest/__init__.py +0 -0
- {feldera-0.37.0 → feldera-0.39.0}/feldera/rest/errors.py +0 -0
- {feldera-0.37.0 → feldera-0.39.0}/feldera/rest/sql_table.py +0 -0
- {feldera-0.37.0 → feldera-0.39.0}/feldera/rest/sql_view.py +0 -0
- {feldera-0.37.0 → feldera-0.39.0}/feldera/runtime_config.py +0 -0
- {feldera-0.37.0 → feldera-0.39.0}/feldera.egg-info/SOURCES.txt +0 -0
- {feldera-0.37.0 → feldera-0.39.0}/feldera.egg-info/dependency_links.txt +0 -0
- {feldera-0.37.0 → feldera-0.39.0}/feldera.egg-info/requires.txt +0 -0
- {feldera-0.37.0 → feldera-0.39.0}/feldera.egg-info/top_level.txt +0 -0
- {feldera-0.37.0 → feldera-0.39.0}/setup.cfg +0 -0
- {feldera-0.37.0 → feldera-0.39.0}/tests/test_pipeline_builder.py +0 -0
- {feldera-0.37.0 → feldera-0.39.0}/tests/test_udf.py +0 -0
- {feldera-0.37.0 → feldera-0.39.0}/tests/test_variant.py +0 -0
|
@@ -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)
|
|
@@ -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
|
|
@@ -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:
|
|
@@ -98,8 +103,8 @@ class FelderaClient:
|
|
|
98
103
|
return p
|
|
99
104
|
elif status not in wait:
|
|
100
105
|
# error handling for SQL compilation errors
|
|
101
|
-
if
|
|
102
|
-
sql_errors =
|
|
106
|
+
if status == "SqlError":
|
|
107
|
+
sql_errors = p.program_error["sql_compilation"]["messages"]
|
|
103
108
|
if sql_errors:
|
|
104
109
|
err_msg = f"Pipeline {name} failed to compile:\n"
|
|
105
110
|
for sql_error in sql_errors:
|
|
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
|
|
|
6
6
|
name = "feldera"
|
|
7
7
|
readme = "README.md"
|
|
8
8
|
description = "The feldera python client"
|
|
9
|
-
version = "0.
|
|
9
|
+
version = "0.39.0"
|
|
10
10
|
license = { text = "MIT" }
|
|
11
11
|
requires-python = ">=3.10"
|
|
12
12
|
authors = [
|
|
@@ -35,3 +35,12 @@ Homepage = "https://www.feldera.com"
|
|
|
35
35
|
Documentation = "https://docs.feldera.com/python"
|
|
36
36
|
Repository = "https://github.com/feldera/feldera"
|
|
37
37
|
Issues = "https://github.com/feldera/feldera/issues"
|
|
38
|
+
|
|
39
|
+
[tool.uv]
|
|
40
|
+
dev-dependencies = [
|
|
41
|
+
"kafka-python-ng==2.2.2",
|
|
42
|
+
"pytest-timeout>=2.3.1",
|
|
43
|
+
"pytest>=8.3.5",
|
|
44
|
+
"sphinx-rtd-theme==2.0.0",
|
|
45
|
+
"sphinx==7.3.7",
|
|
46
|
+
]
|
|
@@ -15,6 +15,7 @@ class TestPipeline(unittest.TestCase):
|
|
|
15
15
|
def test_delete_all_pipelines(self):
|
|
16
16
|
pipelines = TEST_CLIENT.pipelines()
|
|
17
17
|
for pipeline in pipelines:
|
|
18
|
+
TEST_CLIENT.shutdown_pipeline(pipeline.name)
|
|
18
19
|
TEST_CLIENT.delete_pipeline(pipeline.name)
|
|
19
20
|
|
|
20
21
|
def test_create_pipeline(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|