prediction-market-agent-tooling 0.56.0.dev1860__py3-none-any.whl → 0.56.0.dev1862__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.
@@ -190,7 +190,7 @@ def db_cache(
190
190
  if is_pydantic_model:
191
191
  # If the output contains any Pydantic models, we need to initialise them.
192
192
  try:
193
- return convert_return_type_to_pydantic(
193
+ return convert_cached_output_to_pydantic(
194
194
  return_type, cached_result.result
195
195
  )
196
196
  except ValueError as e:
@@ -314,7 +314,7 @@ def convert_pydantic_to_dict(value: Any) -> Any:
314
314
  return value
315
315
 
316
316
 
317
- def convert_return_type_to_pydantic(return_type: Any, data: Any) -> Any:
317
+ def convert_cached_output_to_pydantic(return_type: Any, data: Any) -> Any:
318
318
  """
319
319
  Used to initialize Pydantic models from anything cached that was originally a Pydantic model in the output. Including models in nested structures.
320
320
  """
@@ -330,7 +330,7 @@ def convert_return_type_to_pydantic(return_type: Any, data: Any) -> Any:
330
330
  # Convert the dictionary to a Pydantic model
331
331
  return return_type(
332
332
  **{
333
- k: convert_return_type_to_pydantic(
333
+ k: convert_cached_output_to_pydantic(
334
334
  getattr(return_type, k, None), v
335
335
  )
336
336
  for k, v in data.items()
@@ -343,9 +343,9 @@ def convert_return_type_to_pydantic(return_type: Any, data: Any) -> Any:
343
343
  elif origin is dict:
344
344
  key_type, value_type = args
345
345
  return {
346
- convert_return_type_to_pydantic(
346
+ convert_cached_output_to_pydantic(
347
347
  key_type, k
348
- ): convert_return_type_to_pydantic(value_type, v)
348
+ ): convert_cached_output_to_pydantic(value_type, v)
349
349
  for k, v in data.items()
350
350
  }
351
351
  else:
@@ -357,7 +357,7 @@ def convert_return_type_to_pydantic(return_type: Any, data: Any) -> Any:
357
357
  if origin in {list, tuple}:
358
358
  item_type = args[0]
359
359
  converted_items = [
360
- convert_return_type_to_pydantic(item_type, item) for item in data
360
+ convert_cached_output_to_pydantic(item_type, item) for item in data
361
361
  ]
362
362
  return type(data)(converted_items)
363
363
  else:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: prediction-market-agent-tooling
3
- Version: 0.56.0.dev1860
3
+ Version: 0.56.0.dev1862
4
4
  Summary: Tools to benchmark, deploy and monitor prediction market agents.
5
5
  Author: Gnosis
6
6
  Requires-Python: >=3.10,<3.12
@@ -69,7 +69,7 @@ prediction_market_agent_tooling/tools/betting_strategies/market_moving.py,sha256
69
69
  prediction_market_agent_tooling/tools/betting_strategies/minimum_bet_to_win.py,sha256=-FUSuQQgjcWSSnoFxnlAyTeilY6raJABJVM2QKkFqAY,438
70
70
  prediction_market_agent_tooling/tools/betting_strategies/stretch_bet_between.py,sha256=THMXwFlskvzbjnX_OiYtDSzI8XVFyULWfP2525_9UGc,429
71
71
  prediction_market_agent_tooling/tools/betting_strategies/utils.py,sha256=kpIb-ci67Vc1Yqqaa-_S4OUkbhWSIYog4_Iwp69HU_k,97
72
- prediction_market_agent_tooling/tools/caches/db_cache.py,sha256=QkhtNTs7sjwBhBJpkF_dWO5UZBE8Z1FT03WXskpakQg,13847
72
+ prediction_market_agent_tooling/tools/caches/db_cache.py,sha256=iHd_Qi4hMlzUIwT700i196A9ScaQCptKQPH1taQRGEQ,13859
73
73
  prediction_market_agent_tooling/tools/caches/inmemory_cache.py,sha256=tGHHd9HCiE_hCCtPtloHZQdDfBuiow9YsqJNYi2Tx_0,499
74
74
  prediction_market_agent_tooling/tools/contract.py,sha256=s3yo8IbXTcvAJcPfLM0_NbgaEsWwLsPmyVnOgyjq_xI,20919
75
75
  prediction_market_agent_tooling/tools/costs.py,sha256=EaAJ7v9laD4VEV3d8B44M4u3_oEO_H16jRVCdoZ93Uw,954
@@ -97,8 +97,8 @@ prediction_market_agent_tooling/tools/tavily/tavily_models.py,sha256=5ldQs1pZe6u
97
97
  prediction_market_agent_tooling/tools/tavily/tavily_search.py,sha256=Kw2mXNkMTYTEe1MBSTqhQmLoeXtgb6CkmHlcAJvhtqE,3809
98
98
  prediction_market_agent_tooling/tools/utils.py,sha256=W-9SqeCKd51BYMRhDjYPQ7lfNO_zE9EvYpmu2r5WXGA,7163
99
99
  prediction_market_agent_tooling/tools/web3_utils.py,sha256=44W8siSLNQxeib98bbwAe7V5C609NHNlUuxwuWIRDiY,11838
100
- prediction_market_agent_tooling-0.56.0.dev1860.dist-info/LICENSE,sha256=6or154nLLU6bELzjh0mCreFjt0m2v72zLi3yHE0QbeE,7650
101
- prediction_market_agent_tooling-0.56.0.dev1860.dist-info/METADATA,sha256=D5iUZsQ2RbKbhyVvKEtc9A40BfZTJaJWoEqjLreNF_Q,8114
102
- prediction_market_agent_tooling-0.56.0.dev1860.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
103
- prediction_market_agent_tooling-0.56.0.dev1860.dist-info/entry_points.txt,sha256=m8PukHbeH5g0IAAmOf_1Ahm-sGAMdhSSRQmwtpmi2s8,81
104
- prediction_market_agent_tooling-0.56.0.dev1860.dist-info/RECORD,,
100
+ prediction_market_agent_tooling-0.56.0.dev1862.dist-info/LICENSE,sha256=6or154nLLU6bELzjh0mCreFjt0m2v72zLi3yHE0QbeE,7650
101
+ prediction_market_agent_tooling-0.56.0.dev1862.dist-info/METADATA,sha256=eM3JPHeXi9I2L2TuLo7djynPRyeqhdaVNxCanLy5qTo,8114
102
+ prediction_market_agent_tooling-0.56.0.dev1862.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
103
+ prediction_market_agent_tooling-0.56.0.dev1862.dist-info/entry_points.txt,sha256=m8PukHbeH5g0IAAmOf_1Ahm-sGAMdhSSRQmwtpmi2s8,81
104
+ prediction_market_agent_tooling-0.56.0.dev1862.dist-info/RECORD,,