artesian-sdk 4.3.1.dev2__py3-none-any.whl → 5.0.0.dev2__py3-none-any.whl

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.
Files changed (56) hide show
  1. Artesian/Exceptions.py +17 -29
  2. Artesian/GMEPublicOffers/ExtractionRangeConfig.py +1 -2
  3. Artesian/GMEPublicOffers/GMEPublicOfferQuery.py +59 -86
  4. Artesian/GMEPublicOffers/GMEPublicOfferQueryParameters.py +15 -15
  5. Artesian/GMEPublicOffers/GMEPublicOfferService.py +4 -5
  6. Artesian/GMEPublicOffers/_Enum/Market.py +4 -0
  7. Artesian/GMEPublicOffers/_Enum/Status.py +1 -0
  8. Artesian/GMEPublicOffers/__init__.py +13 -13
  9. Artesian/MarketData/MarketDataService.py +72 -130
  10. Artesian/MarketData/_Dto/ArtesianMetadataFacet.py +5 -5
  11. Artesian/MarketData/_Dto/ArtesianSearchResults.py +4 -4
  12. Artesian/MarketData/_Dto/CheckConversionResult.py +2 -3
  13. Artesian/MarketData/_Dto/CurveRangeEntity.py +6 -6
  14. Artesian/MarketData/_Dto/DeleteData.py +5 -5
  15. Artesian/MarketData/_Dto/DerivedCfg.py +3 -3
  16. Artesian/MarketData/_Dto/DerivedTransformQueryValidation.py +2 -3
  17. Artesian/MarketData/_Dto/DerivedTransformQueryValidationResponse.py +3 -3
  18. Artesian/MarketData/_Dto/MarketDataEntityInput.py +19 -30
  19. Artesian/MarketData/_Dto/MarketDataEntityOutput.py +9 -16
  20. Artesian/MarketData/_Dto/PagedResult.py +3 -4
  21. Artesian/MarketData/_Dto/TimeSerieData.py +5 -4
  22. Artesian/MarketData/_Dto/UnitOfMeasure.py +1 -2
  23. Artesian/MarketData/_Dto/UpsertData.py +28 -26
  24. Artesian/MarketData/_Dto/__init__.py +29 -29
  25. Artesian/MarketData/_Enum/__init__.py +9 -9
  26. Artesian/MarketData/__init__.py +38 -39
  27. Artesian/Query/ActualQuery.py +28 -41
  28. Artesian/Query/AuctionQuery.py +14 -18
  29. Artesian/Query/BidAskQuery.py +18 -20
  30. Artesian/Query/DefaultPartitionStrategy.py +17 -19
  31. Artesian/Query/MasQuery.py +19 -22
  32. Artesian/Query/QueryService.py +9 -10
  33. Artesian/Query/VersionedQuery.py +45 -89
  34. Artesian/Query/_Query.py +40 -40
  35. Artesian/Query/_QueryParameters/ActualQueryParameters.py +15 -17
  36. Artesian/Query/_QueryParameters/AuctionQueryParameters.py +8 -10
  37. Artesian/Query/_QueryParameters/BidAskQueryParameters.py +9 -11
  38. Artesian/Query/_QueryParameters/ExtractionRangeConfig.py +7 -7
  39. Artesian/Query/_QueryParameters/MasQueryParameters.py +9 -11
  40. Artesian/Query/_QueryParameters/MostRecentSelectionConfig.py +10 -11
  41. Artesian/Query/_QueryParameters/QueryParameters.py +28 -33
  42. Artesian/Query/_QueryParameters/VersionSelectionConfig.py +3 -3
  43. Artesian/Query/_QueryParameters/VersionedQueryParameters.py +17 -19
  44. Artesian/Query/_QueryParameters/VersionsRangeSelectionConfig.py +5 -6
  45. Artesian/Query/__init__.py +11 -11
  46. Artesian/_ClientsExecutor/ArtesianJsonSerializer.py +211 -121
  47. Artesian/_ClientsExecutor/Client.py +34 -36
  48. Artesian/_ClientsExecutor/RequestExecutor.py +96 -115
  49. Artesian/__init__.py +15 -17
  50. Artesian/_version.py +2 -2
  51. {artesian_sdk-4.3.1.dev2.dist-info → artesian_sdk-5.0.0.dev2.dist-info}/METADATA +10 -17
  52. artesian_sdk-5.0.0.dev2.dist-info/RECORD +78 -0
  53. {artesian_sdk-4.3.1.dev2.dist-info → artesian_sdk-5.0.0.dev2.dist-info}/WHEEL +1 -1
  54. artesian_sdk-4.3.1.dev2.dist-info/RECORD +0 -78
  55. {artesian_sdk-4.3.1.dev2.dist-info → artesian_sdk-5.0.0.dev2.dist-info}/licenses/LICENSE +0 -0
  56. {artesian_sdk-4.3.1.dev2.dist-info → artesian_sdk-5.0.0.dev2.dist-info}/top_level.txt +0 -0
