luxorasap 0.1.34__py3-none-any.whl → 0.1.36__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.
luxorasap/__init__.py CHANGED
@@ -13,7 +13,7 @@ from types import ModuleType
13
13
  try:
14
14
  __version__: str = metadata.version(__name__)
15
15
  except metadata.PackageNotFoundError: # editable install
16
- __version__ = "0.1.34"
16
+ __version__ = "0.1.36"
17
17
 
18
18
  # ─── Lazy loader ─────────────────────────────────────────────────
19
19
  def __getattr__(name: str) -> ModuleType:
@@ -183,9 +183,17 @@ class LuxorQuery:
183
183
  str_nan_format = str_nan_format.union(dtypes_override['str_nan_format'])
184
184
 
185
185
  if table_name != "last_all_flds":
186
- for col in table_columns.intersection(float_dtypes):
187
- table_data[col] = table_data[col].astype(float)
188
-
186
+ try:
187
+ for col in table_columns.intersection(float_dtypes):
188
+ table_data[col] = table_data[col].astype(float)
189
+ except :
190
+ logger.warning(f"Ao carregar tabela '{table_name}', nao foi possivel converter dados da coluna {col} para float.")
191
+ #logger.warning(f"Colunas com erro: {table_columns.intersection(float_dtypes)}")
192
+ #logger.warning(f"Colunas disponiveis: {table_columns}")
193
+ #print(table_data.dtypes)
194
+
195
+ raise ValueError(f"Erro ao converter colunas para float na tabela '{table_name}'.")
196
+
189
197
  if table_name == "hist_risk_metrics":
190
198
  try:
191
199
  cols_to_format = list(set(table_data.columns) - {"Date", "Fund"})
@@ -1,6 +1,8 @@
1
1
 
2
+ import platform
2
3
 
3
- import win32com.client
4
+ if platform.system() == "Windows":
5
+ import win32com.client
4
6
 
5
7
 
6
8
  def close_excel_worksheet(filename, save=True):
@@ -11,6 +13,11 @@ def close_excel_worksheet(filename, save=True):
11
13
  """
12
14
 
13
15
  try:
16
+
17
+ if platform.system() != "Windows":
18
+ print("Esta função só está disponível no Windows.")
19
+ return
20
+
14
21
  excel = win32com.client.Dispatch("Excel.Application")
15
22
  for wb in excel.Workbooks:
16
23
  if wb.Name.lower() == filename.lower(): # compara ignorando maiúsc/minúsc
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: luxorasap
3
- Version: 0.1.34
3
+ Version: 0.1.36
4
4
  Summary: Toolbox da Luxor para ingestão, análise e automação de dados financeiros.
5
5
  Author-email: Luxor Group <backoffice@luxor.com.br>
6
6
  License: Proprietary – All rights reserved
@@ -1,10 +1,10 @@
1
- luxorasap/__init__.py,sha256=KROi-RFOsCgIawsMJYwJrGqwYPhc3LnjOcMJKxxKTZs,1356
1
+ luxorasap/__init__.py,sha256=jUlL8MLFBkPCnG5FvYT8H_XGD0gDJy1PaVu9fa-e0cE,1356
2
2
  luxorasap/btgapi/__init__.py,sha256=QUlfb5oiBY6K1Q5x4-a-x2wECe1At5wc2962I5odOJk,620
3
3
  luxorasap/btgapi/auth.py,sha256=PvyCtbEyBO2B1CIeAlNXWugKW1OgiKfPcVzS6K5FBnQ,1872
4
4
  luxorasap/btgapi/reports.py,sha256=ZVEMLoJPXc0r3XjPJPMsKQN0zZd1Npd7umNpAj1bncs,8040
5
5
  luxorasap/btgapi/trades.py,sha256=956HZ9BvN9C_VQvKTyBLN0x6ZygwVqBZN11F7OnNbDI,5985
6
6
  luxorasap/datareader/__init__.py,sha256=41RAvbrQ4R6oj67S32CrKqolx0CJ2W8cbOF6g5Cqm2g,120
7
- luxorasap/datareader/core.py,sha256=aPFEu6Wk7wGRxlyBUmaAznp2KXxOduWy93nliFWdwN4,156151
7
+ luxorasap/datareader/core.py,sha256=DJoHBxhPDHA6-q-XEUI_mdNXWbFX6AZKNP59sPl4hSE,156725
8
8
  luxorasap/ingest/__init__.py,sha256=XhxDTN2ar-u6UCPhnxNU_to-nWiit-SpQ6cA_N9eMSs,795
9
9
  luxorasap/ingest/cloud/__init__.py,sha256=7yqEgeDxplkqYTzZNB0kfkSQ8PXF-77BXMW2DMYtJbU,2911
10
10
  luxorasap/ingest/legacy_local/dataloader.py,sha256=DF3CvojDAi0itVDZPsQbmpl5pqMTNwOOpxTz4Ju8mho,12419
@@ -15,9 +15,9 @@ luxorasap/utils/dataframe/transforms.py,sha256=OIvlTTcjFX6bUhuQp_syEp7ssm4sLzwvg
15
15
  luxorasap/utils/storage/__init__.py,sha256=U3XRq94yzRp3kgBSUcRzs2tQgJ4o8h8a1ZzwiscA5XM,67
16
16
  luxorasap/utils/storage/blob.py,sha256=0QnwrUP-9vWYK8ffa6NqE7rV_t6RdScRM8GQnMxY_4w,3184
17
17
  luxorasap/utils/tools/__init__.py,sha256=dvK7Z4xnNQAuEiObVN7qjeLWAvP49JeFn2Oq9GdgmXs,76
18
- luxorasap/utils/tools/excel.py,sha256=pLXDA9_PqqmZgUOr3KGjwaJx6qpx9LHNpRHMntnOyfA,1042
19
- luxorasap-0.1.34.dist-info/METADATA,sha256=KeKZBEbLe0vrj926cmfbJm2Ve05C7wBJRoY1WmXicJU,3804
20
- luxorasap-0.1.34.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
21
- luxorasap-0.1.34.dist-info/entry_points.txt,sha256=XFh-dOwUhlya9DmGvgookMI0ezyUJjcOvTIHDEYS44g,52
22
- luxorasap-0.1.34.dist-info/top_level.txt,sha256=9YOL6bUIpzY06XFBRkUW1e4rgB32Ds91fQPGwUEjxzU,10
23
- luxorasap-0.1.34.dist-info/RECORD,,
18
+ luxorasap/utils/tools/excel.py,sha256=SfeTcbJWsWq3uKruwKSjJ4aWgMovITzlNXjP2bhdMjI,1246
19
+ luxorasap-0.1.36.dist-info/METADATA,sha256=zxcRJsqEXutd68dbIn3nW3Sr_92sLWq5XVMWw5hARFw,3804
20
+ luxorasap-0.1.36.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
21
+ luxorasap-0.1.36.dist-info/entry_points.txt,sha256=XFh-dOwUhlya9DmGvgookMI0ezyUJjcOvTIHDEYS44g,52
22
+ luxorasap-0.1.36.dist-info/top_level.txt,sha256=9YOL6bUIpzY06XFBRkUW1e4rgB32Ds91fQPGwUEjxzU,10
23
+ luxorasap-0.1.36.dist-info/RECORD,,