feldera 0.36.0__tar.gz → 0.38.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.

Files changed (29) hide show
  1. {feldera-0.36.0 → feldera-0.38.0}/PKG-INFO +1 -1
  2. {feldera-0.36.0 → feldera-0.38.0}/feldera/rest/_httprequests.py +9 -0
  3. {feldera-0.36.0 → feldera-0.38.0}/feldera/rest/config.py +4 -0
  4. {feldera-0.36.0 → feldera-0.38.0}/feldera/rest/feldera_client.py +6 -1
  5. {feldera-0.36.0 → feldera-0.38.0}/feldera/runtime_config.py +19 -3
  6. {feldera-0.36.0 → feldera-0.38.0}/feldera.egg-info/PKG-INFO +1 -1
  7. {feldera-0.36.0 → feldera-0.38.0}/pyproject.toml +1 -1
  8. {feldera-0.36.0 → feldera-0.38.0}/tests/test_pipeline_builder.py +14 -8
  9. {feldera-0.36.0 → feldera-0.38.0}/tests/test_udf.py +6 -6
  10. {feldera-0.36.0 → feldera-0.38.0}/README.md +0 -0
  11. {feldera-0.36.0 → feldera-0.38.0}/feldera/__init__.py +0 -0
  12. {feldera-0.36.0 → feldera-0.38.0}/feldera/_callback_runner.py +0 -0
  13. {feldera-0.36.0 → feldera-0.38.0}/feldera/_helpers.py +0 -0
  14. {feldera-0.36.0 → feldera-0.38.0}/feldera/enums.py +0 -0
  15. {feldera-0.36.0 → feldera-0.38.0}/feldera/output_handler.py +0 -0
  16. {feldera-0.36.0 → feldera-0.38.0}/feldera/pipeline.py +0 -0
  17. {feldera-0.36.0 → feldera-0.38.0}/feldera/pipeline_builder.py +0 -0
  18. {feldera-0.36.0 → feldera-0.38.0}/feldera/rest/__init__.py +0 -0
  19. {feldera-0.36.0 → feldera-0.38.0}/feldera/rest/errors.py +0 -0
  20. {feldera-0.36.0 → feldera-0.38.0}/feldera/rest/pipeline.py +0 -0
  21. {feldera-0.36.0 → feldera-0.38.0}/feldera/rest/sql_table.py +0 -0
  22. {feldera-0.36.0 → feldera-0.38.0}/feldera/rest/sql_view.py +0 -0
  23. {feldera-0.36.0 → feldera-0.38.0}/feldera.egg-info/SOURCES.txt +0 -0
  24. {feldera-0.36.0 → feldera-0.38.0}/feldera.egg-info/dependency_links.txt +0 -0
  25. {feldera-0.36.0 → feldera-0.38.0}/feldera.egg-info/requires.txt +0 -0
  26. {feldera-0.36.0 → feldera-0.38.0}/feldera.egg-info/top_level.txt +0 -0
  27. {feldera-0.36.0 → feldera-0.38.0}/setup.cfg +0 -0
  28. {feldera-0.36.0 → feldera-0.38.0}/tests/test_pipeline.py +0 -0
  29. {feldera-0.36.0 → feldera-0.38.0}/tests/test_variant.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: feldera
3
- Version: 0.36.0
3
+ Version: 0.38.0
4
4
  Summary: The feldera python client
5
5
  Author-email: Abhinav <abhinav.gyawali@feldera.com>
6
6
  License: MIT
@@ -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(url, api_key, timeout=timeout)
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:
@@ -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[bool] = False,
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__
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: feldera
3
- Version: 0.36.0
3
+ Version: 0.38.0
4
4
  Summary: The feldera python client
5
5
  Author-email: Abhinav <abhinav.gyawali@feldera.com>
6
6
  License: MIT
@@ -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.36.0"
9
+ version = "0.38.0"
10
10
  license = { text = "MIT" }
11
11
  requires-python = ">=3.10"