@@ -1,21 +1,23 @@
1
1
  from __future__ import annotations
2
- from typing import List, Optional, cast, Dict
2
+
3
+ import asyncio
4
+ from typing import cast
3
5
 
4
6
  from Artesian.MarketData._Dto import DeleteData
5
7
  from Artesian.MarketData._Dto.DerivedTransformQueryValidation import DerivedTransformQueryValidation
6
8
  from Artesian.MarketData._Dto.DerivedTransformQueryValidationResponse import DerivedTransformQueryValidationResponse
7
- from ._Dto.DerivedCfg import DerivedCfg
8
- from .._ClientsExecutor.RequestExecutor import _RequestExecutor
9
+
9
10
  from .._ClientsExecutor.Client import _Client
11
+ from .._ClientsExecutor.RequestExecutor import _RequestExecutor
10
12
  from ..ArtesianConfig import ArtesianConfig
11
13
  from ..ArtesianPolicyConfig import ArtesianPolicyConfig
12
- from ._Dto.PagedResult import PagedResultCurveRangeEntity
13
14
  from ._Dto.ArtesianSearchResults import ArtesianSearchResults
15
+ from ._Dto.CheckConversionResult import CheckConversionResult
16
+ from ._Dto.DerivedCfg import DerivedCfg
14
17
  from ._Dto.MarketDataEntityInput import MarketDataEntityInput
15
18
  from ._Dto.MarketDataEntityOutput import MarketDataEntityOutput
16
- from ._Dto.CheckConversionResult import CheckConversionResult
19
+ from ._Dto.PagedResult import PagedResultCurveRangeEntity
17
20
  from ._Dto.UpsertData import UpsertData
18
- import asyncio
19
21
 
20
22
 
21
23
  class MarketDataService:
@@ -48,10 +50,10 @@ class MarketDataService:
48
50
  id: int,
49
51
  page: int,
50
52
  pageSize: int,
51
- product: Optional[str] = None,
52
- versionFrom: Optional[str] = None,
53
- versionTo: Optional[str] = None,
54
- ) -> PagedResultCurveRangeEntity:
53
+ product: str | None = None,
54
+ versionFrom: str | None = None,
55
+ versionTo: str | None = None,
56
+ ) -> PagedResultCurveRangeEntity | None:
55
57
  """
56
58
  Reads paged set of available versions of the marketdata by id.
57
59
 
@@ -68,7 +70,7 @@ class MarketDataService:
68
70
  """
69
71
 
70
72
  url = "/marketdata/entity/" + str(id) + "/curves"
71
- params = {} # needed to avoid typing to detect dict[str,int] ...
73
+ params: dict[str, str | int] = {}
72
74
  params["page"] = page
73
75
  params["pageSize"] = pageSize
74
76
  if versionFrom is not None:
@@ -89,17 +91,17 @@ class MarketDataService:
89
91
  )
90
92
  ]
91
93
  )
92
- return cast(PagedResultCurveRangeEntity, res[0])
94
+ return cast(PagedResultCurveRangeEntity | None, res[0])
93
95
 
94
96
  def readCurveRange(
95
97
  self: MarketDataService,
96
98
  id: int,
97
99
  page: int,
98
100
  pageSize: int,
99
- product: Optional[str] = None,
100
- versionFrom: Optional[str] = None,
101
- versionTo: Optional[str] = None,
102
- ) -> PagedResultCurveRangeEntity:
101
+ product: str | None = None,
102
+ versionFrom: str | None = None,
103
+ versionTo: str | None = None,
104
+ ) -> PagedResultCurveRangeEntity | None:
103
105
  """
104
106
  Reads paged set of available versions of the marketdata by id.
105
107
 
@@ -115,9 +117,7 @@ class MarketDataService:
115
117
  Paged result of CurveRange entity.
116
118
  """
117
119
  return _get_event_loop().run_until_complete(
118
- self.readCurveRangeAsync(
119
- id, page, pageSize, product, versionFrom, versionTo
120
- )
120
+ self.readCurveRangeAsync(id, page, pageSize, product, versionFrom, versionTo)
121
121
  )
122
122
 
123
123
  async def searchFacetAsync(
@@ -125,10 +125,10 @@ class MarketDataService:
125
125
  page: int,
126
126
  pageSize: int,
127
127
  searchText: str | None = None,
128
- filters: Optional[Dict[str, List[str]]] = None,
129
- sorts: Optional[List[str]] = None,
128
+ filters: dict[str, list[str]] | None = None,
129
+ sorts: list[str] | None = None,
130
130
  doNotLoadAdditionalInfo: bool = False,
131
- ) -> ArtesianSearchResults:
131
+ ) -> ArtesianSearchResults | None:
132
132
  """
133
133
  Search the MarketData collection with faceted results.
134
134
 
@@ -152,7 +152,7 @@ class MarketDataService:
152
152
  filtersList.append(key + ":" + value)
153
153
 
154
154
  url = "/marketdata/searchfacet"
155
- params = {} # needed to avoid typing to detect dict[str,int] ...
155
+ params: dict[str, str | int | list[str] | None] = {}
156
156
  params["page"] = page
157
157
  params["pageSize"] = pageSize
158
158
  params["searchText"] = searchText
@@ -174,17 +174,17 @@ class MarketDataService:
174
174
  )
175
175
  ]
176
176
  )
177
- return cast(ArtesianSearchResults, res[0])
177
+ return cast(ArtesianSearchResults | None, res[0])
178
178
 
179
179
  def searchFacet(
180
180
  self: MarketDataService,
181
181
  page: int,
182
182
  pageSize: int,
183
- searchText: Optional[str] = None,
184
- filters: Optional[Dict[str, List[str]]] = None,
185
- sorts: Optional[List[str]] = None,
183
+ searchText: str | None = None,
184
+ filters: dict[str, list[str]] | None = None,
185
+ sorts: list[str] | None = None,
186
186
  doNotLoadAdditionalInfo: bool = False,
187
- ) -> ArtesianSearchResults:
187
+ ) -> ArtesianSearchResults | None:
188
188
  """
189
189
  Search the MarketData collection with faceted results.
190
190
 
@@ -200,14 +200,10 @@ class MarketDataService:
200
200
  ArtesianSearchResults entity.
201
201
  """
202
202
  return _get_event_loop().run_until_complete(
203
- self.searchFacetAsync(
204
- page, pageSize, searchText, filters, sorts, doNotLoadAdditionalInfo
205
- )
203
+ self.searchFacetAsync(page, pageSize, searchText, filters, sorts, doNotLoadAdditionalInfo)
206
204
  )
207
205
 
208
- async def readMarketDataRegistryByIdAsync(
209
- self: MarketDataService, id: int
210
- ) -> MarketDataEntityOutput:
206
+ async def readMarketDataRegistryByIdAsync(self: MarketDataService, id: int) -> MarketDataEntityOutput | None:
211
207
  """
212
208
  Reads MarketData by id with MarketDataID.
213
209
 
@@ -219,18 +215,10 @@ class MarketDataService:
219
215
  """
220
216
  url = "/marketdata/entity/" + str(id)
221
217
  with self.__client as c:
222
- res = await asyncio.gather(
223
- *[
224
- self.__executor.exec(
225
- c.exec, "GET", url, None, retcls=MarketDataEntityOutput
226
- )
227
- ]
228
- )
229
- return cast(MarketDataEntityOutput, res[0])
218
+ res = await asyncio.gather(*[self.__executor.exec(c.exec, "GET", url, None, retcls=MarketDataEntityOutput)])
219
+ return cast(MarketDataEntityOutput | None, res[0])
230
220
 
231
- def readMarketDataRegistryById(
232
- self: MarketDataService, id: int
233
- ) -> MarketDataEntityOutput:
221
+ def readMarketDataRegistryById(self: MarketDataService, id: int) -> MarketDataEntityOutput | None:
234
222
  """
235
223
  Reads MarketData by curve name with MarketDataID.
236
224
 
@@ -240,13 +228,11 @@ class MarketDataService:
240
228
  Returns:
241
229
  MarketData Entity Output.
242
230
  """
243
- return _get_event_loop().run_until_complete(
244
- self.readMarketDataRegistryByIdAsync(id)
245
- )
231
+ return _get_event_loop().run_until_complete(self.readMarketDataRegistryByIdAsync(id))
246
232
 
247
233
  async def updateMarketDataAsync(
248
234
  self: MarketDataService, id: int, entity: MarketDataEntityInput
249
- ) -> MarketDataEntityOutput:
235
+ ) -> MarketDataEntityOutput | None:
250
236
  """
251
237
  Saves the given MarketData Entity
252
238
 
@@ -258,18 +244,12 @@ class MarketDataService:
258
244
  """
259
245
  url = "/marketdata/entity/" + str(id)
260
246
  with self.__client as c:
261
- res = await asyncio.gather(
262
- *[
263
- self.__executor.exec(
264
- c.exec, "PUT", url, entity, MarketDataEntityOutput
265
- )
266
- ]
267
- )
268
- return cast(MarketDataEntityOutput, res[0])
247
+ res = await asyncio.gather(*[self.__executor.exec(c.exec, "PUT", url, entity, MarketDataEntityOutput)])
248
+ return cast(MarketDataEntityOutput | None, res[0])
269
249
 
270
250
  def updateMarketData(
271
251
  self: MarketDataService, id: int, entity: MarketDataEntityInput
272
- ) -> MarketDataEntityOutput:
252
+ ) -> MarketDataEntityOutput | None:
273
253
  """
274
254
  Saves the given MarketData Entity
275
255
 
@@ -279,9 +259,7 @@ class MarketDataService:
279
259
  Returns:
280
260
  MarketData Entity Output.
281
261
  """
282
- return _get_event_loop().run_until_complete(
283
- self.updateMarketDataAsync(id, entity)
284
- )
262
+ return _get_event_loop().run_until_complete(self.updateMarketDataAsync(id, entity))
285
263
 
286
264
  async def deleteMarketDataAsync(self: MarketDataService, id: int) -> None:
287
265
  """
@@ -296,7 +274,7 @@ class MarketDataService:
296
274
  url = "/marketdata/entity/" + str(id)
297
275
  with self.__client as c:
298
276
  await asyncio.gather(*[self.__executor.exec(c.exec, "DELETE", url, None)])
299
- return None
277
+ return
300
278
 
301
279
  def deleteMarketData(self: MarketDataService, id: int) -> None:
302
280
  """
@@ -312,7 +290,7 @@ class MarketDataService:
312
290
 
313
291
  async def readMarketDataRegistryByNameAsync(
314
292
  self: MarketDataService, provider: str, curveName: str
315
- ) -> MarketDataEntityOutput:
293
+ ) -> MarketDataEntityOutput | None:
316
294
  """
317
295
  Reads MarketData by provider and curve name.
318
296
 
@@ -338,11 +316,11 @@ class MarketDataService:
338
316
  )
339
317
  ]
340
318
  )
341
- return cast(MarketDataEntityOutput, res[0])
319
+ return cast(MarketDataEntityOutput | None, res[0])
342
320
 
343
321
  def readMarketDataRegistryByName(
344
322
  self: MarketDataService, provider: str, curveName: str
345
- ) -> MarketDataEntityOutput:
323
+ ) -> MarketDataEntityOutput | None:
346
324
  """
347
325
  Reads MarketData by provider and curve name.
348
326
 
@@ -353,13 +331,11 @@ class MarketDataService:
353
331
  Returns:
354
332
  MarketData Entity Output.
355
333
  """
356
- return _get_event_loop().run_until_complete(
357
- self.readMarketDataRegistryByNameAsync(provider, curveName)
358
- )
334
+ return _get_event_loop().run_until_complete(self.readMarketDataRegistryByNameAsync(provider, curveName))
359
335
 
360
336
  async def registerMarketDataAsync(
361
337
  self: MarketDataService, entity: MarketDataEntityInput
362
- ) -> MarketDataEntityOutput:
338
+ ) -> MarketDataEntityOutput | None:
363
339
  """
364
340
  Register a new MarketData entity.
365
341
 
@@ -371,18 +347,10 @@ class MarketDataService:
371
347
  """
372
348
  url = "/marketdata/entity"
373
349
  with self.__client as c:
374
- res = await asyncio.gather(
375
- *[
376
- self.__executor.exec(
377
- c.exec, "POST", url, entity, MarketDataEntityOutput
378
- )
379
- ]
380
- )
381
- return cast(MarketDataEntityOutput, res[0])
350
+ res = await asyncio.gather(*[self.__executor.exec(c.exec, "POST", url, entity, MarketDataEntityOutput)])
351
+ return cast(MarketDataEntityOutput | None, res[0])
382
352
 
383
- def registerMarketData(
384
- self: MarketDataService, entity: MarketDataEntityInput
385
- ) -> MarketDataEntityOutput:
353
+ def registerMarketData(self: MarketDataService, entity: MarketDataEntityInput) -> MarketDataEntityOutput | None:
386
354
  """
387
355
  Register a new MarketData entity.
388
356
 
@@ -395,15 +363,11 @@ class MarketDataService:
395
363
 
396
364
  entity._validateDerivedCfg()
397
365
 
398
- return _get_event_loop().run_until_complete(
399
- self.registerMarketDataAsync(entity)
400
- )
366
+ return _get_event_loop().run_until_complete(self.registerMarketDataAsync(entity))
401
367
 
402
368
  async def checkConversionAsync(
403
- self: MarketDataService,
404
- inputUnitsOfMeasure: List[str],
405
- targetUnitOfMeasure: str
406
- ) -> CheckConversionResult:
369
+ self: MarketDataService, inputUnitsOfMeasure: list[str], targetUnitOfMeasure: str
370
+ ) -> CheckConversionResult | None:
407
371
  """
408
372
  Check UnitOfMeasure conversion.
409
373
 
@@ -416,8 +380,7 @@ class MarketDataService:
416
380
  CheckConversionResult Entity (Async).
417
381
  """
418
382
  url = "/uom/checkconversion"
419
- params = {"inputUnitsOfMeasure": inputUnitsOfMeasure,
420
- "targetUnitOfMeasure": targetUnitOfMeasure}
383
+ params = {"inputUnitsOfMeasure": inputUnitsOfMeasure, "targetUnitOfMeasure": targetUnitOfMeasure}
421
384
  with self.__client as c:
422
385
  res = await asyncio.gather(
423
386
  *[
@@ -431,13 +394,11 @@ class MarketDataService:
431
394
  )
432
395
  ]
433
396
  )
434
- return cast(CheckConversionResult, res[0])
397
+ return cast(CheckConversionResult | None, res[0])
435
398
 
436
399
  def checkConversion(
437
- self: MarketDataService,
438
- inputUnitsOfMeasure: List[str],
439
- targetUnitOfMeasure: str
440
- ) -> CheckConversionResult:
400
+ self: MarketDataService, inputUnitsOfMeasure: list[str], targetUnitOfMeasure: str
401
+ ) -> CheckConversionResult | None:
441
402
  """
442
403
  Check UnitOfMeasure conversion.
443
404
 
@@ -450,16 +411,11 @@ class MarketDataService:
450
411
  CheckConversionResult Entity.
451
412
  """
452
413
 
453
- return _get_event_loop().run_until_complete(
454
- self.checkConversionAsync(inputUnitsOfMeasure, targetUnitOfMeasure)
455
- )
414
+ return _get_event_loop().run_until_complete(self.checkConversionAsync(inputUnitsOfMeasure, targetUnitOfMeasure))
456
415
 
457
416
  async def updateDerivedConfigurationAsync(
458
- self: MarketDataService,
459
- marketDataId: int,
460
- derivedCfg: DerivedCfg,
461
- force: bool = False
462
- ) -> MarketDataEntityOutput:
417
+ self: MarketDataService, marketDataId: int, derivedCfg: DerivedCfg, force: bool = False
418
+ ) -> MarketDataEntityOutput | None:
463
419
  """
464
420
  Update Derived Configuration for marketData with id supplied in MarketDataId.
465
421
  The update will trigger a Rebuild
@@ -476,7 +432,8 @@ class MarketDataService:
476
432
 
477
433
  marketDataOutput = await self.readMarketDataRegistryByIdAsync(marketDataId)
478
434
 
479
- marketDataOutput._validateUpdateDerivedCfg(derivedCfgUpdate=derivedCfg)
435
+ # Preserve the existing AttributeError when the source market-data entity is missing.
436
+ cast(MarketDataEntityOutput, marketDataOutput)._validateUpdateDerivedCfg(derivedCfgUpdate=derivedCfg)
480
437
 
481
438
  url = "/marketdata/entity/" + str(marketDataId) + "/updateDerivedConfiguration"
482
439
  params = {"force": force}
@@ -493,14 +450,11 @@ class MarketDataService:
493
450
  )
494
451
  ]
495
452
  )
496
- return cast(MarketDataEntityOutput, res[0])
453
+ return cast(MarketDataEntityOutput | None, res[0])
497
454
 
498
455
  def updateDerivedConfiguration(
499
- self: MarketDataService,
500
- marketDataId: int,
501
- derivedCfg: DerivedCfg,
502
- force: bool = False
503
- ) -> MarketDataEntityOutput:
456
+ self: MarketDataService, marketDataId: int, derivedCfg: DerivedCfg, force: bool = False
457
+ ) -> MarketDataEntityOutput | None:
504
458
  """
505
459
  Update Derived Configuration for marketData with id supplied in MarketDataId.
506
460
  The update will trigger a Rebuild
@@ -522,7 +476,7 @@ class MarketDataService:
522
476
  url = "/marketdata/upsertdata"
523
477
  with self.__client as c:
524
478
  await asyncio.gather(*[self.__executor.exec(c.exec, "POST", url, data)])
525
- return None
479
+ return
526
480
 
527
481
  def upsertData(self: MarketDataService, data: UpsertData) -> None:
528
482
  return _get_event_loop().run_until_complete(self.upsertDataAsync(data))
@@ -531,15 +485,14 @@ class MarketDataService:
531
485
  url = "/marketdata/deletedata"
532
486
  with self.__client as c:
533
487
  await asyncio.gather(*[self.__executor.exec(c.exec, "POST", url, data)])
534
- return None
488
+ return
535
489
 
536
490
  def deleteData(self: MarketDataService, data: DeleteData) -> None:
537
491
  return _get_event_loop().run_until_complete(self.deleteDataAsync(data))
538
492
 
539
493
  async def derivedTransformQueryValidationAsync(
540
- self: MarketDataService,
541
- request: DerivedTransformQueryValidation
542
- ) -> DerivedTransformQueryValidationResponse:
494
+ self: MarketDataService, request: DerivedTransformQueryValidation
495
+ ) -> DerivedTransformQueryValidationResponse | None:
543
496
  """
