meerschaum 2.3.6__py3-none-any.whl → 2.4.0.dev1__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/actions/bootstrap.py +36 -10
- meerschaum/actions/copy.py +3 -3
- meerschaum/actions/start.py +13 -14
- meerschaum/api/dash/__init__.py +7 -6
- meerschaum/api/dash/callbacks/__init__.py +1 -0
- meerschaum/api/dash/callbacks/dashboard.py +7 -5
- meerschaum/api/dash/callbacks/pipes.py +42 -0
- meerschaum/api/dash/pages/__init__.py +1 -0
- meerschaum/api/dash/pages/pipes.py +16 -0
- meerschaum/api/dash/pipes.py +79 -47
- meerschaum/api/dash/users.py +19 -6
- meerschaum/api/routes/_login.py +4 -4
- meerschaum/api/routes/_pipes.py +3 -3
- meerschaum/config/_default.py +9 -1
- meerschaum/config/_version.py +1 -1
- meerschaum/config/stack/__init__.py +59 -16
- meerschaum/connectors/Connector.py +19 -13
- meerschaum/connectors/__init__.py +9 -5
- meerschaum/connectors/poll.py +30 -24
- meerschaum/connectors/sql/_pipes.py +126 -154
- meerschaum/connectors/sql/_plugins.py +45 -43
- meerschaum/connectors/sql/_users.py +46 -38
- meerschaum/connectors/valkey/ValkeyConnector.py +535 -0
- meerschaum/connectors/valkey/__init__.py +8 -0
- meerschaum/connectors/valkey/_fetch.py +75 -0
- meerschaum/connectors/valkey/_pipes.py +839 -0
- meerschaum/connectors/valkey/_plugins.py +265 -0
- meerschaum/connectors/valkey/_users.py +305 -0
- meerschaum/core/Pipe/__init__.py +3 -0
- meerschaum/core/Pipe/_attributes.py +1 -2
- meerschaum/core/Pipe/_clear.py +16 -13
- meerschaum/core/Pipe/_copy.py +106 -0
- meerschaum/core/Pipe/_drop.py +4 -4
- meerschaum/core/Pipe/_dtypes.py +14 -14
- meerschaum/core/Pipe/_edit.py +15 -14
- meerschaum/core/Pipe/_sync.py +134 -51
- meerschaum/core/Pipe/_verify.py +11 -11
- meerschaum/core/User/_User.py +14 -12
- meerschaum/plugins/_Plugin.py +17 -13
- meerschaum/utils/_get_pipes.py +14 -20
- meerschaum/utils/dataframe.py +288 -101
- meerschaum/utils/dtypes/__init__.py +31 -6
- meerschaum/utils/dtypes/sql.py +4 -4
- meerschaum/utils/misc.py +3 -3
- meerschaum/utils/packages/_packages.py +1 -0
- {meerschaum-2.3.6.dist-info → meerschaum-2.4.0.dev1.dist-info}/METADATA +3 -1
- {meerschaum-2.3.6.dist-info → meerschaum-2.4.0.dev1.dist-info}/RECORD +53 -44
- {meerschaum-2.3.6.dist-info → meerschaum-2.4.0.dev1.dist-info}/WHEEL +1 -1
- {meerschaum-2.3.6.dist-info → meerschaum-2.4.0.dev1.dist-info}/LICENSE +0 -0
- {meerschaum-2.3.6.dist-info → meerschaum-2.4.0.dev1.dist-info}/NOTICE +0 -0
- {meerschaum-2.3.6.dist-info → meerschaum-2.4.0.dev1.dist-info}/entry_points.txt +0 -0
- {meerschaum-2.3.6.dist-info → meerschaum-2.4.0.dev1.dist-info}/top_level.txt +0 -0
- {meerschaum-2.3.6.dist-info → meerschaum-2.4.0.dev1.dist-info}/zip-safe +0 -0
meerschaum/plugins/_Plugin.py
CHANGED
@@ -7,8 +7,12 @@ Plugin metadata class
|
|
7
7
|
"""
|
8
8
|
|
9
9
|
from __future__ import annotations
|
10
|
-
|
11
|
-
|
10
|
+
|
11
|
+
import os
|
12
|
+
import pathlib
|
13
|
+
import shutil
|
14
|
+
|
15
|
+
import meerschaum as mrsm
|
12
16
|
from meerschaum.utils.typing import (
|
13
17
|
Dict,
|
14
18
|
List,
|
@@ -40,8 +44,8 @@ class Plugin:
|
|
40
44
|
attributes: Optional[Dict[str, Any]] = None,
|
41
45
|
archive_path: Optional[pathlib.Path] = None,
|
42
46
|
venv_path: Optional[pathlib.Path] = None,
|
43
|
-
repo_connector: Optional['
|
44
|
-
repo: Union['
|
47
|
+
repo_connector: Optional['mrsm.connectors.api.APIConnector'] = None,
|
48
|
+
repo: Union['mrsm.connectors.api.APIConnector', str, None] = None,
|
45
49
|
):
|
46
50
|
from meerschaum.config.static import STATIC_CONFIG
|
47
51
|
sep = STATIC_CONFIG['plugins']['repo_separator']
|
@@ -470,9 +474,9 @@ class Plugin:
|
|
470
474
|
|
471
475
|
|
472
476
|
def remove_archive(
|
473
|
-
|
474
|
-
|
475
|
-
|
477
|
+
self,
|
478
|
+
debug: bool = False
|
479
|
+
) -> SuccessTuple:
|
476
480
|
"""Remove a plugin's archive file."""
|
477
481
|
if not self.archive_path.exists():
|
478
482
|
return True, f"Archive file for plugin '{self}' does not exist."
|
@@ -484,9 +488,9 @@ class Plugin:
|
|
484
488
|
|
485
489
|
|
486
490
|
def remove_venv(
|
487
|
-
|
488
|
-
|
489
|
-
|
491
|
+
self,
|
492
|
+
debug: bool = False
|
493
|
+
) -> SuccessTuple:
|
490
494
|
"""Remove a plugin's virtual environment."""
|
491
495
|
if not self.venv_path.exists():
|
492
496
|
return True, f"Virtual environment for plugin '{self}' does not exist."
|
@@ -608,9 +612,9 @@ class Plugin:
|
|
608
612
|
|
609
613
|
|
610
614
|
def get_dependencies(
|
611
|
-
|
612
|
-
|
613
|
-
|
615
|
+
self,
|
616
|
+
debug: bool = False,
|
617
|
+
) -> List[str]:
|
614
618
|
"""
|
615
619
|
If the Plugin has specified dependencies in a list called `required`, return the list.
|
616
620
|
|
meerschaum/utils/_get_pipes.py
CHANGED
@@ -16,19 +16,18 @@ from meerschaum.utils.typing import (
|
|
16
16
|
__pdoc__ = {'get_pipes': True, 'fetch_pipes_keys': True}
|
17
17
|
|
18
18
|
def get_pipes(
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
) -> Union[PipesDict, List[mrsm.Pipe]]:
|
19
|
+
connector_keys: Union[str, List[str], None] = None,
|
20
|
+
metric_keys: Union[str, List[str], None] = None,
|
21
|
+
location_keys: Union[str, List[str], None] = None,
|
22
|
+
tags: Optional[List[str]] = None,
|
23
|
+
params: Optional[Dict[str, Any]] = None,
|
24
|
+
mrsm_instance: Union[str, InstanceConnector, None] = None,
|
25
|
+
instance: Union[str, InstanceConnector, None] = None,
|
26
|
+
as_list: bool = False,
|
27
|
+
method: str = 'registered',
|
28
|
+
debug: bool = False,
|
29
|
+
**kw: Any
|
30
|
+
) -> Union[PipesDict, List[mrsm.Pipe]]:
|
32
31
|
"""
|
33
32
|
Return a dictionary or list of `meerschaum.Pipe` objects.
|
34
33
|
|
@@ -72,10 +71,6 @@ def get_pipes(
|
|
72
71
|
If `'all'`, create pipes from predefined metrics and locations. Required `connector_keys`.
|
73
72
|
**NOTE:** Method `'all'` is not implemented!
|
74
73
|
|
75
|
-
wait: bool, default False
|
76
|
-
Wait for a connection before getting Pipes. Should only be true for cases where the
|
77
|
-
database might not be running (like the API).
|
78
|
-
|
79
74
|
**kw: Any:
|
80
75
|
Keyword arguments to pass to the `meerschaum.Pipe` constructor.
|
81
76
|
|
@@ -133,15 +128,14 @@ def get_pipes(
|
|
133
128
|
location_keys = [location_keys]
|
134
129
|
|
135
130
|
### Get SQL or API connector (keys come from `connector.fetch_pipes_keys()`).
|
136
|
-
### If `wait`, wait until a connection is made
|
137
131
|
if mrsm_instance is None:
|
138
132
|
mrsm_instance = instance
|
139
133
|
if mrsm_instance is None:
|
140
134
|
mrsm_instance = get_config('meerschaum', 'instance', patch=True)
|
141
135
|
if isinstance(mrsm_instance, str):
|
142
136
|
from meerschaum.connectors.parse import parse_instance_keys
|
143
|
-
connector = parse_instance_keys(keys=mrsm_instance,
|
144
|
-
else:
|
137
|
+
connector = parse_instance_keys(keys=mrsm_instance, debug=debug)
|
138
|
+
else:
|
145
139
|
from meerschaum.connectors import instance_types
|
146
140
|
valid_connector = False
|
147
141
|
if hasattr(mrsm_instance, 'type'):
|