12
12
  authors = [
@@ -492,14 +492,20 @@ Code snippet:
492
492
  "format": {{
493
493
  "name": "avro",
494
494
  "config": {{
495
- "schema": {json.dumps(json.dumps({
496
- "type": "record",
497
- "name": "items",
498
- "fields": [
499
- {"name": "id", "type": ["null", "int"]},
500
- {"name": "name", "type": ["null", "string"]}
501
- ]
502
- }))}
495
+ "schema": {
496
+ json.dumps(
497
+ json.dumps(
498
+ {
499
+ "type": "record",
500
+ "name": "items",
501
+ "fields": [
502
+ {"name": "id", "type": ["null", "int"]},
503
+ {"name": "name", "type": ["null", "string"]},
504
+ ],
505
+ }
506
+ )
507
+ )
508
+ }
503
509
  }}
504
510
  }}
505
511
  }}
@@ -193,16 +193,16 @@ pub fn t2t(i: Option<Time>) -> Result<Option<Time>, Box<dyn std::error::Error>>
193
193
  pub fn nt2nt(i: Time) -> Result<Time, Box<dyn std::error::Error>> {
194
194
  Ok(i)
195
195
  }
196
- pub fn arr2arr(i: Option<Vec<Option<i32>>>) -> Result<Option<Vec<Option<i32>>>, Box<dyn std::error::Error>> {
196
+ pub fn arr2arr(i: Option<Array<Option<i32>>>) -> Result<Option<Array<Option<i32>>>, Box<dyn std::error::Error>> {
197
197
  Ok(i)
198
198
  }
199
- pub fn narr2narr(i: Vec<Option<i32>>) -> Result<Vec<Option<i32>>, Box<dyn std::error::Error>> {
199
+ pub fn narr2narr(i: Array<Option<i32>>) -> Result<Array<Option<i32>>, Box<dyn std::error::Error>> {
200
200
  Ok(i)
201
201
  }
202
- pub fn map2map(i: Option<BTreeMap<String, Option<String>>>) -> Result<Option<BTreeMap<String, Option<String>>>, Box<dyn std::error::Error>> {
202
+ pub fn map2map(i: Option<Map<SqlString, Option<SqlString>>>) -> Result<Option<Map<SqlString, Option<SqlString>>>, Box<dyn std::error::Error>> {
203
203
  Ok(i)
204
204
  }
205
- pub fn nmap2nmap(i: BTreeMap<String, Option<String>>) -> Result<BTreeMap<String, Option<String>>, Box<dyn std::error::Error>> {
205
+ pub fn nmap2nmap(i: Map<SqlString, Option<SqlString>>) -> Result<Map<SqlString, Option<SqlString>>, Box<dyn std::error::Error>> {
206
206
  Ok(i)
207
207
  }
208
208
  pub fn var2var(i: Option<Variant>) -> Result<Option<Variant>, Box<dyn std::error::Error>> {
@@ -217,10 +217,10 @@ pub fn dec2dec(i: Option<Decimal>) -> Result<Option<Decimal>, Box<dyn std::error
217
217
  pub fn ndec2ndec(i: Decimal) -> Result<Decimal, Box<dyn std::error::Error>> {
218
218
  Ok(i)
219
219
  }
220
- pub fn str2str(i: Option<String>) -> Result<Option<String>, Box<dyn std::error::Error>> {
220
+ pub fn str2str(i: Option<SqlString>) -> Result<Option<SqlString>, Box<dyn std::error::Error>> {
221
221
  Ok(i)
222
222
  }
223
- pub fn nstr2nstr(i: String) -> Result<String, Box<dyn std::error::Error>> {
223
+ pub fn nstr2nstr(i: SqlString) -> Result<SqlString, Box<dyn std::error::Error>> {
224
224
  Ok(i)
225
225
  }
226
226
  // pub fn struct2struct(i: Option<struct_1>) -> Result<Option<struct_2>, Box<dyn std::error::Error>> {
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes