laketower 0.2.0__py3-none-any.whl → 0.3.0__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.
Potentially problematic release.
This version of laketower might be problematic. Click here for more details.
- laketower/__about__.py +1 -1
- laketower/cli.py +0 -2
- laketower/tables.py +4 -6
- laketower/templates/_base.html +1 -1
- laketower/templates/tables/query.html +6 -0
- laketower/web.py +14 -7
- {laketower-0.2.0.dist-info → laketower-0.3.0.dist-info}/METADATA +2 -3
- {laketower-0.2.0.dist-info → laketower-0.3.0.dist-info}/RECORD +11 -11
- {laketower-0.2.0.dist-info → laketower-0.3.0.dist-info}/WHEEL +0 -0
- {laketower-0.2.0.dist-info → laketower-0.3.0.dist-info}/entry_points.txt +0 -0
- {laketower-0.2.0.dist-info → laketower-0.3.0.dist-info}/licenses/LICENSE.md +0 -0
laketower/__about__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.
|
|
1
|
+
__version__ = "0.3.0"
|
laketower/cli.py
CHANGED
laketower/tables.py
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
1
|
from datetime import datetime, timezone
|
|
4
|
-
from typing import Any,
|
|
2
|
+
from typing import Any, Protocol
|
|
5
3
|
|
|
6
4
|
import deltalake
|
|
7
5
|
import duckdb
|
|
@@ -20,8 +18,8 @@ DEFAULT_LIMIT = 10
|
|
|
20
18
|
|
|
21
19
|
class TableMetadata(pydantic.BaseModel):
|
|
22
20
|
table_format: TableFormats
|
|
23
|
-
name:
|
|
24
|
-
description:
|
|
21
|
+
name: str | None = None
|
|
22
|
+
description: str | None = None
|
|
25
23
|
uri: str
|
|
26
24
|
id: str
|
|
27
25
|
version: int
|
|
@@ -33,7 +31,7 @@ class TableMetadata(pydantic.BaseModel):
|
|
|
33
31
|
class TableRevision(pydantic.BaseModel):
|
|
34
32
|
version: int
|
|
35
33
|
timestamp: datetime
|
|
36
|
-
client_version:
|
|
34
|
+
client_version: str | None = None
|
|
37
35
|
operation: str
|
|
38
36
|
operation_parameters: dict[str, Any]
|
|
39
37
|
operation_metrics: dict[str, Any]
|
laketower/templates/_base.html
CHANGED
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
{% for table in tables %}
|
|
31
31
|
{% set table_url = '/tables/' + table.name %}
|
|
32
32
|
<li class="nav-item">
|
|
33
|
-
<a class="nav-link{% if request.url.path.startswith(table_url) %} active{% endif %}" href="{{ table_url }}" aria-current="page">
|
|
33
|
+
<a class="text-truncate nav-link{% if request.url.path.startswith(table_url) %} active{% endif %}" href="{{ table_url }}" aria-current="page">
|
|
34
34
|
<i class="bi-table" aria-hidden="true"></i>
|
|
35
35
|
{{ table.name }}
|
|
36
36
|
</a>
|
|
@@ -16,6 +16,11 @@
|
|
|
16
16
|
</div>
|
|
17
17
|
</form>
|
|
18
18
|
|
|
19
|
+
{% if error %}
|
|
20
|
+
<div class="alert alert-danger" role="alert">
|
|
21
|
+
{{ error.message }}
|
|
22
|
+
</div>
|
|
23
|
+
{% else %}
|
|
19
24
|
<div class="table-responsive">
|
|
20
25
|
<table class="table table-sm table-bordered table-striped table-hover">
|
|
21
26
|
<thead>
|
|
@@ -36,6 +41,7 @@
|
|
|
36
41
|
</tbody>
|
|
37
42
|
</table>
|
|
38
43
|
</div>
|
|
44
|
+
{% endif %}
|
|
39
45
|
</div>
|
|
40
46
|
</div>
|
|
41
47
|
{% endblock %}
|
laketower/web.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import urllib.parse
|
|
2
2
|
from pathlib import Path
|
|
3
|
-
from typing import Annotated
|
|
3
|
+
from typing import Annotated
|
|
4
4
|
|
|
5
5
|
import pydantic_settings
|
|
6
6
|
from fastapi import APIRouter, FastAPI, Query, Request
|
|
@@ -55,7 +55,13 @@ def get_tables_query(request: Request, sql: str) -> HTMLResponse:
|
|
|
55
55
|
table_config.name: load_table(table_config).dataset()
|
|
56
56
|
for table_config in config.tables
|
|
57
57
|
}
|
|
58
|
-
|
|
58
|
+
|
|
59
|
+
try:
|
|
60
|
+
results = execute_query(tables_dataset, sql)
|
|
61
|
+
error = None
|
|
62
|
+
except ValueError as e:
|
|
63
|
+
error = {"message": str(e)}
|
|
64
|
+
results = None
|
|
59
65
|
|
|
60
66
|
return templates.TemplateResponse(
|
|
61
67
|
request=request,
|
|
@@ -64,6 +70,7 @@ def get_tables_query(request: Request, sql: str) -> HTMLResponse:
|
|
|
64
70
|
"tables": config.tables,
|
|
65
71
|
"table_results": results,
|
|
66
72
|
"sql_query": sql,
|
|
73
|
+
"error": error,
|
|
67
74
|
},
|
|
68
75
|
)
|
|
69
76
|
|
|
@@ -111,11 +118,11 @@ def get_table_history(request: Request, table_id: str) -> HTMLResponse:
|
|
|
111
118
|
def get_table_view(
|
|
112
119
|
request: Request,
|
|
113
120
|
table_id: str,
|
|
114
|
-
limit:
|
|
115
|
-
cols: Annotated[
|
|
116
|
-
sort_asc:
|
|
117
|
-
sort_desc:
|
|
118
|
-
version:
|
|
121
|
+
limit: int | None = None,
|
|
122
|
+
cols: Annotated[list[str] | None, Query()] = None,
|
|
123
|
+
sort_asc: str | None = None,
|
|
124
|
+
sort_desc: str | None = None,
|
|
125
|
+
version: int | None = None,
|
|
119
126
|
) -> HTMLResponse:
|
|
120
127
|
config: Config = request.app.state.config
|
|
121
128
|
table_config = next(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: laketower
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: Oversee your lakehouse
|
|
5
5
|
Project-URL: Repository, https://github.com/datalpia/laketower
|
|
6
6
|
Project-URL: Issues, https://github.com/datalpia/laketower/issues
|
|
@@ -14,7 +14,6 @@ Classifier: Intended Audience :: Developers
|
|
|
14
14
|
Classifier: Intended Audience :: End Users/Desktop
|
|
15
15
|
Classifier: Intended Audience :: Information Technology
|
|
16
16
|
Classifier: Intended Audience :: Other Audience
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
18
17
|
Classifier: Programming Language :: Python :: 3.10
|
|
19
18
|
Classifier: Programming Language :: Python :: 3.11
|
|
20
19
|
Classifier: Programming Language :: Python :: 3.12
|
|
@@ -22,7 +21,7 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
22
21
|
Classifier: Topic :: Database
|
|
23
22
|
Classifier: Topic :: Software Development
|
|
24
23
|
Classifier: Topic :: Utilities
|
|
25
|
-
Requires-Python: <3.14,>=3.
|
|
24
|
+
Requires-Python: <3.14,>=3.10
|
|
26
25
|
Requires-Dist: deltalake
|
|
27
26
|
Requires-Dist: duckdb
|
|
28
27
|
Requires-Dist: fastapi
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
laketower/__about__.py,sha256=
|
|
1
|
+
laketower/__about__.py,sha256=VrXpHDu3erkzwl_WXrqINBm9xWkcyUy53IQOj042dOs,22
|
|
2
2
|
laketower/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
3
|
laketower/__main__.py,sha256=czKxJKG8OfncnxWmpaOWx7b1JBwFnZNQi7wKSTncB4M,108
|
|
4
|
-
laketower/cli.py,sha256=
|
|
4
|
+
laketower/cli.py,sha256=_2DM_TrrgZ4qOJhMz0f3g5sKrCwqMe0rIpzQTAwy4p8,8991
|
|
5
5
|
laketower/config.py,sha256=cJ7KKWd2Pv9T_MbpK7QxqD8PdPZ9I38i3-tofcU0KeI,1049
|
|
6
|
-
laketower/tables.py,sha256=
|
|
7
|
-
laketower/web.py,sha256=
|
|
6
|
+
laketower/tables.py,sha256=1hEkegorMPG-aZ69UbvWcL4QwOgGYe7DvMc1u-i5pUI,4192
|
|
7
|
+
laketower/web.py,sha256=YnwpjiqizmhkoXGBm8ylATwJniIpKTl6RJDB9YMAIz0,5035
|
|
8
8
|
laketower/static/.gitkeep,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
|
-
laketower/templates/_base.html,sha256=
|
|
9
|
+
laketower/templates/_base.html,sha256=i60vd7da_iKm4o9DulPWD1Io8dbljNYVf9hcEGHAegI,2927
|
|
10
10
|
laketower/templates/index.html,sha256=dLF2Og0qgzBkvGyVRidRNzTv0u4o97ifOx1jVeig8Kg,59
|
|
11
11
|
laketower/templates/tables/_macros.html,sha256=O-D57cTZDyWOCOQxzM1ZJkrSXdMJ7bhKy_znSsN8FX8,740
|
|
12
12
|
laketower/templates/tables/history.html,sha256=yAW0xw9_Uxp0QZYKje6qhcbpeznxI3fb740hfNyILZ8,1740
|
|
13
13
|
laketower/templates/tables/index.html,sha256=oY13l_p8qozlLONanLpga1WhEo4oTP92pRf9sBSuFZI,2394
|
|
14
|
-
laketower/templates/tables/query.html,sha256=
|
|
14
|
+
laketower/templates/tables/query.html,sha256=9NFWJDE50AE-P6BPRw9M4TTNqPCjysWsSRHhcw_sqvc,1206
|
|
15
15
|
laketower/templates/tables/view.html,sha256=sFCQlEzIODc-M6VuHIqGI5PnPkGPaYPg21WAzQg_af0,3860
|
|
16
|
-
laketower-0.
|
|
17
|
-
laketower-0.
|
|
18
|
-
laketower-0.
|
|
19
|
-
laketower-0.
|
|
20
|
-
laketower-0.
|
|
16
|
+
laketower-0.3.0.dist-info/METADATA,sha256=TcdpEndo5GaQWcFphFBj8oHN6zILFAMeQ9SkoXaWUCk,14963
|
|
17
|
+
laketower-0.3.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
18
|
+
laketower-0.3.0.dist-info/entry_points.txt,sha256=OL_4klopvyEzasJOFJ-sKu54lv24Jvomni32h1WVUjk,48
|
|
19
|
+
laketower-0.3.0.dist-info/licenses/LICENSE.md,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
|
|
20
|
+
laketower-0.3.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|