crypticorn 2.13.1__py3-none-any.whl → 2.13.3__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.
- crypticorn/client.py +8 -9
- crypticorn/common/logging.py +2 -1
- {crypticorn-2.13.1.dist-info → crypticorn-2.13.3.dist-info}/METADATA +1 -1
- {crypticorn-2.13.1.dist-info → crypticorn-2.13.3.dist-info}/RECORD +8 -8
- {crypticorn-2.13.1.dist-info → crypticorn-2.13.3.dist-info}/WHEEL +0 -0
- {crypticorn-2.13.1.dist-info → crypticorn-2.13.3.dist-info}/entry_points.txt +0 -0
- {crypticorn-2.13.1.dist-info → crypticorn-2.13.3.dist-info}/licenses/LICENSE +0 -0
- {crypticorn-2.13.1.dist-info → crypticorn-2.13.3.dist-info}/top_level.txt +0 -0
crypticorn/client.py
CHANGED
@@ -34,11 +34,13 @@ class ApiClient:
|
|
34
34
|
self.version = version("crypticorn")
|
35
35
|
"""The version of the client."""
|
36
36
|
|
37
|
-
self._http_client = ClientSession(
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
)
|
37
|
+
# self._http_client = ClientSession(
|
38
|
+
# timeout=ClientTimeout(total=30.0),
|
39
|
+
# connector=TCPConnector(limit=100, limit_per_host=20),
|
40
|
+
# headers={"User-Agent": f"crypticorn/python/{self.version}"},
|
41
|
+
# )
|
42
|
+
self._http_client = None # temporary fix for the issue with the event loop
|
43
|
+
|
42
44
|
self._service_classes: dict[Service, type[SubClient]] = {
|
43
45
|
Service.HIVE: HiveClient,
|
44
46
|
Service.TRADE: TradeClient,
|
@@ -98,11 +100,8 @@ class ApiClient:
|
|
98
100
|
|
99
101
|
async def close(self):
|
100
102
|
for service in self._services.values():
|
101
|
-
if hasattr(service, "
|
102
|
-
service.base_client, "close"
|
103
|
-
):
|
103
|
+
if hasattr(service.base_client, "close"):
|
104
104
|
await service.base_client.close()
|
105
|
-
await self._http_client.close()
|
106
105
|
|
107
106
|
def _get_default_config(self, service, version=None):
|
108
107
|
if version is None:
|
crypticorn/common/logging.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
from __future__ import annotations
|
2
2
|
|
3
3
|
import logging
|
4
|
+
from logging.handlers import RotatingFileHandler
|
4
5
|
import sys
|
5
6
|
from crypticorn.common.mixins import ValidateEnumMixin
|
6
7
|
from crypticorn.common.ansi_colors import AnsiColors as C
|
@@ -109,7 +110,7 @@ def configure_logging(
|
|
109
110
|
# Configure file handler
|
110
111
|
if log_file:
|
111
112
|
os.makedirs(os.path.dirname(log_file), exist_ok=True)
|
112
|
-
file_handler =
|
113
|
+
file_handler = RotatingFileHandler(
|
113
114
|
log_file, maxBytes=10 * 1024 * 1024, backupCount=5
|
114
115
|
)
|
115
116
|
file_handler.setLevel(file_level)
|
@@ -1,5 +1,5 @@
|
|
1
1
|
crypticorn/__init__.py,sha256=ctrwe5CQtYhnetHYPgSmC0CIHa4xbDsLZvpY38tfEow,423
|
2
|
-
crypticorn/client.py,sha256
|
2
|
+
crypticorn/client.py,sha256=hIX_9RroQXQ_xW0t9H6XYjt7OI_sqX4kw4fRWJXlXos,5205
|
3
3
|
crypticorn/auth/__init__.py,sha256=JAl1tBLK9pYLr_-YKaj581c-c94PWLoqnatTIVAVvMM,81
|
4
4
|
crypticorn/auth/main.py,sha256=FHLsAbp2mXDlmcPmLKc29qaD1dBev65V3DNKLyfz4Tw,1012
|
5
5
|
crypticorn/auth/client/__init__.py,sha256=do16xS84uXvVoJuWERjb9RwlOaLy4UF4uKBZWczFC3c,5291
|
@@ -72,7 +72,7 @@ crypticorn/common/decorators.py,sha256=t5Y3vSJ-gt0n2vOYYjYN0dtzNXvZxrJs2SEItpzG8
|
|
72
72
|
crypticorn/common/enums.py,sha256=YE7ObydyWAKO8MOSQBwk9M1PzzaPvlnxc6Dbpu78QMk,787
|
73
73
|
crypticorn/common/errors.py,sha256=VZlZ_vA_9MhNhz8vURUiwHMoF9EjteqIYWHtSLLYRVM,30130
|
74
74
|
crypticorn/common/exceptions.py,sha256=4oT58wcL9zQuqYU8op_36uZ1Kzt7JRCccu-o_usgqtU,6392
|
75
|
-
crypticorn/common/logging.py,sha256=
|
75
|
+
crypticorn/common/logging.py,sha256=n-qaYreRNFVAFRUd91hzYoaTExNLysd9cgEXm-v6eJY,4440
|
76
76
|
crypticorn/common/middleware.py,sha256=O7XiXPimNYUhF9QTv6yFUTVlb91-SK-3CfTrWMNP6Ck,1011
|
77
77
|
crypticorn/common/mixins.py,sha256=l7XQrBISaee6fDZXy96k0HnQ18XYocjTUXlNpVxhaOY,2206
|
78
78
|
crypticorn/common/openapi.py,sha256=D8bCpCVVzYQptHrJ7SYOgCxI3R_d0cjW9KMOBq-x0xk,279
|
@@ -279,9 +279,9 @@ crypticorn/trade/client/models/strategy_update.py,sha256=f7UsKSlNardj5h6uqHYbacj
|
|
279
279
|
crypticorn/trade/client/models/tpsl.py,sha256=lLPVSvLETgLMFqH9wEBUTQXY6aaydMifEt47mYbfw-A,4111
|
280
280
|
crypticorn/trade/client/models/tpsl_create.py,sha256=nX4i2BGWv5rmu3SLgRngfvEMFOWa3CIy0G3fyoxI-e4,3351
|
281
281
|
crypticorn/trade/client/models/trading_action_type.py,sha256=BysUEOl85zs79EA2zOcDN1EExcpQdABaJ4Jz08_z8VU,857
|
282
|
-
crypticorn-2.13.
|
283
|
-
crypticorn-2.13.
|
284
|
-
crypticorn-2.13.
|
285
|
-
crypticorn-2.13.
|
286
|
-
crypticorn-2.13.
|
287
|
-
crypticorn-2.13.
|
282
|
+
crypticorn-2.13.3.dist-info/licenses/LICENSE,sha256=HonAVvzFXkP2C1d7D3ByIKPwjGH8NcHTAQvKH7uvOHQ,1856
|
283
|
+
crypticorn-2.13.3.dist-info/METADATA,sha256=HWNGC3-8kATSdH1WtkqFmm0aiGXU1QNR4F_6GrWQCfI,9490
|
284
|
+
crypticorn-2.13.3.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
|
285
|
+
crypticorn-2.13.3.dist-info/entry_points.txt,sha256=d_xHsGvUTebPveVUK0SrpDFQ5ZRSjlI7lNCc11sn2PM,59
|
286
|
+
crypticorn-2.13.3.dist-info/top_level.txt,sha256=EP3NY216qIBYfmvGl0L2Zc9ItP0DjGSkiYqd9xJwGcM,11
|
287
|
+
crypticorn-2.13.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|