prediction-market-agent-tooling 0.56.1__py3-none-any.whl → 0.56.2__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.
@@ -53,7 +53,7 @@ class APIKeys(BaseSettings):
53
53
 
54
54
  SQLALCHEMY_DB_URL: t.Optional[SecretStr] = None
55
55
 
56
- ENABLE_CACHE: bool = True
56
+ ENABLE_CACHE: bool = False
57
57
  CACHE_DIR: str = "./.cache"
58
58
 
59
59
  @property
@@ -102,6 +102,7 @@ def db_cache(
102
102
  # Use custom json serializer and deserializer, because otherwise, for example `datetime` serialization would fail.
103
103
  json_serializer=json_serializer,
104
104
  json_deserializer=json_deserializer,
105
+ pool_size=1,
105
106
  )
106
107
 
107
108
  # Create table if it doesn't exist
@@ -195,7 +196,7 @@ def db_cache(
195
196
  )
196
197
 
197
198
  # If postgres access was specified, save it.
198
- if engine is not None and (cache_none or computed_result is not None):
199
+ if cache_none or computed_result is not None:
199
200
  cache_entry = FunctionCache(
200
201
  function_name=function_name,
201
202
  full_function_name=full_function_name,
@@ -209,6 +210,7 @@ def db_cache(
209
210
  session.add(cache_entry)
210
211
  session.commit()
211
212
 
213
+ engine.dispose()
212
214
  return computed_result
213
215
 
214
216
  return cast(FunctionT, wrapper)
@@ -25,9 +25,12 @@ class RelevantNewsCacheModel(SQLModel, table=True):
25
25
  class RelevantNewsResponseCache:
26
26
  def __init__(self, sqlalchemy_db_url: str | None = None):
27
27
  self.engine = create_engine(
28
- sqlalchemy_db_url
29
- if sqlalchemy_db_url
30
- else APIKeys().sqlalchemy_db_url.get_secret_value()
28
+ (
29
+ sqlalchemy_db_url
30
+ if sqlalchemy_db_url
31
+ else APIKeys().sqlalchemy_db_url.get_secret_value()
32
+ ),
33
+ pool_size=1,
31
34
  )
32
35
  self._initialize_db()
33
36
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: prediction-market-agent-tooling
3
- Version: 0.56.1
3
+ Version: 0.56.2
4
4
  Summary: Tools to benchmark, deploy and monitor prediction market agents.
5
5
  Author: Gnosis
6
6
  Requires-Python: >=3.10,<3.12
@@ -16,7 +16,7 @@ prediction_market_agent_tooling/benchmark/__init__.py,sha256=47DEQpj8HBSa-_TImW-
16
16
  prediction_market_agent_tooling/benchmark/agents.py,sha256=B1-uWdyeN4GGKMWGK_-CcAFJg1m9Y_XuaeIHPB29QR8,3971
17
17
  prediction_market_agent_tooling/benchmark/benchmark.py,sha256=MqTiaaJ3cYiOLUVR7OyImLWxcEya3Rl5JyFYW-K0lwM,17097
18
18
  prediction_market_agent_tooling/benchmark/utils.py,sha256=D0MfUkVZllmvcU0VOurk9tcKT7JTtwwOp-63zuCBVuc,2880
19
- prediction_market_agent_tooling/config.py,sha256=114f3V9abaok27p5jX3UVr5b5gRUiSxBIYn8Snid34I,6731
19
+ prediction_market_agent_tooling/config.py,sha256=6iB8A4byexiemUajIw2SzRDQ8E8w0catyg7aH_mHpsY,6732
20
20
  prediction_market_agent_tooling/deploy/agent.py,sha256=dpc94DUo8Gq1LdRdw6k78vm_47OeJIfomG9CRVpgzk0,22757
21
21
  prediction_market_agent_tooling/deploy/agent_example.py,sha256=dIIdZashExWk9tOdyDjw87AuUcGyM7jYxNChYrVK2dM,1001
22
22
  prediction_market_agent_tooling/deploy/betting_strategy.py,sha256=kMrIE3wMv_IB6nJd_1DmDXDkEZhsXFOgyTd7JZ0gqHI,13068
@@ -71,7 +71,7 @@ prediction_market_agent_tooling/tools/betting_strategies/market_moving.py,sha256
71
71
  prediction_market_agent_tooling/tools/betting_strategies/minimum_bet_to_win.py,sha256=-FUSuQQgjcWSSnoFxnlAyTeilY6raJABJVM2QKkFqAY,438
72
72
  prediction_market_agent_tooling/tools/betting_strategies/stretch_bet_between.py,sha256=THMXwFlskvzbjnX_OiYtDSzI8XVFyULWfP2525_9UGc,429
73
73
  prediction_market_agent_tooling/tools/betting_strategies/utils.py,sha256=kpIb-ci67Vc1Yqqaa-_S4OUkbhWSIYog4_Iwp69HU_k,97
74
- prediction_market_agent_tooling/tools/caches/db_cache.py,sha256=KOhwgd4wDiNifJBb3iXRMlxxp7j9l-eSFZvgQ5_Y7xg,12687
74
+ prediction_market_agent_tooling/tools/caches/db_cache.py,sha256=yQ5sbccFf75jdj71zmlbJ8z5u2cfQzSRgY4haFG43I0,12712
75
75
  prediction_market_agent_tooling/tools/caches/inmemory_cache.py,sha256=tGHHd9HCiE_hCCtPtloHZQdDfBuiow9YsqJNYi2Tx_0,499
76
76
  prediction_market_agent_tooling/tools/contract.py,sha256=s3yo8IbXTcvAJcPfLM0_NbgaEsWwLsPmyVnOgyjq_xI,20919
77
77
  prediction_market_agent_tooling/tools/costs.py,sha256=EaAJ7v9laD4VEV3d8B44M4u3_oEO_H16jRVCdoZ93Uw,954
@@ -91,7 +91,7 @@ prediction_market_agent_tooling/tools/omen/reality_accuracy.py,sha256=M1SF7iSW1g
91
91
  prediction_market_agent_tooling/tools/parallelism.py,sha256=6Gou0hbjtMZrYvxjTDFUDZuxmE2nqZVbb6hkg1hF82A,1022
92
92
  prediction_market_agent_tooling/tools/relevant_news_analysis/data_models.py,sha256=95l84aztFaxcRLLcRQ46yKJbIlOEuDAbIGLouyliDzA,1316
93
93
  prediction_market_agent_tooling/tools/relevant_news_analysis/relevant_news_analysis.py,sha256=CddJem7tk15NAudJDwmuL8znTycbR-YI8kTNtd3LzG8,5474
94
- prediction_market_agent_tooling/tools/relevant_news_analysis/relevant_news_cache.py,sha256=2yxtBIDyMT_6CsTpZyuIv_2dy2B9WgEOaTT1fSloBu0,3223
94
+ prediction_market_agent_tooling/tools/relevant_news_analysis/relevant_news_cache.py,sha256=Dcde74ZwoZuohhJ8gIO5GQkdAz1YrAKlvrM8CNgRqWw,3289
95
95
  prediction_market_agent_tooling/tools/safe.py,sha256=9vxGGLvSPnfy-sxUFDpBTe8omqpGXP7MzvGPp6bRxrU,5197
96
96
  prediction_market_agent_tooling/tools/singleton.py,sha256=CiIELUiI-OeS7U7eeHEt0rnVhtQGzwoUdAgn_7u_GBM,729
97
97
  prediction_market_agent_tooling/tools/streamlit_user_login.py,sha256=NXEqfjT9Lc9QtliwSGRASIz1opjQ7Btme43H4qJbzgE,3010
@@ -99,8 +99,8 @@ prediction_market_agent_tooling/tools/tavily/tavily_models.py,sha256=5ldQs1pZe6u
99
99
  prediction_market_agent_tooling/tools/tavily/tavily_search.py,sha256=Kw2mXNkMTYTEe1MBSTqhQmLoeXtgb6CkmHlcAJvhtqE,3809
100
100
  prediction_market_agent_tooling/tools/utils.py,sha256=1VvunbTmzGzpIlRukFhArreFNxJPbsg4lLtQNk0r2bY,7185
101
101
  prediction_market_agent_tooling/tools/web3_utils.py,sha256=44W8siSLNQxeib98bbwAe7V5C609NHNlUuxwuWIRDiY,11838
102
- prediction_market_agent_tooling-0.56.1.dist-info/LICENSE,sha256=6or154nLLU6bELzjh0mCreFjt0m2v72zLi3yHE0QbeE,7650
103
- prediction_market_agent_tooling-0.56.1.dist-info/METADATA,sha256=fGK0gWUcUB0hphd3qfYiurnr3dl549L6qQiYKgCpczM,8106
104
- prediction_market_agent_tooling-0.56.1.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
105
- prediction_market_agent_tooling-0.56.1.dist-info/entry_points.txt,sha256=m8PukHbeH5g0IAAmOf_1Ahm-sGAMdhSSRQmwtpmi2s8,81
106
- prediction_market_agent_tooling-0.56.1.dist-info/RECORD,,
102
+ prediction_market_agent_tooling-0.56.2.dist-info/LICENSE,sha256=6or154nLLU6bELzjh0mCreFjt0m2v72zLi3yHE0QbeE,7650
103
+ prediction_market_agent_tooling-0.56.2.dist-info/METADATA,sha256=Upxl16nrp-E3tJGL086SVp4Npo8OClGRVYiuy-2HI2c,8106
104
+ prediction_market_agent_tooling-0.56.2.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
105
+ prediction_market_agent_tooling-0.56.2.dist-info/entry_points.txt,sha256=m8PukHbeH5g0IAAmOf_1Ahm-sGAMdhSSRQmwtpmi2s8,81
106
+ prediction_market_agent_tooling-0.56.2.dist-info/RECORD,,