pyetp 0.0.34__tar.gz → 0.0.35__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pyetp
3
- Version: 0.0.34
3
+ Version: 0.0.35
4
4
  Summary: Interface with OSDU RDDMS using ETP protocol
5
5
  Author: Adam Cheng
6
6
  Author-email: 52572642+adamchengtkc@users.noreply.github.com
@@ -96,7 +96,7 @@ class ETPClient(ETPConnection):
96
96
  self.timeout = timeout
97
97
  self.client_info.endpoint_capabilities['MaxWebSocketMessagePayloadSize'] = SETTINGS.MaxWebSocketMessagePayloadSize
98
98
  self.__recvtask = asyncio.create_task(self.__recv__())
99
- self.max_concurrent_requests = 1
99
+ self.max_concurrent_requests = SETTINGS.max_concurrent_requests
100
100
 
101
101
  #
102
102
  # client
@@ -229,8 +229,7 @@ class ETPClient(ETPConnection):
229
229
  currentDateTime=self.timestamp,
230
230
  earliestRetainedChangeTime=0,
231
231
  endpointCapabilities=dict(
232
- MaxWebSocketMessagePayloadSize=DataValue(item=self.max_size),
233
- MaxWebSocketFramePayloadSize=DataValue(item=10000)
232
+ MaxWebSocketMessagePayloadSize=DataValue(item=self.max_size)
234
233
  )
235
234
  )
236
235
  )
@@ -262,7 +261,8 @@ class ETPClient(ETPConnection):
262
261
 
263
262
  @property
264
263
  def max_size(self):
265
- return self.client_info.getCapability("MaxWebSocketMessagePayloadSize")
264
+ return SETTINGS.MaxWebSocketMessagePayloadSize
265
+ #return self.client_info.getCapability("MaxWebSocketMessagePayloadSize")
266
266
 
267
267
  @property
268
268
  def max_array_size(self):
@@ -969,7 +969,6 @@ class ETPClient(ETPConnection):
969
969
 
970
970
  all_ranges = [range(s // block_size + 1) for s in shape]
971
971
  indexes = np.array(np.meshgrid(*all_ranges)).T.reshape(-1, len(shape))
972
-
973
972
  for ijk in indexes:
974
973
  starts = ijk * block_size
975
974
  if offset != 0:
@@ -992,7 +991,6 @@ class ETPClient(ETPConnection):
992
991
  buffer_shape = np.array([total_count], dtype=np.int64)
993
992
  else:
994
993
  buffer_shape = np.array(metadata.dimensions, dtype=np.int64)
995
-
996
994
  dtype = utils_arrays.get_dtype(metadata.transport_array_type)
997
995
  buffer = np.zeros(buffer_shape, dtype=dtype)
998
996
  params = []
@@ -1016,7 +1014,6 @@ class ETPClient(ETPConnection):
1016
1014
  return buffer
1017
1015
 
1018
1016
  async def _put_array_chuncked(self, uid: DataArrayIdentifier, data: np.ndarray):
1019
-
1020
1017
  transport_array_type = utils_arrays.get_transport(data.dtype)
1021
1018
  await self._put_uninitialized_data_array(uid, data.shape, transport_array_type=transport_array_type)
1022
1019
  params = []
@@ -23,7 +23,8 @@ class Settings(BaseSettings):
23
23
  etp_url: WebSocketUrl = Field(default='wss://host.com')
24
24
  etp_timeout: float = Field(default=15., description="Timeout in seconds")
25
25
  data_partition: Optional[str] = None
26
- MaxWebSocketMessagePayloadSize: int = Field(default=100000)
26
+ MaxWebSocketMessagePayloadSize: int = Field(default=30000)
27
+ max_concurrent_requests: int = Field(default = 5)
27
28
 
28
29
 
29
30
  SETTINGS = Settings()
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "pyetp"
3
- version = "0.0.34"
3
+ version = "0.0.35"
4
4
  description = "Interface with OSDU RDDMS using ETP protocol"
5
5
  authors = ["Adam Cheng <52572642+adamchengtkc@users.noreply.github.com>"]
6
6
  readme = "README.md"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes