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.
- {pyetp-0.0.34 → pyetp-0.0.35}/PKG-INFO +1 -1
- {pyetp-0.0.34 → pyetp-0.0.35}/pyetp/client.py +4 -7
- {pyetp-0.0.34 → pyetp-0.0.35}/pyetp/config.py +2 -1
- {pyetp-0.0.34 → pyetp-0.0.35}/pyproject.toml +1 -1
- {pyetp-0.0.34 → pyetp-0.0.35}/LICENSE.md +0 -0
- {pyetp-0.0.34 → pyetp-0.0.35}/README.md +0 -0
- {pyetp-0.0.34 → pyetp-0.0.35}/pyetp/__init__.py +0 -0
- {pyetp-0.0.34 → pyetp-0.0.35}/pyetp/resqml_objects/__init__.py +0 -0
- {pyetp-0.0.34 → pyetp-0.0.35}/pyetp/resqml_objects/generated.py +0 -0
- {pyetp-0.0.34 → pyetp-0.0.35}/pyetp/types.py +0 -0
- {pyetp-0.0.34 → pyetp-0.0.35}/pyetp/uri.py +0 -0
- {pyetp-0.0.34 → pyetp-0.0.35}/pyetp/utils.py +0 -0
- {pyetp-0.0.34 → pyetp-0.0.35}/pyetp/utils_arrays.py +0 -0
- {pyetp-0.0.34 → pyetp-0.0.35}/pyetp/utils_xml.py +0 -0
|
@@ -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 =
|
|
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
|
|
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=
|
|
26
|
+
MaxWebSocketMessagePayloadSize: int = Field(default=30000)
|
|
27
|
+
max_concurrent_requests: int = Field(default = 5)
|
|
27
28
|
|
|
28
29
|
|
|
29
30
|
SETTINGS = Settings()
|
|
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
|