luxorasap 0.2.14__tar.gz → 0.2.15__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.
- {luxorasap-0.2.14 → luxorasap-0.2.15}/PKG-INFO +1 -1
- {luxorasap-0.2.14 → luxorasap-0.2.15}/pyproject.toml +2 -2
- {luxorasap-0.2.14 → luxorasap-0.2.15}/src/luxorasap/__init__.py +1 -1
- {luxorasap-0.2.14 → luxorasap-0.2.15}/src/luxorasap/ingest/cloud/__init__.py +14 -9
- {luxorasap-0.2.14 → luxorasap-0.2.15}/src/luxorasap.egg-info/PKG-INFO +1 -1
- {luxorasap-0.2.14 → luxorasap-0.2.15}/README.md +0 -0
- {luxorasap-0.2.14 → luxorasap-0.2.15}/setup.cfg +0 -0
- {luxorasap-0.2.14 → luxorasap-0.2.15}/src/luxorasap/btgapi/__init__.py +0 -0
- {luxorasap-0.2.14 → luxorasap-0.2.15}/src/luxorasap/btgapi/auth.py +0 -0
- {luxorasap-0.2.14 → luxorasap-0.2.15}/src/luxorasap/btgapi/reports.py +0 -0
- {luxorasap-0.2.14 → luxorasap-0.2.15}/src/luxorasap/btgapi/trades.py +0 -0
- {luxorasap-0.2.14 → luxorasap-0.2.15}/src/luxorasap/datareader/__init__.py +0 -0
- {luxorasap-0.2.14 → luxorasap-0.2.15}/src/luxorasap/datareader/core.py +0 -0
- {luxorasap-0.2.14 → luxorasap-0.2.15}/src/luxorasap/ingest/__init__.py +0 -0
- {luxorasap-0.2.14 → luxorasap-0.2.15}/src/luxorasap/ingest/legacy_local/dataloader.py +0 -0
- {luxorasap-0.2.14 → luxorasap-0.2.15}/src/luxorasap/utils/__init__.py +0 -0
- {luxorasap-0.2.14 → luxorasap-0.2.15}/src/luxorasap/utils/dataframe/__init__.py +0 -0
- {luxorasap-0.2.14 → luxorasap-0.2.15}/src/luxorasap/utils/dataframe/reader.py +0 -0
- {luxorasap-0.2.14 → luxorasap-0.2.15}/src/luxorasap/utils/dataframe/transforms.py +0 -0
- {luxorasap-0.2.14 → luxorasap-0.2.15}/src/luxorasap/utils/storage/__init__.py +0 -0
- {luxorasap-0.2.14 → luxorasap-0.2.15}/src/luxorasap/utils/storage/blob.py +0 -0
- {luxorasap-0.2.14 → luxorasap-0.2.15}/src/luxorasap/utils/storage/change_tracker.py +0 -0
- {luxorasap-0.2.14 → luxorasap-0.2.15}/src/luxorasap/utils/tools/__init__.py +0 -0
- {luxorasap-0.2.14 → luxorasap-0.2.15}/src/luxorasap/utils/tools/excel.py +0 -0
- {luxorasap-0.2.14 → luxorasap-0.2.15}/src/luxorasap.egg-info/SOURCES.txt +0 -0
- {luxorasap-0.2.14 → luxorasap-0.2.15}/src/luxorasap.egg-info/dependency_links.txt +0 -0
- {luxorasap-0.2.14 → luxorasap-0.2.15}/src/luxorasap.egg-info/entry_points.txt +0 -0
- {luxorasap-0.2.14 → luxorasap-0.2.15}/src/luxorasap.egg-info/requires.txt +0 -0
- {luxorasap-0.2.14 → luxorasap-0.2.15}/src/luxorasap.egg-info/top_level.txt +0 -0
- {luxorasap-0.2.14 → luxorasap-0.2.15}/tests/test_btgapi_auth.py +0 -0
- {luxorasap-0.2.14 → luxorasap-0.2.15}/tests/test_btgapi_reports.py +0 -0
- {luxorasap-0.2.14 → luxorasap-0.2.15}/tests/test_btgapi_trades.py +0 -0
- {luxorasap-0.2.14 → luxorasap-0.2.15}/tests/test_datareader.py +0 -0
- {luxorasap-0.2.14 → luxorasap-0.2.15}/tests/test_ingest_cloud.py +0 -0
- {luxorasap-0.2.14 → luxorasap-0.2.15}/tests/test_ingest_legacy_local.py +0 -0
- {luxorasap-0.2.14 → luxorasap-0.2.15}/tests/test_utils_change_tracker.py +0 -0
- {luxorasap-0.2.14 → luxorasap-0.2.15}/tests/test_utils_dataframe.py +0 -0
- {luxorasap-0.2.14 → luxorasap-0.2.15}/tests/test_utils_storage.py +0 -0
- {luxorasap-0.2.14 → luxorasap-0.2.15}/tests/tests_utils_pickle_excel.py +0 -0
|
@@ -10,7 +10,7 @@ build-backend = "setuptools.build_meta"
|
|
|
10
10
|
#############################
|
|
11
11
|
[project]
|
|
12
12
|
name = "luxorasap"
|
|
13
|
-
version = "0.2.
|
|
13
|
+
version = "0.2.15"
|
|
14
14
|
description = "Toolbox da Luxor para ingestão, análise e automação de dados financeiros."
|
|
15
15
|
readme = "README.md"
|
|
16
16
|
requires-python = ">=3.9"
|
|
@@ -78,7 +78,7 @@ exclude = ["tests*"]
|
|
|
78
78
|
# bumpver (sem-ver)
|
|
79
79
|
#############################
|
|
80
80
|
[tool.bumpver]
|
|
81
|
-
current_version = "0.2.
|
|
81
|
+
current_version = "0.2.15"
|
|
82
82
|
version_pattern = "MAJOR.MINOR.PATCH"
|
|
83
83
|
|
|
84
84
|
# regex explícito – obrigatório no bumpver 2024+
|
|
@@ -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.
|
|
16
|
+
__version__ = "0.2.15"
|
|
17
17
|
|
|
18
18
|
# ─── Lazy loader ─────────────────────────────────────────────────
|
|
19
19
|
def __getattr__(name: str) -> ModuleType:
|
|
@@ -14,8 +14,6 @@ from luxorasap.utils.storage import BlobChangeWatcher
|
|
|
14
14
|
__all__ = ["save_table", "incremental_load"]
|
|
15
15
|
|
|
16
16
|
_client = BlobParquetClient() # instância única para o módulo
|
|
17
|
-
_client_excel = None
|
|
18
|
-
_client_pickle = None
|
|
19
17
|
|
|
20
18
|
|
|
21
19
|
# ────────────────────────────────────────────────────────────────
|
|
@@ -30,7 +28,17 @@ def save_table(
|
|
|
30
28
|
override=False,
|
|
31
29
|
format='parquet'
|
|
32
30
|
):
|
|
33
|
-
"""Salva DataFrame como Parquet
|
|
31
|
+
"""Salva DataFrame como arquivo Parquet no ADLS.
|
|
32
|
+
Args:
|
|
33
|
+
table_name (str): Nome da tabela (será o nome do arquivo).
|
|
34
|
+
df (pd.DataFrame): DataFrame a ser salvo.
|
|
35
|
+
index (bool, optional): Se True, salva o índice do DataFrame. Defaults to False.
|
|
36
|
+
index_name (str, optional): Nome da coluna de índice, se `index` for True. Defaults to "index".
|
|
37
|
+
normalize_columns (bool, optional): Se True, normaliza nomes de colunas. Defaults to True.
|
|
38
|
+
directory (str, optional): Subdiretório no container 'luxorasap'. Defaults to "enriched/parquet".
|
|
39
|
+
override (bool, optional): Se True, sobrescreve a tabela existente. Defaults to False.
|
|
40
|
+
format (str): Formato de saída ('parquet', 'excel', 'excel_multiple_sheets', 'pickle'). Defaults to 'parquet'.
|
|
41
|
+
"""
|
|
34
42
|
|
|
35
43
|
if 'Last_Updated' not in df.columns:
|
|
36
44
|
df['Last_Updated'] = dt.datetime.now()
|
|
@@ -54,17 +62,14 @@ def save_table(
|
|
|
54
62
|
_client.write_df(df, f"{directory}/{table_name}.parquet")
|
|
55
63
|
|
|
56
64
|
elif format == 'excel':
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
_client_excel = BlobExcelClient()
|
|
65
|
+
|
|
66
|
+
_client_excel = BlobExcelClient()
|
|
60
67
|
if index:
|
|
61
68
|
df = df.reset_index().rename(columns={"index": index_name})
|
|
62
69
|
_client_excel.write_excel(df, f"{directory}/{table_name}.xlsx")
|
|
63
70
|
|
|
64
71
|
elif format == 'excel_multiple_sheets':
|
|
65
|
-
|
|
66
|
-
if _client_excel is None:
|
|
67
|
-
_client_excel = BlobExcelClient()
|
|
72
|
+
_client_excel = BlobExcelClient()
|
|
68
73
|
# df neste caso é um dicionário de DataFrames
|
|
69
74
|
_client_excel.write_excel_multiple_sheets(df, f"{directory}/{table_name}.xlsx")
|
|
70
75
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|