bitunix-automated-crypto-trading 2.6.1__py3-none-any.whl → 2.6.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.
- bitunix_automated_crypto_trading/AsyncThreadRunner.py +1 -1
- bitunix_automated_crypto_trading/BitunixApi.py +1 -1
- bitunix_automated_crypto_trading/BitunixSignal.py +5 -5
- bitunix_automated_crypto_trading/BitunixWebSocket.py +1 -1
- bitunix_automated_crypto_trading/NotificationManager.py +1 -1
- bitunix_automated_crypto_trading/ThreadManager.py +1 -1
- bitunix_automated_crypto_trading/TickerManager.py +1 -1
- bitunix_automated_crypto_trading/bitunix.py +4 -4
- {bitunix_automated_crypto_trading-2.6.1.dist-info → bitunix_automated_crypto_trading-2.6.2.dist-info}/METADATA +1 -1
- {bitunix_automated_crypto_trading-2.6.1.dist-info → bitunix_automated_crypto_trading-2.6.2.dist-info}/RECORD +13 -15
- bitunix_automated_crypto_trading/ResourceManager.py +0 -35
- bitunix_automated_crypto_trading/clearenv.py +0 -8
- {bitunix_automated_crypto_trading-2.6.1.dist-info → bitunix_automated_crypto_trading-2.6.2.dist-info}/WHEEL +0 -0
- {bitunix_automated_crypto_trading-2.6.1.dist-info → bitunix_automated_crypto_trading-2.6.2.dist-info}/entry_points.txt +0 -0
- {bitunix_automated_crypto_trading-2.6.1.dist-info → bitunix_automated_crypto_trading-2.6.2.dist-info}/top_level.txt +0 -0
@@ -8,11 +8,11 @@ import traceback
|
|
8
8
|
import time
|
9
9
|
import pytz
|
10
10
|
from concurrent.futures import ProcessPoolExecutor
|
11
|
-
from BitunixWebSocket import BitunixPrivateWebSocketClient, BitunixPublicWebSocketClient
|
12
|
-
from AsyncThreadRunner import AsyncThreadRunner
|
13
|
-
from TickerManager import Tickers, Ticker, Interval
|
14
|
-
from DataFrameHtmlRenderer import DataFrameHtmlRenderer
|
15
|
-
from logger import Logger, Colors
|
11
|
+
from .BitunixWebSocket import BitunixPrivateWebSocketClient, BitunixPublicWebSocketClient
|
12
|
+
from .AsyncThreadRunner import AsyncThreadRunner
|
13
|
+
from .TickerManager import Tickers, Ticker, Interval
|
14
|
+
from .DataFrameHtmlRenderer import DataFrameHtmlRenderer
|
15
|
+
from .logger import Logger, Colors
|
16
16
|
logger = Logger(__name__).get_logger()
|
17
17
|
colors = Colors()
|
18
18
|
import gc
|
@@ -7,10 +7,10 @@ import json
|
|
7
7
|
import time
|
8
8
|
from datetime import datetime
|
9
9
|
import pytz
|
10
|
-
from ThreadManager import ThreadManager
|
11
|
-
from BitunixApi import BitunixApi
|
12
|
-
from BitunixSignal import BitunixSignal
|
13
|
-
from NotificationManager import NotificationManager
|
10
|
+
from .ThreadManager import ThreadManager
|
11
|
+
from .BitunixApi import BitunixApi
|
12
|
+
from .BitunixSignal import BitunixSignal
|
13
|
+
from .NotificationManager import NotificationManager
|
14
14
|
|
15
15
|
from logger import Logger
|
16
16
|
logger = Logger(__name__).get_logger()
|
@@ -1,15 +1,13 @@
|
|
1
|
-
bitunix_automated_crypto_trading/AsyncThreadRunner.py,sha256=
|
2
|
-
bitunix_automated_crypto_trading/BitunixApi.py,sha256=
|
3
|
-
bitunix_automated_crypto_trading/BitunixSignal.py,sha256=
|
4
|
-
bitunix_automated_crypto_trading/BitunixWebSocket.py,sha256=
|
1
|
+
bitunix_automated_crypto_trading/AsyncThreadRunner.py,sha256=PrTxq0ZKk5otYyeZCod0L1GN0ykajOxaccr2Tzcwxlk,3224
|
2
|
+
bitunix_automated_crypto_trading/BitunixApi.py,sha256=XLpoWFEjrpGbpi9JKEjTlJo9fBHMiDr0HQWSVXEdiFY,11622
|
3
|
+
bitunix_automated_crypto_trading/BitunixSignal.py,sha256=79w2_4tHaWj6pRpwHWPcUc2mj1fnWLnJLKST1SmKaSQ,64186
|
4
|
+
bitunix_automated_crypto_trading/BitunixWebSocket.py,sha256=AUW_Qfw1lnNFfvYomEd3WUkkrzpFvfyNHnB7q33wsC0,11398
|
5
5
|
bitunix_automated_crypto_trading/DataFrameHtmlRenderer.py,sha256=KFo0BPC8J99XsCAjA4J0dZCo-YPe8eqY3QHMcPifEuY,2973
|
6
|
-
bitunix_automated_crypto_trading/NotificationManager.py,sha256=
|
7
|
-
bitunix_automated_crypto_trading/
|
8
|
-
bitunix_automated_crypto_trading/
|
9
|
-
bitunix_automated_crypto_trading/TickerManager.py,sha256=Y3WY2xIt_6orSKZ24Wsuyih2vmlkjtdoTggJGCm01k8,31889
|
6
|
+
bitunix_automated_crypto_trading/NotificationManager.py,sha256=tHwfL60h7qIVhNIDAqaTDFnIYTqCikROZBieCRGNK-0,819
|
7
|
+
bitunix_automated_crypto_trading/ThreadManager.py,sha256=nYbllySsmC4v0HdhMuPhfCywfxlfbUo5YJ-Di2o6w4Q,2399
|
8
|
+
bitunix_automated_crypto_trading/TickerManager.py,sha256=TxKrN67Ld9BKqsLxk56IeZHBhanMcK11dtzlDqbR8ro,31890
|
10
9
|
bitunix_automated_crypto_trading/__init__.py,sha256=1hzk6nX8NnUCr1tsq8oFq1qGCNhNwnwldWE75641Eew,78
|
11
|
-
bitunix_automated_crypto_trading/bitunix.py,sha256=
|
12
|
-
bitunix_automated_crypto_trading/clearenv.py,sha256=O8Fm4_WxcZ60B0HrZDAOEVyUdZbLwQOQcIzdRDjtd_I,182
|
10
|
+
bitunix_automated_crypto_trading/bitunix.py,sha256=PZumuTbJ6mCp1i4GlgQcdPHbGFXzatR_lz0Cxk8mD4w,25205
|
13
11
|
bitunix_automated_crypto_trading/config.py,sha256=-IkDB3QbvO1rfrC0gqpBCMQAmHrNtsTvYuzItwXMk3I,3650
|
14
12
|
bitunix_automated_crypto_trading/config.txt,sha256=XzVjYlv6iRMr7C5zEAaRvpvwk-U3pgFLnhk1hYJ5-UM,1269
|
15
13
|
bitunix_automated_crypto_trading/logger.py,sha256=2NL1l8zJTryFILo3AKIFH7MCpDDfsH20bunmUVBZj7E,3014
|
@@ -26,8 +24,8 @@ bitunix_automated_crypto_trading/templates/main.html,sha256=_OBclFmhhsjsdzqwqFA0
|
|
26
24
|
bitunix_automated_crypto_trading/templates/modal-chart.html,sha256=Y0OKMEqI2I1dciu0TVj19AsltNqOvm8hm1ScmDd3qCQ,1057
|
27
25
|
bitunix_automated_crypto_trading/templates/modal-config.html,sha256=zQwkOY6XJiYcdV8UaP19coyCUZfEINn8Nhu5FnJ7lm4,1332
|
28
26
|
bitunix_automated_crypto_trading/templates/modal-logs.html,sha256=TNM21tE2jMXpm5X3pAYT5ZX5XdWQWLlFEKofZUA1lVA,631
|
29
|
-
bitunix_automated_crypto_trading-2.6.
|
30
|
-
bitunix_automated_crypto_trading-2.6.
|
31
|
-
bitunix_automated_crypto_trading-2.6.
|
32
|
-
bitunix_automated_crypto_trading-2.6.
|
33
|
-
bitunix_automated_crypto_trading-2.6.
|
27
|
+
bitunix_automated_crypto_trading-2.6.2.dist-info/METADATA,sha256=RAbDk_pRifNNlMGOZSwun5K9KI7RXNLPg4cUGuQQQOc,1032
|
28
|
+
bitunix_automated_crypto_trading-2.6.2.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
29
|
+
bitunix_automated_crypto_trading-2.6.2.dist-info/entry_points.txt,sha256=UXREYHuSl2XYd_tOtLIq0zg3d1kX3lixX5SpN8yGBw4,82
|
30
|
+
bitunix_automated_crypto_trading-2.6.2.dist-info/top_level.txt,sha256=uyFzHUCOsp8elnG2Ovor6xXcf7dxRxY-C-Txiwix64Q,33
|
31
|
+
bitunix_automated_crypto_trading-2.6.2.dist-info/RECORD,,
|
@@ -1,35 +0,0 @@
|
|
1
|
-
import contextlib
|
2
|
-
import asyncio
|
3
|
-
from typing import AsyncGenerator
|
4
|
-
|
5
|
-
class ResourceManager:
|
6
|
-
@contextlib.asynccontextmanager
|
7
|
-
async def managed_resources(self):
|
8
|
-
resources = []
|
9
|
-
try:
|
10
|
-
yield resources
|
11
|
-
finally:
|
12
|
-
for resource in resources:
|
13
|
-
await self.cleanup_resource(resource)
|
14
|
-
|
15
|
-
async def cleanup_resource(self, resource):
|
16
|
-
# For objects with a `close()` method
|
17
|
-
if hasattr(resource, 'close'):
|
18
|
-
if asyncio.iscoroutinefunction(resource.close):
|
19
|
-
await resource.close()
|
20
|
-
else:
|
21
|
-
resource.close()
|
22
|
-
# For objects with a `cleanup()` method
|
23
|
-
elif hasattr(resource, 'cleanup'):
|
24
|
-
if asyncio.iscoroutinefunction(resource.cleanup):
|
25
|
-
await resource.cleanup()
|
26
|
-
else:
|
27
|
-
resource.cleanup()
|
28
|
-
# For asyncio Tasks
|
29
|
-
elif isinstance(resource, asyncio.Task):
|
30
|
-
if not resource.done():
|
31
|
-
resource.cancel()
|
32
|
-
try:
|
33
|
-
await resource
|
34
|
-
except asyncio.CancelledError:
|
35
|
-
pass
|
File without changes
|
File without changes
|
File without changes
|