prediction-market-agent-tooling 0.56.2.dev136__py3-none-any.whl → 0.56.2.dev138__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.
- prediction_market_agent_tooling/tools/caches/db_cache.py +6 -4
- {prediction_market_agent_tooling-0.56.2.dev136.dist-info → prediction_market_agent_tooling-0.56.2.dev138.dist-info}/METADATA +1 -1
- {prediction_market_agent_tooling-0.56.2.dev136.dist-info → prediction_market_agent_tooling-0.56.2.dev138.dist-info}/RECORD +6 -6
- {prediction_market_agent_tooling-0.56.2.dev136.dist-info → prediction_market_agent_tooling-0.56.2.dev138.dist-info}/LICENSE +0 -0
- {prediction_market_agent_tooling-0.56.2.dev136.dist-info → prediction_market_agent_tooling-0.56.2.dev138.dist-info}/WHEEL +0 -0
- {prediction_market_agent_tooling-0.56.2.dev136.dist-info → prediction_market_agent_tooling-0.56.2.dev138.dist-info}/entry_points.txt +0 -0
@@ -15,7 +15,7 @@ from typing import (
|
|
15
15
|
)
|
16
16
|
|
17
17
|
from pydantic import BaseModel
|
18
|
-
from sqlalchemy import Column
|
18
|
+
from sqlalchemy import Column, Engine
|
19
19
|
from sqlalchemy.dialects.postgresql import JSONB
|
20
20
|
from sqlmodel import Field, Session, SQLModel, create_engine, desc, select
|
21
21
|
|
@@ -91,14 +91,16 @@ def db_cache(
|
|
91
91
|
return decorator
|
92
92
|
|
93
93
|
api_keys = api_keys if api_keys is not None else APIKeys()
|
94
|
-
|
95
|
-
|
94
|
+
|
95
|
+
def engine_initialiser() -> Engine:
|
96
|
+
return create_engine(
|
96
97
|
api_keys.sqlalchemy_db_url.get_secret_value(),
|
97
98
|
# Use custom json serializer and deserializer, because otherwise, for example `datetime` serialization would fail.
|
98
99
|
json_serializer=json_serializer,
|
99
100
|
json_deserializer=json_deserializer,
|
100
101
|
)
|
101
|
-
|
102
|
+
|
103
|
+
wrapped_engine = InitialiseNonPickable(engine_initialiser)
|
102
104
|
|
103
105
|
if api_keys.ENABLE_CACHE:
|
104
106
|
SQLModel.metadata.create_all(wrapped_engine.get_value())
|
@@ -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=
|
74
|
+
prediction_market_agent_tooling/tools/caches/db_cache.py,sha256=HZwE1OyQHGzkiaZw7iILR0ZCYg1Ox6l89z0odoE98U8,12909
|
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
|
@@ -100,8 +100,8 @@ prediction_market_agent_tooling/tools/tavily/tavily_models.py,sha256=5ldQs1pZe6u
|
|
100
100
|
prediction_market_agent_tooling/tools/tavily/tavily_search.py,sha256=Kw2mXNkMTYTEe1MBSTqhQmLoeXtgb6CkmHlcAJvhtqE,3809
|
101
101
|
prediction_market_agent_tooling/tools/utils.py,sha256=1VvunbTmzGzpIlRukFhArreFNxJPbsg4lLtQNk0r2bY,7185
|
102
102
|
prediction_market_agent_tooling/tools/web3_utils.py,sha256=44W8siSLNQxeib98bbwAe7V5C609NHNlUuxwuWIRDiY,11838
|
103
|
-
prediction_market_agent_tooling-0.56.2.
|
104
|
-
prediction_market_agent_tooling-0.56.2.
|
105
|
-
prediction_market_agent_tooling-0.56.2.
|
106
|
-
prediction_market_agent_tooling-0.56.2.
|
107
|
-
prediction_market_agent_tooling-0.56.2.
|
103
|
+
prediction_market_agent_tooling-0.56.2.dev138.dist-info/LICENSE,sha256=6or154nLLU6bELzjh0mCreFjt0m2v72zLi3yHE0QbeE,7650
|
104
|
+
prediction_market_agent_tooling-0.56.2.dev138.dist-info/METADATA,sha256=EYRdgTedX2ksvkU5D-qeG-vq11V59Eaj1MB5XHe81ok,8113
|
105
|
+
prediction_market_agent_tooling-0.56.2.dev138.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
106
|
+
prediction_market_agent_tooling-0.56.2.dev138.dist-info/entry_points.txt,sha256=m8PukHbeH5g0IAAmOf_1Ahm-sGAMdhSSRQmwtpmi2s8,81
|
107
|
+
prediction_market_agent_tooling-0.56.2.dev138.dist-info/RECORD,,
|
File without changes
|
File without changes
|