gnomepy 2.26.2__tar.gz → 2.26.3__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.
- {gnomepy-2.26.2 → gnomepy-2.26.3}/PKG-INFO +1 -1
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/registry/api.py +27 -2
- {gnomepy-2.26.2 → gnomepy-2.26.3}/pyproject.toml +1 -1
- {gnomepy-2.26.2 → gnomepy-2.26.3}/README.md +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/__init__.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/_fs.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/auth.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/cli.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/config.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/data/__init__.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/data/artifacts.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/data/catalog.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/data/datasets.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/explorer/__init__.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/explorer/app.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/explorer/data.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/explorer/panels/__init__.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/explorer/panels/book.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/explorer/panels/event_log.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/explorer/panels/pnl.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/explorer/panels/price.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/explorer/panels/signals.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/explorer/styles.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/importer/__init__.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/importer/chunker.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/importer/encoder.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/importer/import_job.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/importer/mapping.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/importer/scaling.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/importer/tardis/__init__.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/importer/tardis/book.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/importer/tardis/client.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/importer/tardis/importer.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/importer/tardis/mappings.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/importer/uploader.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/importer/validators.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/java/__init__.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/java/_classpath.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/java/_jvm.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/java/backtest/__init__.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/java/backtest/config.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/java/backtest/orders.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/java/backtest/runner.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/java/backtest/strategy.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/java/cache.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/java/datastore.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/java/enums.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/java/market_data.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/java/oms.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/java/recorder.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/java/sbe.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/java/schemas.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/java/statics.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/java/strategy/__init__.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/java/strategy/config.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/java/strategy/runner.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/metadata.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/raw_exchange.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/registry/__init__.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/registry/graph.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/registry/types.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/remote.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/reporting/__init__.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/reporting/metrics.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/reporting/plots.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/reporting/report.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/sweep.py +0 -0
- {gnomepy-2.26.2 → gnomepy-2.26.3}/gnomepy/utils.py +0 -0
|
@@ -24,6 +24,9 @@ from gnomepy.registry.types import (
|
|
|
24
24
|
|
|
25
25
|
logger = logging.getLogger(__name__)
|
|
26
26
|
|
|
27
|
+
# API Gateway gives up on an integration after 29s, so a request still open well past that is a dropped connection.
|
|
28
|
+
REQUEST_TIMEOUT_SECONDS = 60
|
|
29
|
+
|
|
27
30
|
|
|
28
31
|
def _to_camel_case(snake_str: str) -> str:
|
|
29
32
|
camel = "".join(x.capitalize() for x in snake_str.lower().split("_"))
|
|
@@ -32,7 +35,12 @@ def _to_camel_case(snake_str: str) -> str:
|
|
|
32
35
|
|
|
33
36
|
def _parse_kwarg_params(items) -> dict:
|
|
34
37
|
params = dict(items)
|
|
35
|
-
|
|
38
|
+
# The registry compares query flags with the string "true"; requests would send Python's "True".
|
|
39
|
+
return {
|
|
40
|
+
_to_camel_case(k): str(v).lower() if isinstance(v, bool) else v
|
|
41
|
+
for k, v in params.items()
|
|
42
|
+
if v is not None and k != "self"
|
|
43
|
+
}
|
|
36
44
|
|
|
37
45
|
|
|
38
46
|
class RegistryClient:
|
|
@@ -190,7 +198,10 @@ class RegistryClient:
|
|
|
190
198
|
logger.debug("GET %s params=%s page_size=%d", path, params, self._page_size)
|
|
191
199
|
while True:
|
|
192
200
|
page_params = {**params, "limit": self._page_size, "offset": offset}
|
|
193
|
-
res = requests.get(
|
|
201
|
+
res = requests.get(
|
|
202
|
+
self.base_url + path, params=page_params, headers={"x-api-key": self.api_key},
|
|
203
|
+
timeout=REQUEST_TIMEOUT_SECONDS,
|
|
204
|
+
)
|
|
194
205
|
res.raise_for_status()
|
|
195
206
|
page = res.json()
|
|
196
207
|
logger.debug("GET %s page=%d offset=%d got=%d total=%d", path, page_num, offset, len(page), len(all_items) + len(page))
|
|
@@ -217,6 +228,8 @@ class RegistryClient:
|
|
|
217
228
|
self.base_url + path,
|
|
218
229
|
json=batch,
|
|
219
230
|
headers={"x-api-key": self.api_key, "Content-Type": "application/json"},
|
|
231
|
+
|
|
232
|
+
timeout=REQUEST_TIMEOUT_SECONDS,
|
|
220
233
|
)
|
|
221
234
|
if not res.ok:
|
|
222
235
|
logger.error("POST %s failed (%d): %s", path, res.status_code, res.text)
|
|
@@ -235,6 +248,8 @@ class RegistryClient:
|
|
|
235
248
|
self.base_url + path,
|
|
236
249
|
json=batch,
|
|
237
250
|
headers={"x-api-key": self.api_key, "Content-Type": "application/json"},
|
|
251
|
+
|
|
252
|
+
timeout=REQUEST_TIMEOUT_SECONDS,
|
|
238
253
|
)
|
|
239
254
|
if not res.ok:
|
|
240
255
|
logger.error("PATCH %s failed (%d): %s", path, res.status_code, res.text)
|
|
@@ -247,6 +262,8 @@ class RegistryClient:
|
|
|
247
262
|
self.base_url + path,
|
|
248
263
|
json=body,
|
|
249
264
|
headers={"x-api-key": self.api_key, "Content-Type": "application/json"},
|
|
265
|
+
|
|
266
|
+
timeout=REQUEST_TIMEOUT_SECONDS,
|
|
250
267
|
)
|
|
251
268
|
res.raise_for_status()
|
|
252
269
|
return res.json()
|
|
@@ -258,6 +275,8 @@ class RegistryClient:
|
|
|
258
275
|
self.base_url + "/cognito" + path,
|
|
259
276
|
json=body,
|
|
260
277
|
headers={"Authorization": get_id_token(), "Content-Type": "application/json"},
|
|
278
|
+
|
|
279
|
+
timeout=REQUEST_TIMEOUT_SECONDS,
|
|
261
280
|
)
|
|
262
281
|
res.raise_for_status()
|
|
263
282
|
return res.json()
|
|
@@ -268,6 +287,8 @@ class RegistryClient:
|
|
|
268
287
|
params=params,
|
|
269
288
|
json=body,
|
|
270
289
|
headers={"x-api-key": self.api_key, "Content-Type": "application/json"},
|
|
290
|
+
|
|
291
|
+
timeout=REQUEST_TIMEOUT_SECONDS,
|
|
271
292
|
)
|
|
272
293
|
res.raise_for_status()
|
|
273
294
|
return res.json()
|
|
@@ -277,6 +298,8 @@ class RegistryClient:
|
|
|
277
298
|
self.base_url + path,
|
|
278
299
|
json=body,
|
|
279
300
|
headers={"x-api-key": self.api_key, "Content-Type": "application/json"},
|
|
301
|
+
|
|
302
|
+
timeout=REQUEST_TIMEOUT_SECONDS,
|
|
280
303
|
)
|
|
281
304
|
res.raise_for_status()
|
|
282
305
|
return res.json()
|
|
@@ -383,6 +406,8 @@ class RegistryClient:
|
|
|
383
406
|
url,
|
|
384
407
|
json={k: v for k, v in payload.items() if v is not None},
|
|
385
408
|
headers={"x-api-key": self.api_key, "Content-Type": "application/json"},
|
|
409
|
+
|
|
410
|
+
timeout=REQUEST_TIMEOUT_SECONDS,
|
|
386
411
|
)
|
|
387
412
|
res.raise_for_status()
|
|
388
413
|
return res.json()
|
|
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
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|