minting 2.2.1__tar.gz → 2.2.3__tar.gz
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.
- {minting-2.2.1 → minting-2.2.3}/Minting/__init__.py +1 -1
- {minting-2.2.1 → minting-2.2.3}/Minting/client.py +14 -17
- {minting-2.2.1 → minting-2.2.3}/PKG-INFO +1 -1
- {minting-2.2.1 → minting-2.2.3}/minting.egg-info/PKG-INFO +1 -1
- {minting-2.2.1 → minting-2.2.3}/setup.py +1 -1
- {minting-2.2.1 → minting-2.2.3}/minting.egg-info/SOURCES.txt +0 -0
- {minting-2.2.1 → minting-2.2.3}/minting.egg-info/dependency_links.txt +0 -0
- {minting-2.2.1 → minting-2.2.3}/minting.egg-info/requires.txt +0 -0
- {minting-2.2.1 → minting-2.2.3}/minting.egg-info/top_level.txt +0 -0
- {minting-2.2.1 → minting-2.2.3}/setup.cfg +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
|
|
2
|
+
# updated code for client
|
|
2
3
|
import requests
|
|
3
4
|
import pandas as pd
|
|
4
5
|
import io
|
|
@@ -204,7 +205,7 @@ class Client:
|
|
|
204
205
|
self,
|
|
205
206
|
access_token=None, # new kw
|
|
206
207
|
token=None, # old kw / positional
|
|
207
|
-
base_url="http://
|
|
208
|
+
base_url="http://34.70.223.89:8000/predict",
|
|
208
209
|
mongo_uri="mongodb+srv://ankitarrow:ankitarrow@cluster0.zcajdur.mongodb.net/?retryWrites=true&w=majority&appName=Cluster0",
|
|
209
210
|
db_name="test"
|
|
210
211
|
):
|
|
@@ -321,10 +322,19 @@ class Client:
|
|
|
321
322
|
cells = [f"{str(val):<{width}}" for val, width in zip(row, col_widths)]
|
|
322
323
|
return spacing.join(cells)
|
|
323
324
|
|
|
324
|
-
|
|
325
|
+
total_width = sum(col_widths) + len(spacing) * (len(headers) - 1)
|
|
326
|
+
divider = "=" * total_width
|
|
327
|
+
|
|
328
|
+
rows_lines = []
|
|
329
|
+
for idx, row in enumerate(values):
|
|
330
|
+
row_line = format_row(row)
|
|
331
|
+
rows_lines.append(row_line)
|
|
332
|
+
next_ticker = values[idx + 1][0] if idx + 1 < len(values) else None
|
|
333
|
+
if next_ticker != row[0]:
|
|
334
|
+
rows_lines.append("-" * total_width)
|
|
325
335
|
|
|
326
336
|
lines = [divider, Fore.CYAN + format_row(headers) + Fore.RESET, divider]
|
|
327
|
-
lines.extend(
|
|
337
|
+
lines.extend(rows_lines)
|
|
328
338
|
lines.append(divider)
|
|
329
339
|
return "\n".join(lines)
|
|
330
340
|
|
|
@@ -440,17 +450,4 @@ class Client:
|
|
|
440
450
|
return credits
|
|
441
451
|
|
|
442
452
|
|
|
443
|
-
# -------------- local test --------------
|
|
444
|
-
# if __name__ == "__main__":
|
|
445
|
-
# client = Client(
|
|
446
|
-
# access_token="sk_live_3c32fb0f47e4800b45eb88dbc97bf8644b1b17f9ebbb219408a7eec3a6998080"
|
|
447
|
-
# )
|
|
448
|
-
|
|
449
|
-
# result = client.get_prediction(
|
|
450
|
-
# tickers=[ "TCS",
|
|
451
|
-
# "HDFCBANK"
|
|
452
|
-
# ],
|
|
453
|
-
# time_frame="5 minutes",
|
|
454
|
-
# parameters=["close"],
|
|
455
|
-
# candle="1m"
|
|
456
|
-
# )
|
|
453
|
+
# -------------- local test --------------
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|