meerschaum 2.7.5__tar.gz → 2.7.7__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {meerschaum-2.7.5/meerschaum.egg-info → meerschaum-2.7.7}/PKG-INFO +17 -5
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/_internal/shell/Shell.py +4 -6
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/_internal/shell/ShellCompleter.py +6 -5
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/actions/clear.py +6 -3
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/actions/copy.py +33 -27
- meerschaum-2.7.7/meerschaum/actions/drop.py +164 -0
- meerschaum-2.7.7/meerschaum/actions/index.py +71 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/actions/register.py +8 -12
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/actions/sql.py +1 -1
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/actions/sync.py +22 -18
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/dash/pipes.py +2 -3
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/routes/_pipes.py +18 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/routes/_plugins.py +1 -1
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/routes/_users.py +62 -61
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/config/_default.py +5 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/config/_version.py +1 -1
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/connectors/api/_misc.py +3 -2
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/connectors/api/_pipes.py +28 -9
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/connectors/sql/_SQLConnector.py +7 -3
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/connectors/sql/_create_engine.py +1 -1
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/connectors/sql/_fetch.py +4 -9
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/connectors/sql/_instance.py +3 -3
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/connectors/sql/_pipes.py +292 -76
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/connectors/sql/_plugins.py +11 -16
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/connectors/sql/_sql.py +13 -9
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/connectors/sql/_uri.py +9 -9
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/connectors/sql/_users.py +10 -12
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/connectors/sql/tables/__init__.py +13 -14
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/core/Pipe/__init__.py +12 -2
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/core/Pipe/_attributes.py +32 -38
- meerschaum-2.7.7/meerschaum/core/Pipe/_drop.py +118 -0
- meerschaum-2.7.7/meerschaum/core/Pipe/_index.py +68 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/jobs/_Job.py +1 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/plugins/__init__.py +7 -3
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/utils/daemon/Daemon.py +5 -1
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/utils/daemon/__init__.py +2 -2
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/utils/dtypes/sql.py +2 -2
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/utils/misc.py +7 -6
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/utils/packages/__init__.py +31 -27
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/utils/packages/_packages.py +1 -1
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/utils/prompt.py +54 -36
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/utils/sql.py +80 -34
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/utils/venv/__init__.py +12 -3
- {meerschaum-2.7.5 → meerschaum-2.7.7/meerschaum.egg-info}/PKG-INFO +17 -5
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum.egg-info/SOURCES.txt +2 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum.egg-info/requires.txt +3 -3
- {meerschaum-2.7.5 → meerschaum-2.7.7}/tests/test_pipes_dtypes.py +0 -1
- {meerschaum-2.7.5 → meerschaum-2.7.7}/tests/test_sync.py +100 -0
- meerschaum-2.7.5/meerschaum/actions/drop.py +0 -86
- meerschaum-2.7.5/meerschaum/core/Pipe/_drop.py +0 -47
- {meerschaum-2.7.5 → meerschaum-2.7.7}/LICENSE +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/NOTICE +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/README.md +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/__main__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/_internal/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/_internal/arguments/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/_internal/arguments/_parse_arguments.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/_internal/arguments/_parser.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/_internal/docs/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/_internal/docs/index.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/_internal/entry.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/_internal/gui/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/_internal/gui/app/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/_internal/gui/app/_windows.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/_internal/gui/app/actions.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/_internal/gui/app/pipes.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/_internal/shell/ValidAutoSuggest.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/_internal/shell/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/_internal/shell/resources/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/_internal/shell/updates.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/_internal/term/TermPageHandler.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/_internal/term/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/_internal/term/tools.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/actions/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/actions/api.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/actions/attach.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/actions/bootstrap.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/actions/deduplicate.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/actions/delete.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/actions/edit.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/actions/install.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/actions/login.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/actions/os.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/actions/pause.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/actions/python.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/actions/reload.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/actions/restart.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/actions/setup.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/actions/sh.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/actions/show.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/actions/stack.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/actions/start.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/actions/stop.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/actions/tag.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/actions/uninstall.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/actions/upgrade.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/actions/verify.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/_chain.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/_events.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/_oauth2.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/_websockets.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/dash/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/dash/assets/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/dash/assets/ansi_up.js +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/dash/assets/banner_1920x320.png +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/dash/assets/favicon.ico +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/dash/assets/logo_48x48.png +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/dash/assets/logo_500x500.png +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/dash/callbacks/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/dash/callbacks/custom.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/dash/callbacks/dashboard.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/dash/callbacks/jobs.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/dash/callbacks/login.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/dash/callbacks/pipes.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/dash/callbacks/plugins.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/dash/callbacks/register.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/dash/components.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/dash/connectors.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/dash/graphs.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/dash/jobs.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/dash/keys.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/dash/pages/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/dash/pages/dashboard.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/dash/pages/error.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/dash/pages/job.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/dash/pages/login.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/dash/pages/pipes.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/dash/pages/plugins.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/dash/pages/register.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/dash/plugins.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/dash/sessions.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/dash/sync.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/dash/users.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/dash/websockets.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/dash/webterm.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/models/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/models/_interfaces.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/models/_locations.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/models/_metrics.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/models/_pipes.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/resources/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/resources/static/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/resources/static/css/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/resources/static/css/bootstrap.min.css +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/resources/static/css/dash.css +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/resources/static/css/dbc_dark.css +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/resources/static/css/styles.css +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/resources/static/css/xterm.css +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/resources/static/ico/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/resources/static/ico/logo.ico +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/resources/static/js/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/resources/static/js/action_button.js +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/resources/static/js/main.js +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/resources/static/js/terminado.js +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/resources/static/js/xterm.js +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/resources/static/png/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/resources/templates/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/resources/templates/index.html +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/resources/templates/old_index.html +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/resources/templates/secret.html +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/resources/templates/termpage.html +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/routes/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/routes/_actions.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/routes/_connectors.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/routes/_index.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/routes/_jobs.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/routes/_login.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/routes/_misc.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/routes/_version.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/routes/_webterm.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/api/tables/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/config/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/config/_dash.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/config/_edit.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/config/_environment.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/config/_formatting.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/config/_jobs.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/config/_patch.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/config/_paths.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/config/_preprocess.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/config/_read_config.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/config/_shell.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/config/_sync.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/config/paths.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/config/resources/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/config/stack/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/config/stack/grafana/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/config/stack/mosquitto/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/config/stack/mosquitto/resources/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/config/stack/resources/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/config/static/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/connectors/_Connector.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/connectors/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/connectors/api/_APIConnector.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/connectors/api/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/connectors/api/_actions.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/connectors/api/_fetch.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/connectors/api/_jobs.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/connectors/api/_login.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/connectors/api/_plugins.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/connectors/api/_request.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/connectors/api/_uri.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/connectors/api/_users.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/connectors/parse.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/connectors/plugin/PluginConnector.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/connectors/plugin/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/connectors/poll.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/connectors/sql/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/connectors/sql/_cli.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/connectors/sql/tables/types.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/connectors/sql/tools.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/connectors/valkey/_ValkeyConnector.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/connectors/valkey/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/connectors/valkey/_fetch.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/connectors/valkey/_pipes.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/connectors/valkey/_plugins.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/connectors/valkey/_users.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/core/Pipe/_bootstrap.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/core/Pipe/_clear.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/core/Pipe/_copy.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/core/Pipe/_data.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/core/Pipe/_deduplicate.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/core/Pipe/_delete.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/core/Pipe/_dtypes.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/core/Pipe/_edit.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/core/Pipe/_fetch.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/core/Pipe/_register.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/core/Pipe/_show.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/core/Pipe/_sync.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/core/Pipe/_verify.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/core/Plugin/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/core/User/_User.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/core/User/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/core/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/jobs/_Executor.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/jobs/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/jobs/systemd.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/plugins/_Plugin.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/plugins/bootstrap.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/utils/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/utils/_get_pipes.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/utils/daemon/FileDescriptorInterceptor.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/utils/daemon/RotatingFile.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/utils/daemon/StdinFile.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/utils/daemon/_names.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/utils/dataframe.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/utils/debug.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/utils/dtypes/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/utils/formatting/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/utils/formatting/_jobs.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/utils/formatting/_pipes.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/utils/formatting/_pprint.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/utils/formatting/_shell.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/utils/interactive.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/utils/networking.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/utils/packages/lazy_loader.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/utils/pool.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/utils/process.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/utils/schedule.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/utils/threading.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/utils/typing.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/utils/venv/_Venv.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/utils/warnings.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum/utils/yaml.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum.egg-info/dependency_links.txt +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum.egg-info/entry_points.txt +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum.egg-info/top_level.txt +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/meerschaum.egg-info/zip-safe +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/setup.cfg +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/setup.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/tests/test_actions.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/tests/test_arguments.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/tests/test_deduplicate.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/tests/test_jobs.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/tests/test_pipe_data.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/tests/test_sql.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/tests/test_users.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.7}/tests/test_verify.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.2
|
2
2
|
Name: meerschaum
|
3
|
-
Version: 2.7.
|
3
|
+
Version: 2.7.7
|
4
4
|
Summary: Sync Time-Series Pipes with Meerschaum
|
5
5
|
Home-page: https://meerschaum.io
|
6
6
|
Author: Bennett Meares
|
@@ -127,7 +127,7 @@ Provides-Extra: sql
|
|
127
127
|
Requires-Dist: numpy>=1.18.5; extra == "sql"
|
128
128
|
Requires-Dist: pandas[parquet]>=2.0.1; extra == "sql"
|
129
129
|
Requires-Dist: pyarrow>=16.1.0; extra == "sql"
|
130
|
-
Requires-Dist: dask[complete]>=2024.
|
130
|
+
Requires-Dist: dask[complete]>=2024.12.1; extra == "sql"
|
131
131
|
Requires-Dist: partd>=1.4.2; extra == "sql"
|
132
132
|
Requires-Dist: pytz; extra == "sql"
|
133
133
|
Requires-Dist: joblib>=0.17.0; extra == "sql"
|
@@ -187,7 +187,7 @@ Requires-Dist: valkey>=6.0.0; extra == "api"
|
|
187
187
|
Requires-Dist: numpy>=1.18.5; extra == "api"
|
188
188
|
Requires-Dist: pandas[parquet]>=2.0.1; extra == "api"
|
189
189
|
Requires-Dist: pyarrow>=16.1.0; extra == "api"
|
190
|
-
Requires-Dist: dask[complete]>=2024.
|
190
|
+
Requires-Dist: dask[complete]>=2024.12.1; extra == "api"
|
191
191
|
Requires-Dist: partd>=1.4.2; extra == "api"
|
192
192
|
Requires-Dist: pytz; extra == "api"
|
193
193
|
Requires-Dist: joblib>=0.17.0; extra == "api"
|
@@ -292,7 +292,7 @@ Requires-Dist: pycparser>=2.21.0; extra == "full"
|
|
292
292
|
Requires-Dist: numpy>=1.18.5; extra == "full"
|
293
293
|
Requires-Dist: pandas[parquet]>=2.0.1; extra == "full"
|
294
294
|
Requires-Dist: pyarrow>=16.1.0; extra == "full"
|
295
|
-
Requires-Dist: dask[complete]>=2024.
|
295
|
+
Requires-Dist: dask[complete]>=2024.12.1; extra == "full"
|
296
296
|
Requires-Dist: partd>=1.4.2; extra == "full"
|
297
297
|
Requires-Dist: pytz; extra == "full"
|
298
298
|
Requires-Dist: joblib>=0.17.0; extra == "full"
|
@@ -318,6 +318,18 @@ Requires-Dist: python-multipart>=0.0.9; extra == "full"
|
|
318
318
|
Requires-Dist: httpx>=0.27.2; extra == "full"
|
319
319
|
Requires-Dist: httpcore>=1.0.6; extra == "full"
|
320
320
|
Requires-Dist: valkey>=6.0.0; extra == "full"
|
321
|
+
Dynamic: author
|
322
|
+
Dynamic: author-email
|
323
|
+
Dynamic: classifier
|
324
|
+
Dynamic: description
|
325
|
+
Dynamic: description-content-type
|
326
|
+
Dynamic: home-page
|
327
|
+
Dynamic: license
|
328
|
+
Dynamic: maintainer-email
|
329
|
+
Dynamic: project-url
|
330
|
+
Dynamic: provides-extra
|
331
|
+
Dynamic: requires-python
|
332
|
+
Dynamic: summary
|
321
333
|
|
322
334
|
<img src="https://meerschaum.io/assets/banner_1920x320.png" alt="Meerschaum banner" style="width: 100%"/>
|
323
335
|
|
@@ -742,8 +742,7 @@ class Shell(cmd.Cmd):
|
|
742
742
|
"""
|
743
743
|
from meerschaum import get_connector
|
744
744
|
from meerschaum.connectors.parse import parse_instance_keys
|
745
|
-
from meerschaum.utils.warnings import
|
746
|
-
from meerschaum.utils.misc import remove_ansi
|
745
|
+
from meerschaum.utils.warnings import info
|
747
746
|
|
748
747
|
if action is None:
|
749
748
|
action = []
|
@@ -829,7 +828,7 @@ class Shell(cmd.Cmd):
|
|
829
828
|
"""
|
830
829
|
from meerschaum import get_connector
|
831
830
|
from meerschaum.connectors.parse import parse_repo_keys
|
832
|
-
from meerschaum.utils.warnings import
|
831
|
+
from meerschaum.utils.warnings import info
|
833
832
|
|
834
833
|
if action is None:
|
835
834
|
action = []
|
@@ -878,7 +877,6 @@ class Shell(cmd.Cmd):
|
|
878
877
|
|
879
878
|
Note that executors are API instances.
|
880
879
|
"""
|
881
|
-
from meerschaum import get_connector
|
882
880
|
from meerschaum.connectors.parse import parse_executor_keys
|
883
881
|
from meerschaum.utils.warnings import warn, info
|
884
882
|
from meerschaum.jobs import get_executor_keys_from_context
|
@@ -894,7 +892,7 @@ class Shell(cmd.Cmd):
|
|
894
892
|
executor_keys = get_executor_keys_from_context()
|
895
893
|
|
896
894
|
if executor_keys == 'systemd' and get_executor_keys_from_context() != 'systemd':
|
897
|
-
warn(
|
895
|
+
warn("Cannot execute via `systemd`, falling back to `local`...", stack=False)
|
898
896
|
executor_keys = 'local'
|
899
897
|
|
900
898
|
conn = parse_executor_keys(executor_keys, debug=debug)
|
@@ -935,7 +933,7 @@ class Shell(cmd.Cmd):
|
|
935
933
|
if args['action'][0] not in shell_attrs['_actions']:
|
936
934
|
try:
|
937
935
|
print(textwrap.dedent(getattr(self, f"do_{args['action'][0]}").__doc__))
|
938
|
-
except Exception
|
936
|
+
except Exception:
|
939
937
|
print(f"No help on '{args['action'][0]}'.")
|
940
938
|
return ""
|
941
939
|
parse_help(args)
|
@@ -7,13 +7,15 @@ Implement the prompt_toolkit Completer base class.
|
|
7
7
|
"""
|
8
8
|
|
9
9
|
from __future__ import annotations
|
10
|
-
from
|
11
|
-
from meerschaum.utils.typing import Optional
|
12
|
-
from meerschaum.actions import get_shell, get_completer, get_main_action_name, get_action
|
10
|
+
from meerschaum.actions import get_shell, get_main_action_name, get_action
|
13
11
|
from meerschaum._internal.arguments import parse_line
|
14
12
|
|
15
13
|
from meerschaum.utils.packages import attempt_import, ensure_readline
|
16
|
-
|
14
|
+
|
15
|
+
prompt_toolkit_completion = attempt_import('prompt_toolkit.completion', lazy=False, install=True)
|
16
|
+
Completer = prompt_toolkit_completion.Completer
|
17
|
+
Completion = prompt_toolkit_completion.Completion
|
18
|
+
|
17
19
|
|
18
20
|
class ShellCompleter(Completer):
|
19
21
|
"""
|
@@ -30,7 +32,6 @@ class ShellCompleter(Completer):
|
|
30
32
|
yielded = []
|
31
33
|
ensure_readline()
|
32
34
|
parts = document.text.split('-')
|
33
|
-
ends_with_space = parts[0].endswith(' ')
|
34
35
|
last_action_line = parts[0].split('+')[-1]
|
35
36
|
part_0_subbed_spaces = last_action_line.replace(' ', '_')
|
36
37
|
parsed_text = (part_0_subbed_spaces + '-'.join(parts[1:]))
|
@@ -130,12 +130,15 @@ def _ask_with_rowcounts(
|
|
130
130
|
)
|
131
131
|
|
132
132
|
|
133
|
-
pipes_rowcounts = {
|
133
|
+
pipes_rowcounts = {
|
134
|
+
pipe: pipe.get_rowcount(begin=begin, end=end, debug=debug)
|
135
|
+
for pipe in pipes
|
136
|
+
}
|
134
137
|
print_options(
|
135
|
-
[str(
|
138
|
+
[str(pipe) + f'\n{rowcount:,}\n' for pipe, rowcount in pipes_rowcounts.items()],
|
136
139
|
header='Number of Rows to be Deleted'
|
137
140
|
)
|
138
|
-
total_num_rows = sum([
|
141
|
+
total_num_rows = sum([rowcount for rowcount in pipes_rowcounts.values()])
|
139
142
|
question = (
|
140
143
|
f"Are you sure you want to delete {total_num_rows:,} rows across {len(pipes)} pipe"
|
141
144
|
+ ('s' if len(pipes) != 1 else '')
|
@@ -7,7 +7,7 @@ Functions for copying elements.
|
|
7
7
|
"""
|
8
8
|
|
9
9
|
from __future__ import annotations
|
10
|
-
from meerschaum.utils.typing import
|
10
|
+
from meerschaum.utils.typing import Any, SuccessTuple, Optional, List
|
11
11
|
|
12
12
|
def copy(
|
13
13
|
action: Optional[List[str]] = None,
|
@@ -69,44 +69,53 @@ def _copy_pipes(
|
|
69
69
|
Copy pipes' attributes and make new pipes.
|
70
70
|
"""
|
71
71
|
from meerschaum import get_pipes, Pipe
|
72
|
-
from meerschaum.utils.prompt import prompt, yes_no
|
72
|
+
from meerschaum.utils.prompt import prompt, yes_no, get_connectors_completer
|
73
73
|
from meerschaum.utils.warnings import warn
|
74
74
|
from meerschaum.utils.formatting import print_tuple
|
75
75
|
from meerschaum.utils.formatting._shell import clear_screen
|
76
76
|
pipes = get_pipes(as_list=True, **kw)
|
77
77
|
successes = 0
|
78
|
-
for
|
79
|
-
ck = prompt(
|
80
|
-
|
81
|
-
|
78
|
+
for pipe in pipes:
|
79
|
+
ck = prompt(
|
80
|
+
f"Connector keys for copy of {pipe}:",
|
81
|
+
default=pipe.connector_keys,
|
82
|
+
completer=get_connectors_completer(),
|
83
|
+
)
|
84
|
+
mk = prompt(f"Metric key for copy of {pipe}:", default=pipe.metric_key)
|
85
|
+
lk = prompt(
|
86
|
+
f"Location key for copy of {pipe} ('None' to omit):",
|
87
|
+
default=str(pipe.location_key),
|
88
|
+
)
|
82
89
|
if lk in ('', 'None', '[None]'):
|
83
90
|
lk = None
|
84
|
-
|
85
|
-
ck, mk, lk,
|
86
|
-
parameters=p.parameters.copy(),
|
87
|
-
)
|
91
|
+
|
88
92
|
instance_keys = prompt(
|
89
|
-
f"Meerschaum instance
|
90
|
-
default=
|
93
|
+
f"Meerschaum instance for copy of {pipe}:",
|
94
|
+
default=pipe.instance_keys
|
91
95
|
)
|
92
|
-
|
93
|
-
|
94
|
-
|
96
|
+
new_pipe = Pipe(
|
97
|
+
ck, mk, lk,
|
98
|
+
instance=instance_keys,
|
99
|
+
parameters=pipe.parameters.copy(),
|
100
|
+
)
|
101
|
+
|
102
|
+
if new_pipe.get_id(debug=debug) is not None:
|
103
|
+
warn(f"{new_pipe} already exists. Skipping...", stack=False)
|
95
104
|
continue
|
96
|
-
_register_success_tuple =
|
105
|
+
_register_success_tuple = new_pipe.register(debug=debug)
|
97
106
|
if not _register_success_tuple[0]:
|
98
|
-
warn(f"Failed to register new {
|
107
|
+
warn(f"Failed to register new {new_pipe}.", stack=False)
|
99
108
|
continue
|
100
109
|
|
101
110
|
clear_screen(debug=debug)
|
102
111
|
successes += 1
|
103
112
|
print_tuple(
|
104
|
-
(True, f"Successfully copied attributes of {
|
113
|
+
(True, f"Successfully copied attributes of {pipe} " + f" into {new_pipe}.")
|
105
114
|
)
|
106
115
|
if (
|
107
116
|
force or yes_no(
|
108
117
|
(
|
109
|
-
f"Do you want to copy data from {
|
118
|
+
f"Do you want to copy data from {pipe} into {new_pipe}?\n\n"
|
110
119
|
+ "If you specified `--begin`, `--end` or `--params`, data will be filtered."
|
111
120
|
),
|
112
121
|
noask=noask,
|
@@ -114,8 +123,8 @@ def _copy_pipes(
|
|
114
123
|
default='n',
|
115
124
|
)
|
116
125
|
):
|
117
|
-
|
118
|
-
|
126
|
+
new_pipe.sync(
|
127
|
+
pipe.get_data(
|
119
128
|
debug=debug,
|
120
129
|
as_iterator=True,
|
121
130
|
**kw
|
@@ -142,17 +151,14 @@ def _copy_connectors(
|
|
142
151
|
) -> SuccessTuple:
|
143
152
|
"""
|
144
153
|
Create a new connector from an existing one.
|
145
|
-
|
146
154
|
"""
|
147
|
-
import os, pathlib
|
148
155
|
from meerschaum.utils.prompt import yes_no, prompt
|
149
156
|
from meerschaum.connectors.parse import parse_connector_keys
|
150
157
|
from meerschaum.config import _config, get_config
|
151
|
-
from meerschaum.
|
152
|
-
from meerschaum.utils.warnings import info, warn
|
158
|
+
from meerschaum.utils.warnings import info
|
153
159
|
from meerschaum.utils.formatting import pprint
|
154
160
|
from meerschaum.actions import get_action
|
155
|
-
|
161
|
+
_ = _config()
|
156
162
|
if action is None:
|
157
163
|
action = []
|
158
164
|
if connector_keys is None:
|
@@ -170,7 +176,7 @@ def _copy_connectors(
|
|
170
176
|
|
171
177
|
try:
|
172
178
|
conn = parse_connector_keys(ck)
|
173
|
-
except Exception
|
179
|
+
except Exception:
|
174
180
|
return False, f"Unable to parse connector '{ck}'."
|
175
181
|
|
176
182
|
if len(_keys) == 2:
|
@@ -0,0 +1,164 @@
|
|
1
|
+
#! /usr/bin/env python
|
2
|
+
# -*- coding: utf-8 -*-
|
3
|
+
# vim:fenc=utf-8
|
4
|
+
"""
|
5
|
+
Functions for dropping elements
|
6
|
+
"""
|
7
|
+
|
8
|
+
from __future__ import annotations
|
9
|
+
from meerschaum.utils.typing import SuccessTuple, Any, Optional, List
|
10
|
+
|
11
|
+
|
12
|
+
def drop(
|
13
|
+
action: Optional[List[str]] = None,
|
14
|
+
**kw: Any
|
15
|
+
) -> SuccessTuple:
|
16
|
+
"""
|
17
|
+
Drop pipe data (maintaining registration) or tables.
|
18
|
+
"""
|
19
|
+
from meerschaum.actions import choose_subaction
|
20
|
+
options = {
|
21
|
+
'pipes' : _drop_pipes,
|
22
|
+
'indices': _drop_indices,
|
23
|
+
'index': _drop_indices,
|
24
|
+
'indexes': _drop_indices,
|
25
|
+
}
|
26
|
+
return choose_subaction(action, options, **kw)
|
27
|
+
|
28
|
+
|
29
|
+
def _drop_pipes(
|
30
|
+
action: Optional[List[str]] = None,
|
31
|
+
yes: bool = False,
|
32
|
+
force: bool = False,
|
33
|
+
noask: bool = False,
|
34
|
+
debug: bool = False,
|
35
|
+
**kw: Any
|
36
|
+
) -> SuccessTuple:
|
37
|
+
"""
|
38
|
+
Drop pipes' tables but keep pipe metadata registration.
|
39
|
+
"""
|
40
|
+
from meerschaum.utils.prompt import yes_no
|
41
|
+
from meerschaum import get_pipes
|
42
|
+
from meerschaum.utils.warnings import warn
|
43
|
+
from meerschaum.utils.debug import dprint
|
44
|
+
from meerschaum.utils.formatting import pprint
|
45
|
+
|
46
|
+
pipes = get_pipes(as_list=True, debug=debug, **kw)
|
47
|
+
if len(pipes) == 0:
|
48
|
+
return False, "No pipes to drop."
|
49
|
+
|
50
|
+
question = (
|
51
|
+
"Are you sure you want to drop these tables?\n "
|
52
|
+
"Data will be lost and will need to be resynced.\n\n"
|
53
|
+
)
|
54
|
+
seen_targets = set()
|
55
|
+
for pipe in pipes:
|
56
|
+
target = pipe.target
|
57
|
+
if target in seen_targets:
|
58
|
+
continue
|
59
|
+
question += f" - {target}" + "\n"
|
60
|
+
seen_targets.add(target)
|
61
|
+
|
62
|
+
question += '\n'
|
63
|
+
if force:
|
64
|
+
answer = True
|
65
|
+
else:
|
66
|
+
answer = yes_no(question, default='n', noask=noask, yes=yes)
|
67
|
+
|
68
|
+
if not answer:
|
69
|
+
return False, "No pipes were dropped."
|
70
|
+
|
71
|
+
success_dict = {}
|
72
|
+
successes, fails = 0, 0
|
73
|
+
msg = ""
|
74
|
+
|
75
|
+
for pipe in pipes:
|
76
|
+
drop_success, drop_msg = pipe.drop(debug=debug)
|
77
|
+
success_dict[pipe] = drop_msg
|
78
|
+
if drop_success:
|
79
|
+
successes += 1
|
80
|
+
else:
|
81
|
+
fails += 1
|
82
|
+
warn(drop_msg, stack=False)
|
83
|
+
|
84
|
+
if debug:
|
85
|
+
dprint("Results for dropping pipes.")
|
86
|
+
pprint(success_dict)
|
87
|
+
|
88
|
+
msg = (
|
89
|
+
f"Finished dropping {len(pipes)} pipes"
|
90
|
+
+ ('s' if len(pipes) != 1 else '')
|
91
|
+
+ f"\n ({successes} succeeded, {fails} failed)."
|
92
|
+
)
|
93
|
+
return successes > 0, msg
|
94
|
+
|
95
|
+
|
96
|
+
def _drop_indices(
|
97
|
+
action: Optional[List[str]] = None,
|
98
|
+
yes: bool = False,
|
99
|
+
force: bool = False,
|
100
|
+
noask: bool = False,
|
101
|
+
debug: bool = False,
|
102
|
+
**kw: Any
|
103
|
+
) -> SuccessTuple:
|
104
|
+
"""
|
105
|
+
Drop pipes' tables but keep pipe metadata registration.
|
106
|
+
"""
|
107
|
+
from meerschaum.utils.prompt import yes_no
|
108
|
+
from meerschaum import get_pipes
|
109
|
+
from meerschaum.utils.warnings import warn
|
110
|
+
from meerschaum.utils.debug import dprint
|
111
|
+
from meerschaum.utils.formatting import pprint
|
112
|
+
|
113
|
+
pipes = get_pipes(as_list=True, debug=debug, **kw)
|
114
|
+
if len(pipes) == 0:
|
115
|
+
return False, "No pipes to drop."
|
116
|
+
|
117
|
+
question = "Are you sure you want to drop these indices?\n"
|
118
|
+
for pipe in pipes:
|
119
|
+
indices = pipe.get_indices()
|
120
|
+
if not indices:
|
121
|
+
continue
|
122
|
+
question += f"\n{pipe}\n"
|
123
|
+
for ix_key, index_name in indices.items():
|
124
|
+
question += f" - {index_name}\n"
|
125
|
+
|
126
|
+
question += '\n'
|
127
|
+
if force:
|
128
|
+
answer = True
|
129
|
+
else:
|
130
|
+
answer = yes_no(question, default='n', noask=noask, yes=yes)
|
131
|
+
|
132
|
+
if not answer:
|
133
|
+
return False, "No pipes were dropped."
|
134
|
+
|
135
|
+
success_dict = {}
|
136
|
+
successes, fails = 0, 0
|
137
|
+
msg = ""
|
138
|
+
|
139
|
+
for pipe in pipes:
|
140
|
+
drop_success, drop_msg = pipe.drop_indices(debug=debug)
|
141
|
+
success_dict[pipe] = drop_msg
|
142
|
+
if drop_success:
|
143
|
+
successes += 1
|
144
|
+
else:
|
145
|
+
fails += 1
|
146
|
+
warn(drop_msg, stack=False)
|
147
|
+
|
148
|
+
if debug:
|
149
|
+
dprint("Results for dropping indices.")
|
150
|
+
pprint(success_dict)
|
151
|
+
|
152
|
+
msg = (
|
153
|
+
f"Finished dropping indices for {len(pipes)} pipe"
|
154
|
+
+ ('s' if len(pipes) != 1 else '')
|
155
|
+
+ f"\n ({successes} succeeded, {fails} failed)."
|
156
|
+
)
|
157
|
+
return successes > 0, msg
|
158
|
+
|
159
|
+
|
160
|
+
### NOTE: This must be the final statement of the module.
|
161
|
+
### Any subactions added below these lines will not
|
162
|
+
### be added to the `help` docstring.
|
163
|
+
from meerschaum.actions import choices_docstring as _choices_docstring
|
164
|
+
drop.__doc__ += _choices_docstring('drop')
|
@@ -0,0 +1,71 @@
|
|
1
|
+
#! /usr/bin/env python
|
2
|
+
# -*- coding: utf-8 -*-
|
3
|
+
# vim:fenc=utf-8
|
4
|
+
|
5
|
+
"""
|
6
|
+
Functions for indexing tables.
|
7
|
+
"""
|
8
|
+
|
9
|
+
from __future__ import annotations
|
10
|
+
from meerschaum.utils.typing import SuccessTuple, Any, Optional, List
|
11
|
+
|
12
|
+
|
13
|
+
def index(
|
14
|
+
action: Optional[List[str]] = None,
|
15
|
+
**kw: Any
|
16
|
+
) -> SuccessTuple:
|
17
|
+
"""
|
18
|
+
Create pipes' indices.
|
19
|
+
"""
|
20
|
+
from meerschaum.actions import choose_subaction
|
21
|
+
options = {
|
22
|
+
'pipes' : _index_pipes,
|
23
|
+
}
|
24
|
+
return choose_subaction(action, options, **kw)
|
25
|
+
|
26
|
+
|
27
|
+
def _index_pipes(
|
28
|
+
action: Optional[List[str]] = None,
|
29
|
+
yes: bool = False,
|
30
|
+
force: bool = False,
|
31
|
+
noask: bool = False,
|
32
|
+
debug: bool = False,
|
33
|
+
**kw: Any
|
34
|
+
) -> SuccessTuple:
|
35
|
+
"""
|
36
|
+
Create pipes' indices.
|
37
|
+
"""
|
38
|
+
from meerschaum import get_pipes
|
39
|
+
from meerschaum.utils.warnings import warn, info
|
40
|
+
|
41
|
+
pipes = get_pipes(as_list=True, debug=debug, **kw)
|
42
|
+
if len(pipes) == 0:
|
43
|
+
return False, "No pipes to index."
|
44
|
+
|
45
|
+
success_dict = {}
|
46
|
+
successes, fails = 0, 0
|
47
|
+
msg = ""
|
48
|
+
|
49
|
+
for pipe in pipes:
|
50
|
+
info(f"Creating indices for {pipe}...")
|
51
|
+
index_success, index_msg = pipe.create_indices(debug=debug)
|
52
|
+
success_dict[pipe] = index_msg
|
53
|
+
if index_success:
|
54
|
+
successes += 1
|
55
|
+
else:
|
56
|
+
fails += 1
|
57
|
+
warn(index_msg, stack=False)
|
58
|
+
|
59
|
+
msg = (
|
60
|
+
f"Finished indexing {len(pipes)} pipes"
|
61
|
+
+ ('s' if len(pipes) != 1 else '')
|
62
|
+
+ f"\n ({successes} succeeded, {fails} failed)."
|
63
|
+
)
|
64
|
+
return successes > 0, msg
|
65
|
+
|
66
|
+
|
67
|
+
### NOTE: This must be the final statement of the module.
|
68
|
+
### Any subactions added below these lines will not
|
69
|
+
### be added to the `help` docstring.
|
70
|
+
from meerschaum.actions import choices_docstring as _choices_docstring
|
71
|
+
index.__doc__ += _choices_docstring('index')
|
@@ -10,6 +10,7 @@ from __future__ import annotations
|
|
10
10
|
import meerschaum as mrsm
|
11
11
|
from meerschaum.utils.typing import SuccessTuple, Any, List, Optional, Dict
|
12
12
|
|
13
|
+
|
13
14
|
def register(
|
14
15
|
action: Optional[List[str]] = None,
|
15
16
|
**kw: Any
|
@@ -70,10 +71,9 @@ def _register_pipes(
|
|
70
71
|
`connector_keys` and `metric_keys`.
|
71
72
|
If `location_keys` is empty, assume [`None`].
|
72
73
|
"""
|
73
|
-
from meerschaum import get_pipes
|
74
|
+
from meerschaum import get_pipes
|
74
75
|
from meerschaum.utils.debug import dprint
|
75
|
-
from meerschaum.utils.warnings import warn
|
76
|
-
from meerschaum.utils.misc import items_str
|
76
|
+
from meerschaum.utils.warnings import warn
|
77
77
|
from meerschaum.config._patch import apply_patch_to_config
|
78
78
|
|
79
79
|
if connector_keys is None:
|
@@ -164,10 +164,8 @@ def _register_plugins(
|
|
164
164
|
from meerschaum.utils.debug import dprint
|
165
165
|
from meerschaum.plugins import reload_plugins, get_plugins_names
|
166
166
|
from meerschaum.connectors.parse import parse_repo_keys
|
167
|
-
from meerschaum.
|
168
|
-
from meerschaum.utils.warnings import warn, error, info
|
167
|
+
from meerschaum.utils.warnings import warn, info
|
169
168
|
from meerschaum.core import Plugin
|
170
|
-
from meerschaum import get_connector
|
171
169
|
from meerschaum.utils.formatting import print_tuple
|
172
170
|
from meerschaum.utils.prompt import prompt, yes_no
|
173
171
|
|
@@ -179,7 +177,7 @@ def _register_plugins(
|
|
179
177
|
repo_connector = parse_repo_keys(repository)
|
180
178
|
if repo_connector.__dict__.get('type', None) != 'api':
|
181
179
|
return False, (
|
182
|
-
|
180
|
+
"Can only upload plugins to the Meerschaum API." +
|
183
181
|
f"Connector '{repo_connector}' is of type " +
|
184
182
|
f"'{repo_connector.get('type', type(repo_connector))}'."
|
185
183
|
)
|
@@ -283,13 +281,11 @@ def _register_users(
|
|
283
281
|
"""
|
284
282
|
from meerschaum.config import get_config
|
285
283
|
from meerschaum.config.static import STATIC_CONFIG
|
286
|
-
from meerschaum import get_connector
|
287
284
|
from meerschaum.connectors.parse import parse_instance_keys
|
288
|
-
from meerschaum.utils.
|
289
|
-
from meerschaum.utils.warnings import warn, error, info
|
285
|
+
from meerschaum.utils.warnings import warn, info
|
290
286
|
from meerschaum.core import User
|
291
287
|
from meerschaum.utils.formatting import print_tuple
|
292
|
-
from meerschaum.utils.prompt import
|
288
|
+
from meerschaum.utils.prompt import get_password, get_email
|
293
289
|
if mrsm_instance is None:
|
294
290
|
mrsm_instance = get_config('meerschaum', 'instance')
|
295
291
|
instance_connector = parse_instance_keys(mrsm_instance)
|
@@ -325,7 +321,7 @@ def _register_users(
|
|
325
321
|
minimum_length = STATIC_CONFIG['users']['min_password_length']
|
326
322
|
)
|
327
323
|
email = get_email(username, allow_omit=True)
|
328
|
-
except Exception
|
324
|
+
except Exception:
|
329
325
|
return False, (
|
330
326
|
"Aborted registering users " +
|
331
327
|
', '.join(
|
@@ -127,7 +127,7 @@ def sql(
|
|
127
127
|
|
128
128
|
from meerschaum.utils.packages import attempt_import
|
129
129
|
from meerschaum.utils.formatting import print_tuple, pprint
|
130
|
-
_ = attempt_import('sqlalchemy.engine.result')
|
130
|
+
_ = attempt_import('sqlalchemy.engine.result', lazy=False)
|
131
131
|
if 'sqlalchemy' in str(type(result)):
|
132
132
|
if not nopretty:
|
133
133
|
print_tuple((True, f"Successfully executed query:\n\n{query}"))
|
@@ -275,12 +275,14 @@ def _sync_pipes(
|
|
275
275
|
import time
|
276
276
|
import os
|
277
277
|
import contextlib
|
278
|
+
from datetime import timedelta
|
278
279
|
|
279
280
|
from meerschaum.utils.warnings import warn, info
|
280
281
|
from meerschaum.utils.formatting._shell import progress
|
281
282
|
from meerschaum.utils.formatting._shell import clear_screen
|
282
283
|
from meerschaum.utils.formatting import print_pipes_results
|
283
284
|
from meerschaum.config.static import STATIC_CONFIG
|
285
|
+
from meerschaum.utils.misc import interval_str
|
284
286
|
|
285
287
|
noninteractive_val = os.environ.get(STATIC_CONFIG['environment']['noninteractive'], None)
|
286
288
|
noninteractive = str(noninteractive_val).lower() in ('1', 'true', 'yes')
|
@@ -321,7 +323,7 @@ def _sync_pipes(
|
|
321
323
|
for pipe, (_success, _msg) in results_dict.items()
|
322
324
|
if not _success
|
323
325
|
]
|
324
|
-
except Exception
|
326
|
+
except Exception:
|
325
327
|
import traceback
|
326
328
|
traceback.print_exc()
|
327
329
|
warn(
|
@@ -351,9 +353,9 @@ def _sync_pipes(
|
|
351
353
|
success_msg = (
|
352
354
|
"Successfully spawned threads for pipes:"
|
353
355
|
if unblock
|
354
|
-
else
|
356
|
+
else "Successfully synced pipes:"
|
355
357
|
)
|
356
|
-
fail_msg =
|
358
|
+
fail_msg = "Failed to sync pipes:"
|
357
359
|
if results_dict:
|
358
360
|
print_pipes_results(
|
359
361
|
results_dict,
|
@@ -362,8 +364,10 @@ def _sync_pipes(
|
|
362
364
|
nopretty = nopretty,
|
363
365
|
)
|
364
366
|
|
367
|
+
lap_duration_text = interval_str(timedelta(seconds=(lap_end - lap_begin)))
|
368
|
+
|
365
369
|
msg = (
|
366
|
-
f"It took {
|
370
|
+
f"It took {lap_duration_text} to sync " +
|
367
371
|
f"{len(success_pipes) + len(failure_pipes)} pipe" +
|
368
372
|
("s" if (len(success_pipes) + len(failure_pipes)) != 1 else "") + "\n" +
|
369
373
|
f" ({len(success_pipes)} succeeded, {len(failure_pipes)} failed)."
|
@@ -385,26 +389,26 @@ def _sync_pipes(
|
|
385
389
|
|
386
390
|
|
387
391
|
def _wrap_pipe(
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
392
|
+
pipe,
|
393
|
+
unblock: bool = False,
|
394
|
+
force: bool = False,
|
395
|
+
debug: bool = False,
|
396
|
+
min_seconds: int = 1,
|
397
|
+
workers = None,
|
398
|
+
verify: bool = False,
|
399
|
+
deduplicate: bool = False,
|
400
|
+
bounded: Optional[bool] = None,
|
401
|
+
chunk_interval: Union[timedelta, int, None] = None,
|
402
|
+
**kw
|
403
|
+
):
|
400
404
|
"""
|
401
405
|
Wrapper function for handling exceptions.
|
402
406
|
"""
|
403
407
|
import time
|
404
408
|
import traceback
|
405
|
-
from datetime import datetime,
|
409
|
+
from datetime import datetime, timezone
|
406
410
|
import meerschaum as mrsm
|
407
|
-
from meerschaum.utils.typing import is_success_tuple
|
411
|
+
from meerschaum.utils.typing import is_success_tuple
|
408
412
|
from meerschaum.connectors import get_connector_plugin
|
409
413
|
from meerschaum.utils.venv import Venv
|
410
414
|
from meerschaum.plugins import _pre_sync_hooks, _post_sync_hooks
|