luxorasap 0.2.20__py3-none-any.whl → 0.2.21__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.2.20"
16
+ __version__ = "0.2.21"
17
17
 
18
18
  # ─── Lazy loader ─────────────────────────────────────────────────
19
19
  def __getattr__(name: str) -> ModuleType:
@@ -145,17 +145,15 @@ class LuxorQuery:
145
145
 
146
146
 
147
147
  table_data = self.__load_table(table_name, index=index, index_name=index_name, dtypes_override=dtypes_override,
148
- auto_convert_mapped_types=auto_convert_mapped_types)
149
-
150
- if (table_data is not None) and drop_last_updated_columns:
151
- if "Last_Updated" in table_data.columns:
152
- return table_data.drop(columns=["Last_Updated"])
148
+ auto_convert_mapped_types=auto_convert_mapped_types,
149
+ drop_last_updated_columns=drop_last_updated_columns)
153
150
 
154
151
  return table_data
155
152
 
156
153
 
157
154
 
158
- def __load_table(self, table_name, index=False, index_name="index", dtypes_override={}, auto_convert_mapped_types=True):
155
+ def __load_table(self, table_name, index=False, index_name="index", dtypes_override={}, auto_convert_mapped_types=True,
156
+ drop_last_updated_columns=True):
159
157
  def __load_parquet(table_name):
160
158
  table_path = f"{self.blob_directory}/{table_name}.parquet"#self.tables_path/"parquet"/f"{table_name}.parquet"
161
159
 
@@ -236,8 +234,6 @@ class LuxorQuery:
236
234
 
237
235
  for col in table_columns.intersection(str_nan_format):
238
236
  table_data[col] = table_data[col].replace("<NA>", pd.NA).replace("nan", pd.NA).replace("", pd.NA)
239
-
240
-
241
237
 
242
238
  return table_data.copy(), table_path, update_time
243
239
 
@@ -277,13 +273,17 @@ class LuxorQuery:
277
273
  if table_data is None:
278
274
  logging.info(f"Nao foi possivel carregar a tabela <{table_name}>.")
279
275
  return table_data
280
-
276
+
281
277
  if index:
282
278
  try:
283
279
  table_data = table_data.set_index(index_name, drop=True)
284
280
 
285
281
  except Exception:
286
282
  logging.info(f"Nao foi possível setar a coluna {index_name} como index para a tabela {table_name}.")
283
+
284
+ if (table_data is not None) and drop_last_updated_columns:
285
+ if "Last_Updated" in table_data.columns:
286
+ table_data = table_data.drop(columns=["Last_Updated"])
287
287
 
288
288
  #table_data = self.__persist_column_formatting(table_data)
289
289
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: luxorasap
3
- Version: 0.2.20
3
+ Version: 0.2.21
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=5FsmXUAf4hYEHYCSIBmvoRVTfkwpkbygvvxhKox_voI,1356
1
+ luxorasap/__init__.py,sha256=VEpU4Fgcjz5AZimFlsd33UMoVjcfBlp3ZqrJlObPv2Q,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=DvhQn2h1PeATsp6hTgBiJyQ3CjkFECAf3t6-HYP36tc,159661
7
+ luxorasap/datareader/core.py,sha256=6FxiRcE02asWROSD5G2xJ4LPXitReou9-Bslxk3L9tk,159818
8
8
  luxorasap/ingest/__init__.py,sha256=gHkw8FU8TuRL5tfHkACxwsLHwLYX8SgX9xHkB8uTjww,831
9
9
  luxorasap/ingest/cloud/__init__.py,sha256=JYhrE6LG9mRTMdOreN9lfaLUNxqdB5S2vvM9dH1J4ak,8171
10
10
  luxorasap/ingest/legacy_local/dataloader.py,sha256=DF3CvojDAi0itVDZPsQbmpl5pqMTNwOOpxTz4Ju8mho,12419
@@ -17,8 +17,8 @@ luxorasap/utils/storage/blob.py,sha256=28bsUbEUjg_LapDZ4P3kWkxHDQGNXv_Jik49RfXbw
17
17
  luxorasap/utils/storage/change_tracker.py,sha256=HkeKc62UyD2BtP2gqafnJHZSBvYreH_7SQI1CYhn3Us,11709
18
18
  luxorasap/utils/tools/__init__.py,sha256=dvK7Z4xnNQAuEiObVN7qjeLWAvP49JeFn2Oq9GdgmXs,76
19
19
  luxorasap/utils/tools/excel.py,sha256=SfeTcbJWsWq3uKruwKSjJ4aWgMovITzlNXjP2bhdMjI,1246
20
- luxorasap-0.2.20.dist-info/METADATA,sha256=Nl7uGYfwT3O2rQKJitpAky1IwfF9SmMf4vldPDCA2cc,3804
21
- luxorasap-0.2.20.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
22
- luxorasap-0.2.20.dist-info/entry_points.txt,sha256=XFh-dOwUhlya9DmGvgookMI0ezyUJjcOvTIHDEYS44g,52
23
- luxorasap-0.2.20.dist-info/top_level.txt,sha256=9YOL6bUIpzY06XFBRkUW1e4rgB32Ds91fQPGwUEjxzU,10
24
- luxorasap-0.2.20.dist-info/RECORD,,
20
+ luxorasap-0.2.21.dist-info/METADATA,sha256=G_2myczEKjaSDPp5fD-rFRu-y0eeCQAo4lyWmg0UxXo,3804
21
+ luxorasap-0.2.21.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
22
+ luxorasap-0.2.21.dist-info/entry_points.txt,sha256=XFh-dOwUhlya9DmGvgookMI0ezyUJjcOvTIHDEYS44g,52
23
+ luxorasap-0.2.21.dist-info/top_level.txt,sha256=9YOL6bUIpzY06XFBRkUW1e4rgB32Ds91fQPGwUEjxzU,10
24
+ luxorasap-0.2.21.dist-info/RECORD,,