meerschaum 2.9.0rc3__py3-none-any.whl → 2.9.2__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.
- meerschaum/_internal/shell/Shell.py +79 -30
- meerschaum/api/dash/callbacks/__init__.py +5 -2
- meerschaum/api/dash/callbacks/custom.py +17 -25
- meerschaum/api/dash/callbacks/dashboard.py +5 -21
- meerschaum/api/dash/callbacks/settings/__init__.py +8 -0
- meerschaum/api/dash/callbacks/settings/password_reset.py +76 -0
- meerschaum/api/dash/components.py +110 -7
- meerschaum/api/dash/pages/__init__.py +1 -0
- meerschaum/api/dash/pages/pipes.py +9 -6
- meerschaum/api/dash/pages/settings/__init__.py +8 -0
- meerschaum/api/dash/pages/settings/password_reset.py +63 -0
- meerschaum/api/resources/static/css/dash.css +7 -0
- meerschaum/api/resources/templates/termpage.html +2 -0
- meerschaum/api/routes/_pipes.py +52 -37
- meerschaum/config/_version.py +1 -1
- meerschaum/connectors/__init__.py +1 -0
- meerschaum/connectors/api/_pipes.py +79 -30
- meerschaum/connectors/sql/_pipes.py +38 -5
- meerschaum/connectors/valkey/_pipes.py +1 -0
- meerschaum/core/Pipe/_data.py +10 -1
- meerschaum/core/Pipe/_verify.py +1 -0
- meerschaum/plugins/__init__.py +26 -4
- meerschaum/utils/dataframe.py +8 -1
- meerschaum/utils/dtypes/__init__.py +14 -13
- meerschaum/utils/misc.py +34 -1
- meerschaum/utils/packages/_packages.py +0 -1
- meerschaum/utils/sql.py +42 -4
- {meerschaum-2.9.0rc3.dist-info → meerschaum-2.9.2.dist-info}/METADATA +3 -4
- {meerschaum-2.9.0rc3.dist-info → meerschaum-2.9.2.dist-info}/RECORD +35 -36
- {meerschaum-2.9.0rc3.dist-info → meerschaum-2.9.2.dist-info}/WHEEL +1 -1
- meerschaum/_internal/gui/__init__.py +0 -43
- meerschaum/_internal/gui/app/__init__.py +0 -50
- meerschaum/_internal/gui/app/_windows.py +0 -74
- meerschaum/_internal/gui/app/actions.py +0 -30
- meerschaum/_internal/gui/app/pipes.py +0 -47
- {meerschaum-2.9.0rc3.dist-info → meerschaum-2.9.2.dist-info}/entry_points.txt +0 -0
- {meerschaum-2.9.0rc3.dist-info → meerschaum-2.9.2.dist-info/licenses}/LICENSE +0 -0
- {meerschaum-2.9.0rc3.dist-info → meerschaum-2.9.2.dist-info/licenses}/NOTICE +0 -0
- {meerschaum-2.9.0rc3.dist-info → meerschaum-2.9.2.dist-info}/top_level.txt +0 -0
- {meerschaum-2.9.0rc3.dist-info → meerschaum-2.9.2.dist-info}/zip-safe +0 -0
@@ -542,7 +542,7 @@ def serialize_geometry(
|
|
542
542
|
geom: Any,
|
543
543
|
geometry_format: str = 'wkb_hex',
|
544
544
|
as_wkt: bool = False,
|
545
|
-
) -> Union[str, Dict[str, Any]]:
|
545
|
+
) -> Union[str, Dict[str, Any], None]:
|
546
546
|
"""
|
547
547
|
Serialize geometry data as a hex-encoded well-known-binary string.
|
548
548
|
|
@@ -560,6 +560,8 @@ def serialize_geometry(
|
|
560
560
|
-------
|
561
561
|
A string containing the geometry data.
|
562
562
|
"""
|
563
|
+
if value_is_null(geom):
|
564
|
+
return None
|
563
565
|
shapely = mrsm.attempt_import('shapely', lazy=False)
|
564
566
|
if geometry_format == 'geojson':
|
565
567
|
geojson_str = shapely.to_geojson(geom)
|
@@ -579,7 +581,7 @@ def deserialize_geometry(geom_wkb: Union[str, bytes]):
|
|
579
581
|
return shapely.wkb.loads(geom_wkb)
|
580
582
|
|
581
583
|
|
582
|
-
def deserialize_bytes_string(data: str
|
584
|
+
def deserialize_bytes_string(data: Optional[str], force_hex: bool = False) -> Union[bytes, None]:
|
583
585
|
"""
|
584
586
|
Given a serialized ASCII string of bytes data, return the original bytes.
|
585
587
|
The input data may either be base64- or hex-encoded.
|
@@ -745,19 +747,18 @@ def get_geometry_type_srid(
|
|
745
747
|
if not modifier:
|
746
748
|
return default_type, default_srid
|
747
749
|
|
748
|
-
|
749
|
-
|
750
|
-
|
751
|
-
|
752
|
-
}
|
753
|
-
|
754
|
-
parts = [part.lower().replace('srid=', '').replace('type=', '').strip() for part in modifier.split(',')]
|
750
|
+
parts = [
|
751
|
+
part.split('=')[-1].strip()
|
752
|
+
for part in modifier.split(',')
|
753
|
+
]
|
755
754
|
parts_casted = [
|
756
755
|
(
|
757
756
|
int(part)
|
758
757
|
if is_int(part)
|
759
758
|
else part
|
760
|
-
)
|
759
|
+
)
|
760
|
+
for part in parts
|
761
|
+
]
|
761
762
|
|
762
763
|
srid = default_srid
|
763
764
|
geometry_type = default_type
|
@@ -767,9 +768,9 @@ def get_geometry_type_srid(
|
|
767
768
|
srid = part
|
768
769
|
break
|
769
770
|
|
770
|
-
for part in
|
771
|
-
if part
|
772
|
-
geometry_type =
|
771
|
+
for part in parts_casted:
|
772
|
+
if isinstance(part, str):
|
773
|
+
geometry_type = part
|
773
774
|
break
|
774
775
|
|
775
776
|
return geometry_type, srid
|
meerschaum/utils/misc.py
CHANGED
@@ -175,7 +175,7 @@ def string_to_dict(
|
|
175
175
|
import ast
|
176
176
|
params_dict = {}
|
177
177
|
for param in params_string.split(","):
|
178
|
-
_keys = param.split(":")
|
178
|
+
_keys = param.split(":", maxsplit=1)
|
179
179
|
keys = _keys[:-1]
|
180
180
|
try:
|
181
181
|
val = ast.literal_eval(_keys[-1])
|
@@ -1355,6 +1355,39 @@ def truncate_string_sections(item: str, delimeter: str = '_', max_len: int = 128
|
|
1355
1355
|
return delimeter.join([s for i, s in new_sections])
|
1356
1356
|
|
1357
1357
|
|
1358
|
+
def truncate_text_for_display(
|
1359
|
+
text: str,
|
1360
|
+
max_length: int = 50,
|
1361
|
+
suffix: str = '…',
|
1362
|
+
) -> str:
|
1363
|
+
"""
|
1364
|
+
Truncate a potentially long string for display purposes.
|
1365
|
+
|
1366
|
+
Parameters
|
1367
|
+
----------
|
1368
|
+
text: str
|
1369
|
+
The string to be truncated.
|
1370
|
+
|
1371
|
+
max_length: int, default 60
|
1372
|
+
The maximum length of `text` before truncation.
|
1373
|
+
|
1374
|
+
suffix: str, default '…'
|
1375
|
+
The string to append to the length of `text` to indicate truncation.
|
1376
|
+
|
1377
|
+
Returns
|
1378
|
+
-------
|
1379
|
+
A string of length `max_length` or less.
|
1380
|
+
"""
|
1381
|
+
text_length = len(text)
|
1382
|
+
if text_length <= max_length:
|
1383
|
+
return text
|
1384
|
+
|
1385
|
+
suffix_length = len(suffix)
|
1386
|
+
|
1387
|
+
truncated_text = text[:max_length - suffix_length]
|
1388
|
+
return truncated_text + suffix
|
1389
|
+
|
1390
|
+
|
1358
1391
|
def separate_negation_values(
|
1359
1392
|
vals: Union[List[str], Tuple[str]],
|
1360
1393
|
negation_prefix: Optional[str] = None,
|
meerschaum/utils/sql.py
CHANGED
@@ -975,12 +975,12 @@ def build_where(
|
|
975
975
|
negation_prefix = STATIC_CONFIG['system']['fetch_pipes_keys']['negation_prefix']
|
976
976
|
try:
|
977
977
|
params_json = json.dumps(params)
|
978
|
-
except Exception
|
978
|
+
except Exception:
|
979
979
|
params_json = str(params)
|
980
980
|
bad_words = ['drop ', '--', ';']
|
981
981
|
for word in bad_words:
|
982
982
|
if word in params_json.lower():
|
983
|
-
warn(
|
983
|
+
warn("Aborting build_where() due to possible SQL injection.")
|
984
984
|
return ''
|
985
985
|
|
986
986
|
query_flavor = getattr(connector, 'flavor', flavor) if connector is not None else flavor
|
@@ -2539,9 +2539,10 @@ def get_postgis_geo_columns_types(
|
|
2539
2539
|
debug: bool = False,
|
2540
2540
|
) -> Dict[str, str]:
|
2541
2541
|
"""
|
2542
|
-
Return
|
2542
|
+
Return a dictionary mapping PostGIS geometry column names to geometry types.
|
2543
2543
|
"""
|
2544
2544
|
from meerschaum.utils.dtypes import get_geometry_type_srid
|
2545
|
+
sqlalchemy = mrsm.attempt_import('sqlalchemy', lazy=False)
|
2545
2546
|
default_type, default_srid = get_geometry_type_srid()
|
2546
2547
|
default_type = default_type.upper()
|
2547
2548
|
|
@@ -2550,7 +2551,7 @@ def get_postgis_geo_columns_types(
|
|
2550
2551
|
schema = schema or 'public'
|
2551
2552
|
truncated_schema_name = truncate_item_name(schema, flavor='postgis')
|
2552
2553
|
truncated_table_name = truncate_item_name(table, flavor='postgis')
|
2553
|
-
query = (
|
2554
|
+
query = sqlalchemy.text(
|
2554
2555
|
"SELECT \"f_geometry_column\" AS \"column\", 'GEOMETRY' AS \"func\", \"type\", \"srid\"\n"
|
2555
2556
|
"FROM \"geometry_columns\"\n"
|
2556
2557
|
f"WHERE \"f_table_schema\" = '{truncated_schema_name}'\n"
|
@@ -2587,3 +2588,40 @@ def get_postgis_geo_columns_types(
|
|
2587
2588
|
for col, (func, typ, srid) in cols_type_tuples.items()
|
2588
2589
|
}
|
2589
2590
|
return geometry_cols_types
|
2591
|
+
|
2592
|
+
|
2593
|
+
def get_create_schema_if_not_exists_queries(
|
2594
|
+
schema: str,
|
2595
|
+
flavor: str,
|
2596
|
+
) -> List[str]:
|
2597
|
+
"""
|
2598
|
+
Return the queries to create a schema if it does not yet exist.
|
2599
|
+
For databases which do not support schemas, an empty list will be returned.
|
2600
|
+
"""
|
2601
|
+
if not schema:
|
2602
|
+
return []
|
2603
|
+
|
2604
|
+
if flavor in NO_SCHEMA_FLAVORS:
|
2605
|
+
return []
|
2606
|
+
|
2607
|
+
if schema == DEFAULT_SCHEMA_FLAVORS.get(flavor, None):
|
2608
|
+
return []
|
2609
|
+
|
2610
|
+
clean(schema)
|
2611
|
+
|
2612
|
+
if flavor == 'mssql':
|
2613
|
+
return [
|
2614
|
+
(
|
2615
|
+
f"IF NOT EXISTS (SELECT * FROM sys.schemas WHERE name = '{schema}')\n"
|
2616
|
+
"BEGIN\n"
|
2617
|
+
f" EXEC('CREATE SCHEMA {sql_item_name(schema, flavor)}');\n"
|
2618
|
+
"END;"
|
2619
|
+
)
|
2620
|
+
]
|
2621
|
+
|
2622
|
+
if flavor == 'oracle':
|
2623
|
+
return []
|
2624
|
+
|
2625
|
+
return [
|
2626
|
+
f"CREATE SCHEMA IF NOT EXISTS {sql_item_name(schema, flavor)};"
|
2627
|
+
]
|
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.4
|
2
2
|
Name: meerschaum
|
3
|
-
Version: 2.9.
|
3
|
+
Version: 2.9.2
|
4
4
|
Summary: Sync Time-Series Pipes with Meerschaum
|
5
5
|
Home-page: https://meerschaum.io
|
6
6
|
Author: Bennett Meares
|
@@ -118,7 +118,6 @@ Requires-Dist: mkdocs-linkcheck>=1.0.6; extra == "docs"
|
|
118
118
|
Requires-Dist: mkdocs-redirects>=1.0.4; extra == "docs"
|
119
119
|
Requires-Dist: jinja2==3.0.3; extra == "docs"
|
120
120
|
Provides-Extra: gui
|
121
|
-
Requires-Dist: toga>=0.3.0-dev29; extra == "gui"
|
122
121
|
Requires-Dist: pywebview>=3.6.3; extra == "gui"
|
123
122
|
Requires-Dist: pycparser>=2.21.0; extra == "gui"
|
124
123
|
Provides-Extra: extras
|
@@ -301,7 +300,6 @@ Requires-Dist: duckdb-engine>=0.13.0; extra == "full"
|
|
301
300
|
Requires-Dist: pyproj>=3.7.1; extra == "full"
|
302
301
|
Requires-Dist: geopandas>=1.0.1; extra == "full"
|
303
302
|
Requires-Dist: shapely>=2.0.7; extra == "full"
|
304
|
-
Requires-Dist: toga>=0.3.0-dev29; extra == "full"
|
305
303
|
Requires-Dist: pywebview>=3.6.3; extra == "full"
|
306
304
|
Requires-Dist: pycparser>=2.21.0; extra == "full"
|
307
305
|
Requires-Dist: numpy>=1.18.5; extra == "full"
|
@@ -341,6 +339,7 @@ Dynamic: description
|
|
341
339
|
Dynamic: description-content-type
|
342
340
|
Dynamic: home-page
|
343
341
|
Dynamic: license
|
342
|
+
Dynamic: license-file
|
344
343
|
Dynamic: maintainer-email
|
345
344
|
Dynamic: project-url
|
346
345
|
Dynamic: provides-extra
|
@@ -7,12 +7,7 @@ meerschaum/_internal/arguments/_parse_arguments.py,sha256=TtHX7NvdHLD-nVVlMctc6S
|
|
7
7
|
meerschaum/_internal/arguments/_parser.py,sha256=9AfOJ4Kc37y2gLeRabU3cDwF4RRnW-3nGKfN2l0P3rQ,17163
|
8
8
|
meerschaum/_internal/docs/__init__.py,sha256=ZQYHWo6n0kfLLkyG36YXqTYvv2Pc7it5HZHMylT6cBA,126
|
9
9
|
meerschaum/_internal/docs/index.py,sha256=ZkqXj-GhoLEpgMysy4ugvOlFhWVlnq7tFvzMhy43jUQ,24670
|
10
|
-
meerschaum/_internal/
|
11
|
-
meerschaum/_internal/gui/app/__init__.py,sha256=rKUa8hHk6Fai-PDF61tQcpT1myxKcfmvEMDHxThNp7o,1565
|
12
|
-
meerschaum/_internal/gui/app/_windows.py,sha256=-VHdjTzA3V596fVqnbmTxemONSp_80-sTNJ0CTB8FwU,2632
|
13
|
-
meerschaum/_internal/gui/app/actions.py,sha256=rx37qXf3uoa7Ou0n1cISqNFZNL0nr4wO7vSUmWO8f2E,935
|
14
|
-
meerschaum/_internal/gui/app/pipes.py,sha256=4nAQ0rrHb_2bNgDF0Ru2YlbPaCDDzAl5beOGU4Af-4A,1596
|
15
|
-
meerschaum/_internal/shell/Shell.py,sha256=R6xW-D9gVuxJxQzf4Bf6E9V8exE40aCdrDJ_snUpoxA,39982
|
10
|
+
meerschaum/_internal/shell/Shell.py,sha256=Iky6eXCbEsCCnvINbv7EA-DoglYzT3IjSl6BKMB8Mds,41571
|
16
11
|
meerschaum/_internal/shell/ShellCompleter.py,sha256=Ex6mPv83RUNdC3ufRJCcaoOmQ8q8z6tCHDVzXQmWIpY,3293
|
17
12
|
meerschaum/_internal/shell/ValidAutoSuggest.py,sha256=bARjOWMidz0dvMelLUe6yRPto5l3gcEHYHqFDjoh22I,1280
|
18
13
|
meerschaum/_internal/shell/__init__.py,sha256=vXQoQPEVlYiUYai1b5AwQAlTnja6A2cSABnqXhzlS7I,281
|
@@ -60,7 +55,7 @@ meerschaum/api/_exceptions.py,sha256=xfbWp8F8JYrMUdtDXesn8C8e39_jAXHz51IosIGjkVM
|
|
60
55
|
meerschaum/api/_oauth2.py,sha256=dJTIVlPpX3sAVW-PcN6pXRNy2RR5QAalu2RHp3l14YU,1683
|
61
56
|
meerschaum/api/_websockets.py,sha256=EMT9wB3yELu_WyCMqn9ZpgMDh23spUUchouRLCCLVuw,1509
|
62
57
|
meerschaum/api/dash/__init__.py,sha256=SpM96oyOy_MUswZHtJkVzMn91PjdADPyCAkyTQjL7LA,2079
|
63
|
-
meerschaum/api/dash/components.py,sha256=
|
58
|
+
meerschaum/api/dash/components.py,sha256=zeXzitZzXSLva12PJI51GeTmmFnmVc1Dl6Opm_yA5dQ,9850
|
64
59
|
meerschaum/api/dash/connectors.py,sha256=-Wd40ieYJI2nOASXi4V1C4bvLekjnN_tj6zp7HgZDl0,791
|
65
60
|
meerschaum/api/dash/graphs.py,sha256=wJUDWzcLN8-C3xko6rj0F2v7Rt8YDkSXoVkkXJjYGIk,2046
|
66
61
|
meerschaum/api/dash/jobs.py,sha256=mj9STE6AaQY4fwkjD1JcYRG0iW3VEcP04bO1SlKgiXw,7681
|
@@ -78,22 +73,26 @@ meerschaum/api/dash/assets/banner_1920x320.png,sha256=n2cNTSVEsGxO9XZg2keb85J3UO
|
|
78
73
|
meerschaum/api/dash/assets/favicon.ico,sha256=nDEekVxwS60wEDno1nbw5GF3TJOcDV26SETOHJEZKkY,9662
|
79
74
|
meerschaum/api/dash/assets/logo_48x48.png,sha256=hTR5BHUHEN4yP2xiqAcDciuigoII9T3-80R-dzsxVmw,10218
|
80
75
|
meerschaum/api/dash/assets/logo_500x500.png,sha256=9EUtf6wQcEZTXHKfQ2kjNXod6Rn_4DTB_BkTgxggq00,67702
|
81
|
-
meerschaum/api/dash/callbacks/__init__.py,sha256=
|
82
|
-
meerschaum/api/dash/callbacks/custom.py,sha256=
|
83
|
-
meerschaum/api/dash/callbacks/dashboard.py,sha256=
|
76
|
+
meerschaum/api/dash/callbacks/__init__.py,sha256=5dh8gsfcVaLlM4WcvGVE9Q1CtwaqJ2qwND0tdhvodng,607
|
77
|
+
meerschaum/api/dash/callbacks/custom.py,sha256=af7O0OMoNOcAJOuE0N2WXQZbmHiUVcQB9YBe_xgcr7I,1795
|
78
|
+
meerschaum/api/dash/callbacks/dashboard.py,sha256=BmFYp3yPkg0N4ywHcKhn2aevGc5BIYfjqtFy2YIj43w,35517
|
84
79
|
meerschaum/api/dash/callbacks/jobs.py,sha256=JYTrDcUEte_MIT3EegLDmQDsmU_Mxqw8L60dvF71ho4,8418
|
85
80
|
meerschaum/api/dash/callbacks/login.py,sha256=mEvMgV-f85H6DvqNdTvJPoiwHqTnhWY2nf_zLB26ipE,2876
|
86
81
|
meerschaum/api/dash/callbacks/pipes.py,sha256=byphQn-wJOe8ft-fGU9wac0n5xsMjVHJzNvYYb9NsKU,1693
|
87
82
|
meerschaum/api/dash/callbacks/plugins.py,sha256=znPgw_Uf3__QEjKxoIHADfjVNubTehCDaTJ02b16pQo,2760
|
88
83
|
meerschaum/api/dash/callbacks/register.py,sha256=KfMFgXWiFkemz0YriSPaLQBVnFDG8q6_t9gHuempOS0,3666
|
89
|
-
meerschaum/api/dash/
|
84
|
+
meerschaum/api/dash/callbacks/settings/__init__.py,sha256=pttbJMJGfd5I_oCWfbpbbVtXZp7pyerl9ESgY9xwUwI,157
|
85
|
+
meerschaum/api/dash/callbacks/settings/password_reset.py,sha256=LD4wS1k-MyGIJNwQL897Rg001U9Z53iHWK2Agzu6oyU,2468
|
86
|
+
meerschaum/api/dash/pages/__init__.py,sha256=U7PyReXPnB0PizArS6o556FXuDsUBCplI9zBLe3CU2s,391
|
90
87
|
meerschaum/api/dash/pages/dashboard.py,sha256=d6zPEycsbiFJyvufN6kt5JsOZbpW9zy-mNxPAJ_wOFo,3830
|
91
88
|
meerschaum/api/dash/pages/error.py,sha256=-uCrASuIBrceHcc-leLeEoLos2ibSBWG0XMFQzFwtbw,595
|
92
89
|
meerschaum/api/dash/pages/job.py,sha256=bAXXDB0fM3bSiqqJ2XlTwVdg2lohRaWdIGZp7ZtTZOw,544
|
93
90
|
meerschaum/api/dash/pages/login.py,sha256=Qjc-kDL9wW4D1cN48x0MrmWCME4igHDt0VkX9JSipjY,4603
|
94
|
-
meerschaum/api/dash/pages/pipes.py,sha256=
|
91
|
+
meerschaum/api/dash/pages/pipes.py,sha256=s4Ytfmf8kiPEYI5MCPhWtyY6l1nLFh_A_w8cgep8VP8,562
|
95
92
|
meerschaum/api/dash/pages/plugins.py,sha256=EX-M99bxvRSrI-9bIBocj-tmBpf6NgPQ813sJ_HSXS8,1731
|
96
93
|
meerschaum/api/dash/pages/register.py,sha256=dqhsiu2OhrXhs4RL41_CpqipdrWo1-_roASvZIDBAq8,2364
|
94
|
+
meerschaum/api/dash/pages/settings/__init__.py,sha256=UjfD2Pyz504CcbieVQbXbljjU5Wnxx7Pe0aix1zqBOE,153
|
95
|
+
meerschaum/api/dash/pages/settings/password_reset.py,sha256=cVIesZfCSixEBPWPLAV0jQpwJPKq0vXTIZ_BDuKlU6g,1864
|
97
96
|
meerschaum/api/models/__init__.py,sha256=WrSLChqDkw5y9uU_ma2xJFFLqqVAQvHoIjuYrZDxOcM,276
|
98
97
|
meerschaum/api/models/_interfaces.py,sha256=XtqxzWvUhZ-_SDia45Ut9K_VNziSltGjmLlUt-tMcJY,263
|
99
98
|
meerschaum/api/models/_locations.py,sha256=EF0aZDynLYyDApk_FcpoEK_5ictWnh6bwD73yP99rh8,304
|
@@ -103,7 +102,7 @@ meerschaum/api/resources/__init__.py,sha256=LshFiqh0sL55QtC_15fz6A6r-1_H9sQWtlif
|
|
103
102
|
meerschaum/api/resources/static/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
104
103
|
meerschaum/api/resources/static/css/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
105
104
|
meerschaum/api/resources/static/css/bootstrap.min.css,sha256=W8ArKu4Q_NnxCNqO3doJB2hqrNOIHNLFroAxpyxnYL8,180286
|
106
|
-
meerschaum/api/resources/static/css/dash.css,sha256=
|
105
|
+
meerschaum/api/resources/static/css/dash.css,sha256=nhHriUI9eos9bjMUofqNhqMQDK8W_f-vxfcWhbl1XBY,1886
|
107
106
|
meerschaum/api/resources/static/css/dbc_dark.css,sha256=2pka1ymFAjlWLv-mJaxGkPeL-gTEMD2g4Ba6LMuhHV4,6087
|
108
107
|
meerschaum/api/resources/static/css/styles.css,sha256=dHcCtRUzs8kJhpG6d4gusROLSe9AFkUitybvgFmEDvI,81
|
109
108
|
meerschaum/api/resources/static/css/xterm.css,sha256=gy8_LGA7Q61DUf8ElwFQzHqHMBQnbbEmpgZcbdgeSHI,5383
|
@@ -119,7 +118,7 @@ meerschaum/api/resources/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQe
|
|
119
118
|
meerschaum/api/resources/templates/index.html,sha256=Ck-S0U5abJgB-wTOKIGg0ispGzKlXXqvFUoNAAByzLA,1019
|
120
119
|
meerschaum/api/resources/templates/old_index.html,sha256=BDeOlcXhSsBH3-NaRtuX4Z1sDuhOoCMa_Dq-6g5RMpc,1711
|
121
120
|
meerschaum/api/resources/templates/secret.html,sha256=0QWkm4ZoN81Aw1pd2-62rGCvx3nXPHfFUoegj3Iy8Ls,141
|
122
|
-
meerschaum/api/resources/templates/termpage.html,sha256=
|
121
|
+
meerschaum/api/resources/templates/termpage.html,sha256=UKEUkBprNUPtL8m3gXOBfDU_ewOowi4phdP4GatoLvo,6244
|
123
122
|
meerschaum/api/routes/__init__.py,sha256=38k-iGm7LM30C1jfvkt7_tatRO3tfx-eOd8AnTgLkc0,611
|
124
123
|
meerschaum/api/routes/_actions.py,sha256=VUasS1dpr4d3TXHcR1CXlRZPAqvGKKuHv_f9PsOkQ5c,1732
|
125
124
|
meerschaum/api/routes/_connectors.py,sha256=E2Icawy42nBPM7peRlHBM9_v4vF0daWCf-_Ok14LbqI,1776
|
@@ -127,7 +126,7 @@ meerschaum/api/routes/_index.py,sha256=Z8kuyqm3vmJadw8iIYyswYI4-3IOJ7KXdkhDTv1oU
|
|
127
126
|
meerschaum/api/routes/_jobs.py,sha256=sEt-UtVd5pN-hJgikTvj1oTKJQ2hhNe8XhjkclwOXOE,12568
|
128
127
|
meerschaum/api/routes/_login.py,sha256=tygEp50EVOMgvTG6CEASlShflbtEK8viJ9O07o0lnnE,2434
|
129
128
|
meerschaum/api/routes/_misc.py,sha256=XxfSvXNGAm8rdvXePXWxX8wc5tjeAdBOSZwYveL3oAM,2591
|
130
|
-
meerschaum/api/routes/_pipes.py,sha256=
|
129
|
+
meerschaum/api/routes/_pipes.py,sha256=QEZgLbCPyQUXGq6MbNcSIPsMZ357s19CIlECjp-rPnc,29776
|
131
130
|
meerschaum/api/routes/_plugins.py,sha256=okstNlv9Bhoiy6JvQWgwjxEi4kQ8adPUcir6k3Y7hH8,6329
|
132
131
|
meerschaum/api/routes/_users.py,sha256=i55LuLTQ2cuzIyWz0PxkWji6aQQUIBPf_FEryKwXI50,7197
|
133
132
|
meerschaum/api/routes/_version.py,sha256=-3A0i4Gk54netFOOwjI_x3YQik9vgHjtq7G_VYbzIJo,750
|
@@ -146,7 +145,7 @@ meerschaum/config/_preprocess.py,sha256=-AEA8m_--KivZwTQ1sWN6LTn5sio_fUr2XZ51BO6
|
|
146
145
|
meerschaum/config/_read_config.py,sha256=RLC3HHi_1ndj7ITVDKLD9_uULY3caGRwSz3ATYE-ixA,15014
|
147
146
|
meerschaum/config/_shell.py,sha256=46_m49Txc5q1rGfCgO49ca48BODx45DQJi8D0zz1R18,4245
|
148
147
|
meerschaum/config/_sync.py,sha256=jHcWRkxd82_BgX8Xo8agsWvf7BSbv3qHLWmYl6ehp_0,4242
|
149
|
-
meerschaum/config/_version.py,sha256=
|
148
|
+
meerschaum/config/_version.py,sha256=IsNhoHfdCmZpo3XxQo3K-ny9DYKuE8viAyCDbZGWxDs,71
|
150
149
|
meerschaum/config/paths.py,sha256=JjibeGN3YAdSNceRwsd42aNmeUrIgM6ndzC8qZAmNI0,621
|
151
150
|
meerschaum/config/resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
152
151
|
meerschaum/config/stack/__init__.py,sha256=2UukC0Lmk-aVL1o1qXzumqmuIrw3vu9fD7iCuz4XD4I,10544
|
@@ -156,7 +155,7 @@ meerschaum/config/stack/mosquitto/resources/__init__.py,sha256=47DEQpj8HBSa-_TIm
|
|
156
155
|
meerschaum/config/stack/resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
157
156
|
meerschaum/config/static/__init__.py,sha256=ccm5oaYnLu0j5B85C9a8Y7jWsw4ReJq5RqyvLd-rW_s,5519
|
158
157
|
meerschaum/connectors/_Connector.py,sha256=VaVNg0SlQCTXk4shl3c68QdkbymA2Y9ScUlUjckk8PY,6795
|
159
|
-
meerschaum/connectors/__init__.py,sha256=
|
158
|
+
meerschaum/connectors/__init__.py,sha256=Hx_T2E3fF6zYLC1pjAt0EbnuDbVk9UOI845WaQGw7lk,12716
|
160
159
|
meerschaum/connectors/parse.py,sha256=Dzu3fiZu-Vd5d0qje-HCwIIolfmWmUYEOpYRjc7vDqw,4188
|
161
160
|
meerschaum/connectors/poll.py,sha256=23yRUeIqqyNVt8VoJErhirW543YZ6X0ocfBauMJnC_g,7465
|
162
161
|
meerschaum/connectors/api/_APIConnector.py,sha256=bcjvPVfxE7y7i_r3FTPL1phzjTMqWq4szJzeusaNqQg,5598
|
@@ -166,7 +165,7 @@ meerschaum/connectors/api/_fetch.py,sha256=Khq9AFr1nk8Dsmcedb77aWhAuHw0JGgVeahDG
|
|
166
165
|
meerschaum/connectors/api/_jobs.py,sha256=N5lpHFGG10jlVgaJeWAOTuLBQw3AdgjXsEPpp1YwZQE,11270
|
167
166
|
meerschaum/connectors/api/_login.py,sha256=cVVmiS-QT0y0QHdrG25eGB4f7j44om1E0YPxnMCNeas,2049
|
168
167
|
meerschaum/connectors/api/_misc.py,sha256=XK0LLexNUEKZjAAqoJ-9oOgwLlMdwxSOvcpqO5NuOas,1083
|
169
|
-
meerschaum/connectors/api/_pipes.py,sha256=
|
168
|
+
meerschaum/connectors/api/_pipes.py,sha256=6WVHx5chscrejIPcvBNKIH4FDaRCJ1cMzADrdtEpRes,23865
|
170
169
|
meerschaum/connectors/api/_plugins.py,sha256=hv0rqWaH8GrQMup8XMdfUbpv_qGcEAjnl3S8yYQGcsI,5072
|
171
170
|
meerschaum/connectors/api/_request.py,sha256=JtnDa14nkC5CDCuYhutUPztnbLxxzgjmGG_0k09B4mY,6957
|
172
171
|
meerschaum/connectors/api/_uri.py,sha256=HWxqGx4R1cHZ3ywy9Ro9ePbFxxusw4RLaC3hpGt9Z6I,1469
|
@@ -179,7 +178,7 @@ meerschaum/connectors/sql/_cli.py,sha256=smwMBxq-euAeefbdZSXGTr83cm04GVGT1WIFEft
|
|
179
178
|
meerschaum/connectors/sql/_create_engine.py,sha256=RRiTNNVNwE_sabeTRWrlZZoFB6jFXDfcEcXkENuo8Rc,12035
|
180
179
|
meerschaum/connectors/sql/_fetch.py,sha256=mVe5zQo7SM9PSUU3Vjhacg4Bq1-Vttb7KkXL4p5YQdQ,12818
|
181
180
|
meerschaum/connectors/sql/_instance.py,sha256=xCc8M0xWMzF5Tu_1uWIFivAoHey5N1ccFhN_Z7u04zk,6304
|
182
|
-
meerschaum/connectors/sql/_pipes.py,sha256=
|
181
|
+
meerschaum/connectors/sql/_pipes.py,sha256=udeAA-me-Lwq_gGRdvzvcaBWmkAb4eeXZvKdtUUcBfE,130202
|
183
182
|
meerschaum/connectors/sql/_plugins.py,sha256=OVEdZ_UHTi-x5sF-5lu2TmR9ONxddp6SwDOmFo5TpU8,8051
|
184
183
|
meerschaum/connectors/sql/_sql.py,sha256=EziDFp9mLU-VPvFczG94ZUtGy-JmKxXB4wbLtCfkykk,43786
|
185
184
|
meerschaum/connectors/sql/_uri.py,sha256=BFzu5pjlbL3kxLH13vHWlpKGYTPfg8wuA2j58O9NsCM,3440
|
@@ -190,7 +189,7 @@ meerschaum/connectors/sql/tables/types.py,sha256=Jc_MTHIBM-KHpQt__Lckp39CeOo7tGO
|
|
190
189
|
meerschaum/connectors/valkey/_ValkeyConnector.py,sha256=IJgFXHXH89J2uDP_WaejIzr1L8gSNQtSXGxjXeYm2gw,15854
|
191
190
|
meerschaum/connectors/valkey/__init__.py,sha256=jkVutsygQCvGPLN17cP6wHAjHajxVycnQJbm2eVMuY0,187
|
192
191
|
meerschaum/connectors/valkey/_fetch.py,sha256=MjeE0h3YI4M3LCzy7axQAc_fX_l82vUqX4WXcYoppxE,1920
|
193
|
-
meerschaum/connectors/valkey/_pipes.py,sha256=
|
192
|
+
meerschaum/connectors/valkey/_pipes.py,sha256=3F24dzdCZ17fQU2tnk2x4n-Mr95fd5tP2-sKD0FiXPw,24673
|
194
193
|
meerschaum/connectors/valkey/_plugins.py,sha256=ZqiEW4XZCOpw4G8DUK2IKY6Qrph4mYfTjgXWimgakYY,6267
|
195
194
|
meerschaum/connectors/valkey/_users.py,sha256=AS1vLarrkDA9yPK644GWwRiQiTZVa9x3nlLpyntq40g,7730
|
196
195
|
meerschaum/core/__init__.py,sha256=tjASW10n9uLV6bYhcwP4rggh-ESXSJzgxpSBbVsuISs,251
|
@@ -199,7 +198,7 @@ meerschaum/core/Pipe/_attributes.py,sha256=wZQBGspZHmqmab_DNEUrvYsJSZtwaDsj0zeXD
|
|
199
198
|
meerschaum/core/Pipe/_bootstrap.py,sha256=gTNGh5e2LmTMrgIpHqrVaL60uPKWCphhsuz8j-lJ2HI,7348
|
200
199
|
meerschaum/core/Pipe/_clear.py,sha256=LghXabgyyc1tD7FNQrh9ExT71ipcg2poM9FDA3k9e4M,2230
|
201
200
|
meerschaum/core/Pipe/_copy.py,sha256=YDclAapf_spm9phpFr4-CALyYyw7nUsyKyiaLM1cnm4,2965
|
202
|
-
meerschaum/core/Pipe/_data.py,sha256=
|
201
|
+
meerschaum/core/Pipe/_data.py,sha256=x98glD6_1oxgnwCl7YvMERe1YHbjCZUmfp5iPPmHk7c,27165
|
203
202
|
meerschaum/core/Pipe/_deduplicate.py,sha256=Wsa1cJk41LgaHwIsJC9OZfPZ_3GoMP26_y8MmJdTrO8,10137
|
204
203
|
meerschaum/core/Pipe/_delete.py,sha256=1geNp9BgrocXP1gt76dMbnlJWKYFMuSNqPFA4K4-hXE,2118
|
205
204
|
meerschaum/core/Pipe/_drop.py,sha256=KDfJVz2aGjHUE1Jkmj7Ej4ICPR5xPiuhyhgRO7Lu9d4,3299
|
@@ -210,7 +209,7 @@ meerschaum/core/Pipe/_index.py,sha256=cYgaVwBVfAYxJBZ6j6MXDqOxnOrD_QnYi33_kIwy_F
|
|
210
209
|
meerschaum/core/Pipe/_register.py,sha256=Sd5xaAW8H7uLTIoommcKb-6kHPRuHJLWNSbPnt2UbvA,2240
|
211
210
|
meerschaum/core/Pipe/_show.py,sha256=nG50y8eBT9TVuKkRgAKtNDNIxysJvMNxfu__lkL1F9k,1352
|
212
211
|
meerschaum/core/Pipe/_sync.py,sha256=YsNlWepIPHVxfoBsYtPkdl5jMdTIEEd0kHtMllUyAoI,39968
|
213
|
-
meerschaum/core/Pipe/_verify.py,sha256=
|
212
|
+
meerschaum/core/Pipe/_verify.py,sha256=t9s1874malRdtQjdKAotnkSFwVSFJIPEpOwV8ByVa1s,22605
|
214
213
|
meerschaum/core/Plugin/__init__.py,sha256=UXg64EvJPgI1PCxkY_KM02-ZmBm4FZpLPIQR_uSJJDc,137
|
215
214
|
meerschaum/core/User/_User.py,sha256=qbI0GIkr3G0PI4d9S49uatbJQ2kH_-z5-GoVJ0fuEtA,6624
|
216
215
|
meerschaum/core/User/__init__.py,sha256=8WkDRSBmxsprnKE7GB6j1yXSfEz9RinRkSzW0bzVP1I,870
|
@@ -219,20 +218,20 @@ meerschaum/jobs/_Job.py,sha256=D4TFrEQQ9EYqZrnepLBO7T3Sx2mOOdgBs2JnBdC1dNc,32257
|
|
219
218
|
meerschaum/jobs/__init__.py,sha256=YmZr1ZU8MLUjlTSLQ61Y6eE-a-SYuSMSMhiIpJKao_Y,12829
|
220
219
|
meerschaum/jobs/systemd.py,sha256=CZbBkm-2z8z7G3CNmP5yBRj2VtWuxmxXVIv97cGhZGc,24613
|
221
220
|
meerschaum/plugins/_Plugin.py,sha256=CyaWg0TImFui9NMJkTP3bYKnYHmRC5uVrPSPKoiB_Dc,34359
|
222
|
-
meerschaum/plugins/__init__.py,sha256=
|
221
|
+
meerschaum/plugins/__init__.py,sha256=H0VwldqR_n5XaX3amBl58mDgugIo0Pnn-e1Xxyb103I,27312
|
223
222
|
meerschaum/plugins/bootstrap.py,sha256=VwjpZAuYdqPJW0YoVgAoM_taHkdQHqP902-8T7OWWCI,11339
|
224
223
|
meerschaum/utils/__init__.py,sha256=QrK1K9hIbPCRCM5k2nZGFqGnrqhA0Eh-iSmCU7FG6Cs,612
|
225
224
|
meerschaum/utils/_get_pipes.py,sha256=tu4xKPoDn79Dz2kWM13cXTP4DSCkn-3G9M8KiLftopw,11073
|
226
|
-
meerschaum/utils/dataframe.py,sha256=
|
225
|
+
meerschaum/utils/dataframe.py,sha256=J7L2OWCuRI1Oxi-UMgQK9S_CiduuSopC7bmO1k-eQdM,54091
|
227
226
|
meerschaum/utils/debug.py,sha256=GyIzJmunkoPnOcZNYVQdT4Sgd-aOb5MI2VbIgATOjIQ,3695
|
228
227
|
meerschaum/utils/interactive.py,sha256=t-6jWozXSqL7lYGDHuwiOjTgr-UKhdcg61q_eR5mikI,3196
|
229
|
-
meerschaum/utils/misc.py,sha256=
|
228
|
+
meerschaum/utils/misc.py,sha256=dQ7WvcN7Z-LwkaipNeliqjdkKp_1U5JPq6lNLfwuE0U,48160
|
230
229
|
meerschaum/utils/networking.py,sha256=Sr_eYUGW8_UV9-k9LqRFf7xLtbUcsDucODyLCRsFRUc,1006
|
231
230
|
meerschaum/utils/pool.py,sha256=vkE42af4fjrTEJTxf6Ek3xGucm1MtEkpsSEiaVzNKHs,2655
|
232
231
|
meerschaum/utils/process.py,sha256=as0-CjG4mqFP0TydVvmAmgki6er4thS5BqUopeiq98Q,8216
|
233
232
|
meerschaum/utils/prompt.py,sha256=qj1As1tuiL0GZTku_YOC6I5DmOU6L5otDR7DW7LA5fM,19397
|
234
233
|
meerschaum/utils/schedule.py,sha256=Vrcd2Qs-UPVn6xBayNUIgludf0Mlb6Wrgq6ATdyhV8c,11451
|
235
|
-
meerschaum/utils/sql.py,sha256=
|
234
|
+
meerschaum/utils/sql.py,sha256=py9PtVyuC1NO2WTcpMiP_ZBkOofLnkGJ5NGrHBIVfBo,84584
|
236
235
|
meerschaum/utils/threading.py,sha256=awjbVL_QR6G-o_9Qk85utac9cSdqkiC8tQSdERCdrG8,2814
|
237
236
|
meerschaum/utils/typing.py,sha256=U3MC347sh1umpa3Xr1k71eADyDmk4LB6TnVCpq8dVzI,2830
|
238
237
|
meerschaum/utils/warnings.py,sha256=n-phr3BftNNgyPnvnXC_VMSjtCvjiCZ-ewmVfcROhkc,6611
|
@@ -243,7 +242,7 @@ meerschaum/utils/daemon/RotatingFile.py,sha256=8_bXegBjjzNRlNEjFZ_EHU4pSaDfjXZTw
|
|
243
242
|
meerschaum/utils/daemon/StdinFile.py,sha256=qdZ8E_RSOkURypwnS50mWeyWyRig1bAY9tKWMTVKajc,3307
|
244
243
|
meerschaum/utils/daemon/__init__.py,sha256=ziRPyu_IM3l7Xd58y3Uvt0fZLoirJ9nuboFIxxult6c,8741
|
245
244
|
meerschaum/utils/daemon/_names.py,sha256=d2ZwTxBoTAqXZkCfZ5LuX2XrkQmLNUq1OTlUqfoH5dA,4515
|
246
|
-
meerschaum/utils/dtypes/__init__.py,sha256=
|
245
|
+
meerschaum/utils/dtypes/__init__.py,sha256=NI09GgIcTxwXhGjaxqYFV0FmdrPpvrnjoKfX9gaHKf8,21348
|
247
246
|
meerschaum/utils/dtypes/sql.py,sha256=zhwGnz6MfsaJEH7Sibtd-GfVEImnBSkZh1I3srxgiKE,31428
|
248
247
|
meerschaum/utils/formatting/__init__.py,sha256=bA8qwBeTNIVHVQOBK682bJsKSKik1yS6xYJAoi0RErk,15528
|
249
248
|
meerschaum/utils/formatting/_jobs.py,sha256=izsqPJhTtUkXUUtWnbXtReYsUYwulXtci3pBj72Ne64,6637
|
@@ -251,15 +250,15 @@ meerschaum/utils/formatting/_pipes.py,sha256=gwl8-xCN5GYqBZJ7SkY20BebcofY0nU5X8Y
|
|
251
250
|
meerschaum/utils/formatting/_pprint.py,sha256=wyTmjHFnsHbxfyuytjTWzH-D42Z65GuIisQ_W6UnRPg,3096
|
252
251
|
meerschaum/utils/formatting/_shell.py,sha256=2bFvtwNXapjl9jdlc0fg79PRWHbYVcllKiVcG5g36qI,3678
|
253
252
|
meerschaum/utils/packages/__init__.py,sha256=TdKaj2tmN4bFwzusOfMv24P5ET7Zv73vyoOf9GOIr5E,64427
|
254
|
-
meerschaum/utils/packages/_packages.py,sha256=
|
253
|
+
meerschaum/utils/packages/_packages.py,sha256=G3eMtqq4WJo_iTC4ctRAWkzKhN6ZQcdFRpKy5j6glMk,9131
|
255
254
|
meerschaum/utils/packages/lazy_loader.py,sha256=VHnph3VozH29R4JnSSBfwtA5WKZYZQFT_GeQSShCnuc,2540
|
256
255
|
meerschaum/utils/venv/_Venv.py,sha256=gc1TCeAj-kTZbQFAT9xl1bi4HXFV5ApT0dPOJfxwr78,3748
|
257
256
|
meerschaum/utils/venv/__init__.py,sha256=RhWuDohBEROIu_9T6BNPgYCrGtuE14w7nXHR1E2qyh8,27321
|
258
|
-
meerschaum-2.9.
|
259
|
-
meerschaum-2.9.
|
260
|
-
meerschaum-2.9.
|
261
|
-
meerschaum-2.9.
|
262
|
-
meerschaum-2.9.
|
263
|
-
meerschaum-2.9.
|
264
|
-
meerschaum-2.9.
|
265
|
-
meerschaum-2.9.
|
257
|
+
meerschaum-2.9.2.dist-info/licenses/LICENSE,sha256=jG2zQEdRNt88EgHUWPpXVWmOrOduUQRx7MnYV9YIPaw,11359
|
258
|
+
meerschaum-2.9.2.dist-info/licenses/NOTICE,sha256=OTA9Fcthjf5BRvWDDIcBC_xfLpeDV-RPZh3M-HQBRtQ,114
|
259
|
+
meerschaum-2.9.2.dist-info/METADATA,sha256=iIB9Mvn5MVfTZWCZDaMbjdcYLfxOxJuf1s8nNzKXTOk,25145
|
260
|
+
meerschaum-2.9.2.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
|
261
|
+
meerschaum-2.9.2.dist-info/entry_points.txt,sha256=5YBVzibw-0rNA_1VjB16z5GABsOGf-CDhW4yqH8C7Gc,88
|
262
|
+
meerschaum-2.9.2.dist-info/top_level.txt,sha256=bNoSiDj0El6buocix-FRoAtJOeq1qOF5rRm2u9i7Q6A,11
|
263
|
+
meerschaum-2.9.2.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
264
|
+
meerschaum-2.9.2.dist-info/RECORD,,
|
@@ -1,43 +0,0 @@
|
|
1
|
-
#! /usr/bin/env python3
|
2
|
-
# -*- coding: utf-8 -*-
|
3
|
-
# vim:fenc=utf-8
|
4
|
-
|
5
|
-
"""
|
6
|
-
Meerschaum GUI definition. Start the GUI with `start gui`.
|
7
|
-
"""
|
8
|
-
|
9
|
-
from meerschaum.config.static import STATIC_CONFIG
|
10
|
-
from meerschaum.utils.packages import attempt_import
|
11
|
-
from meerschaum.config import __version__
|
12
|
-
from meerschaum.config._paths import PACKAGE_ROOT_PATH
|
13
|
-
from meerschaum.utils.threading import Lock
|
14
|
-
|
15
|
-
from meerschaum._internal.gui.app import MeerschaumApp
|
16
|
-
|
17
|
-
icon_path = PACKAGE_ROOT_PATH / 'api' / 'dash' / 'assets' / 'logo_500x500.png'
|
18
|
-
|
19
|
-
locks = {'app': Lock()}
|
20
|
-
_app = None
|
21
|
-
|
22
|
-
def get_app(**kw) -> MeerschaumApp:
|
23
|
-
"""Instantiate and return the main app."""
|
24
|
-
global _app
|
25
|
-
if _app is None:
|
26
|
-
with locks['app']:
|
27
|
-
_app = build_app(**kw)
|
28
|
-
return _app
|
29
|
-
|
30
|
-
def build_app(**kw) -> MeerschaumApp:
|
31
|
-
"""Construct and return an instance of the GUI application."""
|
32
|
-
_kw = dict(
|
33
|
-
formal_name = STATIC_CONFIG['setup']['formal_name'],
|
34
|
-
app_id = STATIC_CONFIG['setup']['app_id'],
|
35
|
-
app_name = STATIC_CONFIG['setup']['name'],
|
36
|
-
author = STATIC_CONFIG['setup']['author'],
|
37
|
-
description = STATIC_CONFIG['setup']['description'],
|
38
|
-
icon = icon_path,
|
39
|
-
version = __version__,
|
40
|
-
home_page = STATIC_CONFIG['setup']['url'],
|
41
|
-
)
|
42
|
-
_kw.update(kw)
|
43
|
-
return MeerschaumApp(**_kw)
|
@@ -1,50 +0,0 @@
|
|
1
|
-
#! /usr/bin/env python3
|
2
|
-
# -*- coding: utf-8 -*-
|
3
|
-
# vim:fenc=utf-8
|
4
|
-
|
5
|
-
"""
|
6
|
-
Define the `toga.App` implementation here.
|
7
|
-
"""
|
8
|
-
|
9
|
-
from __future__ import annotations
|
10
|
-
from meerschaum.utils.typing import Optional, List, Dict, Any
|
11
|
-
|
12
|
-
from meerschaum.utils.packages import attempt_import
|
13
|
-
toga = attempt_import('toga', lazy=False, venv=None)
|
14
|
-
|
15
|
-
from meerschaum._internal.gui.app._windows import get_windows, get_main_window
|
16
|
-
|
17
|
-
class MeerschaumApp(toga.App):
|
18
|
-
|
19
|
-
|
20
|
-
def __init__(
|
21
|
-
self,
|
22
|
-
*args: Any,
|
23
|
-
mrsm_instance: Optional[str] = None,
|
24
|
-
debug: bool = False,
|
25
|
-
**kw: Any
|
26
|
-
):
|
27
|
-
"""
|
28
|
-
Set the initial state of the GUI application from the keyword arguments.
|
29
|
-
"""
|
30
|
-
from meerschaum.utils.misc import filter_keywords
|
31
|
-
self._windows = get_windows(instance=mrsm_instance, debug=debug, **kw)
|
32
|
-
windows_list = list(kw.pop('windows', []))
|
33
|
-
windows_list += [w for k, w in self._windows.items()]
|
34
|
-
_init = super(MeerschaumApp, self).__init__
|
35
|
-
_init(*args, **filter_keywords(_init, windows=windows_list, **kw))
|
36
|
-
self._debug = debug
|
37
|
-
self._instance = mrsm_instance
|
38
|
-
self._kw = kw
|
39
|
-
|
40
|
-
def startup(self) -> None:
|
41
|
-
"""Entrypoint for the GUI application."""
|
42
|
-
self.main_window = get_main_window(instance=self._instance, debug=self._debug, **self._kw)
|
43
|
-
for k, w in self._windows.items():
|
44
|
-
if k == 'main':
|
45
|
-
continue
|
46
|
-
w.app = self
|
47
|
-
self._windows['main'] = self.main_window
|
48
|
-
|
49
|
-
self.main_window.show()
|
50
|
-
print('CLOSE')
|
@@ -1,74 +0,0 @@
|
|
1
|
-
#! /usr/bin/env python3
|
2
|
-
# -*- coding: utf-8 -*-
|
3
|
-
# vim:fenc=utf-8
|
4
|
-
|
5
|
-
"""
|
6
|
-
Define different windows for the GUI application.
|
7
|
-
"""
|
8
|
-
|
9
|
-
from __future__ import annotations
|
10
|
-
from meerschaum.utils.typing import List, Dict, Optional
|
11
|
-
|
12
|
-
from meerschaum._internal.gui.app import toga
|
13
|
-
|
14
|
-
def get_windows(**kw) -> Dict[str, toga.window.Window]:
|
15
|
-
return {
|
16
|
-
# 'main': get_main_window(**kw),
|
17
|
-
'terminal': get_terminal_window(**kw),
|
18
|
-
}
|
19
|
-
|
20
|
-
|
21
|
-
def get_main_window(instance: Optional[str], debug: bool = False, **kw) -> toga.window.Window:
|
22
|
-
from meerschaum.config.static import _static_config
|
23
|
-
from meerschaum.utils.misc import get_connector_labels
|
24
|
-
from meerschaum.connectors import instance_types
|
25
|
-
from meerschaum._internal.gui.app.pipes import build_pipes_tree
|
26
|
-
|
27
|
-
main_window = toga.MainWindow(title=_static_config()['setup']['formal_name'], size=(1280, 720))
|
28
|
-
tree = build_pipes_tree(mrsm_instance=instance, debug=debug, **kw)
|
29
|
-
sub_menu = toga.Group("Sub Menu", parent=toga.Group.COMMANDS, order=2)
|
30
|
-
|
31
|
-
left_box = toga.Box(children=[
|
32
|
-
toga.Box(children=[
|
33
|
-
toga.Selection(items=get_connector_labels(*instance_types), style=toga.style.Pack(flex=1)),
|
34
|
-
tree,
|
35
|
-
toga.Button('Hello, world!', style=toga.style.Pack(flex=1, padding=10), on_press=show_test_window),
|
36
|
-
], style=toga.style.Pack(flex=1, padding=10, direction='column', width=200))
|
37
|
-
|
38
|
-
])
|
39
|
-
label = toga.Label("foo!")
|
40
|
-
right_box = toga.Box(children=[], style=toga.style.Pack(flex=1))
|
41
|
-
|
42
|
-
main_box = toga.Box(children=[left_box, right_box])
|
43
|
-
|
44
|
-
option_container = toga.OptionContainer()
|
45
|
-
option_container.add('foo', label)
|
46
|
-
# option_container.add('Terminal', self.webview)
|
47
|
-
# main_box = toga.Box(option_container)
|
48
|
-
# main_box = option_container
|
49
|
-
main_window.content = main_box
|
50
|
-
|
51
|
-
from meerschaum.config._paths import PACKAGE_ROOT_PATH
|
52
|
-
icon_path = PACKAGE_ROOT_PATH / 'api' / 'dash' / 'assets' / 'logo_500x500.png'
|
53
|
-
command = toga.Command(_open_webterm, label='Open Terminal', icon=icon_path, tooltip=_open_webterm.__doc__)
|
54
|
-
# main_window.toolbar.add(command)
|
55
|
-
# self._windows['main_window'] = main_window
|
56
|
-
# return self._windows['main_window']
|
57
|
-
return main_window
|
58
|
-
|
59
|
-
|
60
|
-
def get_terminal_window(**kw):
|
61
|
-
window = toga.Window(title='Terminal')
|
62
|
-
webview = toga.WebView(url='http://localhost:8765', style=toga.style.Pack(flex=1))
|
63
|
-
box = toga.Box(children=[webview])
|
64
|
-
|
65
|
-
window.content = box
|
66
|
-
return window
|
67
|
-
|
68
|
-
|
69
|
-
def _open_webterm():
|
70
|
-
"""Foo bar"""
|
71
|
-
|
72
|
-
def show_test_window(button):
|
73
|
-
from meerschaum._internal.gui import get_app
|
74
|
-
get_app()._windows['terminal'].show()
|
@@ -1,30 +0,0 @@
|
|
1
|
-
#! /usr/bin/env python3
|
2
|
-
# -*- coding: utf-8 -*-
|
3
|
-
# vim:fenc=utf-8
|
4
|
-
|
5
|
-
"""
|
6
|
-
Wrap the Meerschaum actions into Toga commands.
|
7
|
-
"""
|
8
|
-
|
9
|
-
from meerschaum.utils.packages import attempt_import
|
10
|
-
toga = attempt_import('toga', lazy=False, venv=None)
|
11
|
-
|
12
|
-
from meerschaum.config._paths import PACKAGE_ROOT_PATH
|
13
|
-
icon_path = PACKAGE_ROOT_PATH / 'api' / 'dash' / 'assets' / 'logo_500x500.png'
|
14
|
-
|
15
|
-
def add_actions_as_commands(app) -> None:
|
16
|
-
"""Add the standard Meerschaum actions as commands."""
|
17
|
-
from meerschaum.actions import actions
|
18
|
-
commands = []
|
19
|
-
for action, fn in actions.items():
|
20
|
-
try:
|
21
|
-
doc = fn.__doc__
|
22
|
-
except Exception as e:
|
23
|
-
doc = "No help available."
|
24
|
-
commands.append(toga.Command(_action_to_command_wrapper, label=action, tooltip=doc, icon=icon_path))
|
25
|
-
app.commands.add(*commands)
|
26
|
-
# app.main_window.toolbar.add(*commands)
|
27
|
-
|
28
|
-
|
29
|
-
def _action_to_command_wrapper(widget, **kw):
|
30
|
-
print(widget.key)
|