544
497
  Derived Transform Query Validation.
545
498
 
@@ -552,23 +505,14 @@ class MarketDataService:
552
505
 
553
506
  with self.__client as c:
554
507
  res = await asyncio.gather(
555
- *[
556
- self.__executor.exec(
557
- c.exec,
558
- "POST",
559
- url,
560
- request,
561
- retcls=DerivedTransformQueryValidationResponse
562
- )
563
- ]
508
+ *[self.__executor.exec(c.exec, "POST", url, request, retcls=DerivedTransformQueryValidationResponse)]
564
509
  )
565
510
 
566
- return cast(DerivedTransformQueryValidationResponse, res[0])
511
+ return cast(DerivedTransformQueryValidationResponse | None, res[0])
567
512
 
568
513
  def derivedTransformQueryValidation(
569
- self: MarketDataService,
570
- request: DerivedTransformQueryValidation
571
- ) -> DerivedTransformQueryValidationResponse:
514
+ self: MarketDataService, request: DerivedTransformQueryValidation
515
+ ) -> DerivedTransformQueryValidationResponse | None:
572
516
  """
573
517
  Derived Transform Query Validation.
574
518
 
@@ -579,9 +523,7 @@ class MarketDataService:
579
523
  DerivedTransformQueryValidationResponse Entity.
580
524
  """
581
525
 
582
- return _get_event_loop().run_until_complete(
583
- self.derivedTransformQueryValidationAsync(request)
584
- )
526
+ return _get_event_loop().run_until_complete(self.derivedTransformQueryValidationAsync(request))
585
527
 
586
528
 
587
529
  def _get_event_loop() -> asyncio.AbstractEventLoop:
@@ -1,5 +1,5 @@
1
1
  from dataclasses import dataclass
2
- from typing import List, Optional
2
+
3
3
  from .._Enum import ArtesianMetadataFacetType
4
4
 
5
5
 
@@ -13,7 +13,7 @@ class ArtesianMetadataFacetCount:
13
13
  count: the count of ArtesianMetadataFacet
14
14
  """
15
15
 
16
- value: Optional[str] = None
16
+ value: str | None = None
17
17
  count: int = 0
18
18
 
19
19
 
@@ -28,6 +28,6 @@ class ArtesianMetadataFacet:
28
28
  values: list of ArtesianMetadataFacetCount
29
29
  """
30
30
 
31
- facetName: Optional[str] = None
32
- facetType: Optional[ArtesianMetadataFacetType] = None
33
- values: Optional[List[ArtesianMetadataFacetCount]] = None
31
+ facetName: str | None = None
32
+ facetType: ArtesianMetadataFacetType | None = None
33
+ values: list[ArtesianMetadataFacetCount] | None = None
@@ -1,7 +1,7 @@
1
1
  from dataclasses import dataclass
2
- from typing import List, Optional
3
- from .MarketDataEntityOutput import MarketDataEntityOutput
2
+
4
3
  from .ArtesianMetadataFacet import ArtesianMetadataFacet
4
+ from .MarketDataEntityOutput import MarketDataEntityOutput
5
5
 
6
6
 
7
7
  @dataclass
@@ -15,6 +15,6 @@ class ArtesianSearchResults:
15
15
  countResults: the count of result
16
16
  """
17
17
 
18
- results: Optional[List[MarketDataEntityOutput]] = None
19
- facets: Optional[List[ArtesianMetadataFacet]] = None
18
+ results: list[MarketDataEntityOutput] | None = None
19
+ facets: list[ArtesianMetadataFacet] | None = None
20
20
  countResults: int = 0
@@ -1,5 +1,4 @@
1
1
  from dataclasses import dataclass
2
- from typing import List
3
2
 
4
3
 
5
4
  @dataclass
@@ -15,5 +14,5 @@ class CheckConversionResult:
15
14
  """
16
15
 
17
16
  targetUnitOfMeasure: str
18
- convertibleInputUnitsOfMeasure: List[str]
19
- notConvertibleInputUnitsOfMeasure: List[str]
17
+ convertibleInputUnitsOfMeasure: list[str]
18
+ notConvertibleInputUnitsOfMeasure: list[str]
@@ -1,6 +1,6 @@
1
- from dataclasses import dataclass
2
1
  import datetime
3
- from typing import Optional
2
+ from dataclasses import dataclass
3
+
4
4
  from dateutil import tz
5
5
 
6
6
 
@@ -20,9 +20,9 @@ class CurveRangeEntity:
20
20
  """
21
21
 
22
22
  marketDataId: int = 0
23
- product: Optional[str] = None
24
- version: Optional[str] = None
23
+ product: str | None = None
24
+ version: str | None = None
25
25
  lastUpdated: datetime.datetime = datetime.datetime.min.replace(tzinfo=tz.UTC)
26
26
  created: datetime.datetime = datetime.datetime.min.replace(tzinfo=tz.UTC)
27
- rangeStart: Optional[datetime.date] = None
28
- rangeEnd: Optional[datetime.date] = None
27
+ rangeStart: datetime.date | None = None
28
+ rangeEnd: datetime.date | None = None
@@ -1,7 +1,7 @@
1
1
  from dataclasses import dataclass
2
2
  from datetime import datetime
3
- from typing import List, Optional
4
- from Artesian.MarketData._Dto import MarketDataIdentifier
3
+
4
+ from .MarketDataIdentifier import MarketDataIdentifier
5
5
 
6
6
 
7
7
  @dataclass
@@ -28,8 +28,8 @@ class DeleteData:
28
28
  ID: MarketDataIdentifier
29
29
  rangeStart: datetime
30
30
  rangeEnd: datetime
31
- timezone: Optional[str] = None
32
- product: Optional[List[str]] = None
33
- version: Optional[datetime] = None
31
+ timezone: str | None = None
32
+ product: list[str] | None = None
33
+ version: datetime | None = None
34
34
  deferCommandExecution: bool = False
35
35
  deferDataGeneration: bool = True
@@ -1,5 +1,5 @@
1
1
  from dataclasses import dataclass
2
- from typing import List, Optional
2
+
3
3
  from .._Enum import DerivedAlgorithm
4
4
 
5
5
 
@@ -18,5 +18,5 @@ class DerivedCfg:
18
18
 
19
19
  derivedAlgorithm: DerivedAlgorithm
20
20
  version: int
21
- orderedReferencedMarketDataIds: Optional[List[int]]
22
- transform: Optional[str] = None
21
+ orderedReferencedMarketDataIds: list[int] | None
22
+ transform: str | None = None
@@ -1,5 +1,4 @@
1
1
  from dataclasses import dataclass
2
- from typing import Optional
3
2
 
4
3
  from .TimeSerieData import TimeSerieData
5
4
 
@@ -27,8 +26,8 @@ class DerivedTransformQueryValidation:
27
26
  """
28
27
 
29
28
  data: TimeSerieData
30
- transform: Optional[str] = None
29
+ transform: str | None = None
31
30
 
32
- def __post_init__(self: "DerivedTransformQueryValidation") -> None:
31
+ def __post_init__(self) -> None:
33
32
  if self.transform is None:
34
33
  raise ValueError("transform must be provided for query validation.")
@@ -1,5 +1,5 @@
1
1
  from dataclasses import dataclass
2
- from typing import Optional
2
+
3
3
  from .TimeSerieData import TimeSerieData
4
4
 
5
5
 
@@ -12,7 +12,7 @@ class Error:
12
12
 
13
13
  """
14
14
 
15
- message: Optional[str] = None
15
+ message: str | None = None
16
16
 
17
17
 
18
18
  @dataclass
@@ -27,4 +27,4 @@ class DerivedTransformQueryValidationResponse:
27
27
 
28
28
  data: TimeSerieData
29
29
  valid: bool
30
- error: Optional[Error] = None
30
+ error: Error | None = None