meerschaum 2.7.5__tar.gz → 2.7.6__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.6}/PKG-INFO +4 -4
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/_internal/shell/Shell.py +4 -6
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/_internal/shell/ShellCompleter.py +6 -5
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/actions/clear.py +6 -3
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/actions/copy.py +33 -27
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/actions/sync.py +22 -18
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/dash/pipes.py +2 -3
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/config/_default.py +5 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/config/_version.py +1 -1
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/connectors/api/_misc.py +3 -2
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/connectors/api/_pipes.py +8 -9
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/connectors/sql/_SQLConnector.py +1 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/connectors/sql/_pipes.py +37 -10
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/connectors/sql/_sql.py +9 -1
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/jobs/_Job.py +1 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/plugins/__init__.py +7 -3
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/utils/daemon/Daemon.py +5 -1
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/utils/daemon/__init__.py +2 -2
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/utils/misc.py +7 -6
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/utils/packages/__init__.py +31 -27
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/utils/packages/_packages.py +1 -1
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/utils/prompt.py +54 -36
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/utils/venv/__init__.py +12 -3
- {meerschaum-2.7.5 → meerschaum-2.7.6/meerschaum.egg-info}/PKG-INFO +4 -4
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum.egg-info/requires.txt +3 -3
- {meerschaum-2.7.5 → meerschaum-2.7.6}/tests/test_jobs.py +1 -1
- {meerschaum-2.7.5 → meerschaum-2.7.6}/tests/test_pipes_dtypes.py +0 -1
- {meerschaum-2.7.5 → meerschaum-2.7.6}/LICENSE +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/NOTICE +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/README.md +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/__main__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/_internal/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/_internal/arguments/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/_internal/arguments/_parse_arguments.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/_internal/arguments/_parser.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/_internal/docs/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/_internal/docs/index.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/_internal/entry.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/_internal/gui/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/_internal/gui/app/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/_internal/gui/app/_windows.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/_internal/gui/app/actions.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/_internal/gui/app/pipes.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/_internal/shell/ValidAutoSuggest.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/_internal/shell/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/_internal/shell/resources/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/_internal/shell/updates.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/_internal/term/TermPageHandler.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/_internal/term/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/_internal/term/tools.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/actions/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/actions/api.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/actions/attach.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/actions/bootstrap.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/actions/deduplicate.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/actions/delete.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/actions/drop.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/actions/edit.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/actions/install.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/actions/login.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/actions/os.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/actions/pause.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/actions/python.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/actions/register.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/actions/reload.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/actions/restart.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/actions/setup.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/actions/sh.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/actions/show.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/actions/sql.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/actions/stack.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/actions/start.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/actions/stop.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/actions/tag.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/actions/uninstall.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/actions/upgrade.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/actions/verify.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/_chain.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/_events.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/_oauth2.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/_websockets.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/dash/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/dash/assets/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/dash/assets/ansi_up.js +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/dash/assets/banner_1920x320.png +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/dash/assets/favicon.ico +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/dash/assets/logo_48x48.png +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/dash/assets/logo_500x500.png +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/dash/callbacks/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/dash/callbacks/custom.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/dash/callbacks/dashboard.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/dash/callbacks/jobs.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/dash/callbacks/login.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/dash/callbacks/pipes.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/dash/callbacks/plugins.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/dash/callbacks/register.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/dash/components.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/dash/connectors.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/dash/graphs.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/dash/jobs.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/dash/keys.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/dash/pages/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/dash/pages/dashboard.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/dash/pages/error.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/dash/pages/job.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/dash/pages/login.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/dash/pages/pipes.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/dash/pages/plugins.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/dash/pages/register.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/dash/plugins.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/dash/sessions.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/dash/sync.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/dash/users.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/dash/websockets.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/dash/webterm.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/models/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/models/_interfaces.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/models/_locations.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/models/_metrics.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/models/_pipes.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/resources/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/resources/static/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/resources/static/css/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/resources/static/css/bootstrap.min.css +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/resources/static/css/dash.css +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/resources/static/css/dbc_dark.css +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/resources/static/css/styles.css +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/resources/static/css/xterm.css +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/resources/static/ico/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/resources/static/ico/logo.ico +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/resources/static/js/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/resources/static/js/action_button.js +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/resources/static/js/main.js +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/resources/static/js/terminado.js +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/resources/static/js/xterm.js +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/resources/static/png/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/resources/templates/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/resources/templates/index.html +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/resources/templates/old_index.html +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/resources/templates/secret.html +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/resources/templates/termpage.html +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/routes/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/routes/_actions.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/routes/_connectors.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/routes/_index.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/routes/_jobs.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/routes/_login.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/routes/_misc.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/routes/_pipes.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/routes/_plugins.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/routes/_users.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/routes/_version.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/routes/_webterm.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/api/tables/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/config/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/config/_dash.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/config/_edit.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/config/_environment.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/config/_formatting.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/config/_jobs.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/config/_patch.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/config/_paths.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/config/_preprocess.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/config/_read_config.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/config/_shell.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/config/_sync.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/config/paths.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/config/resources/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/config/stack/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/config/stack/grafana/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/config/stack/mosquitto/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/config/stack/mosquitto/resources/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/config/stack/resources/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/config/static/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/connectors/_Connector.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/connectors/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/connectors/api/_APIConnector.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/connectors/api/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/connectors/api/_actions.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/connectors/api/_fetch.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/connectors/api/_jobs.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/connectors/api/_login.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/connectors/api/_plugins.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/connectors/api/_request.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/connectors/api/_uri.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/connectors/api/_users.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/connectors/parse.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/connectors/plugin/PluginConnector.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/connectors/plugin/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/connectors/poll.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/connectors/sql/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/connectors/sql/_cli.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/connectors/sql/_create_engine.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/connectors/sql/_fetch.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/connectors/sql/_instance.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/connectors/sql/_plugins.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/connectors/sql/_uri.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/connectors/sql/_users.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/connectors/sql/tables/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/connectors/sql/tables/types.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/connectors/sql/tools.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/connectors/valkey/_ValkeyConnector.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/connectors/valkey/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/connectors/valkey/_fetch.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/connectors/valkey/_pipes.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/connectors/valkey/_plugins.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/connectors/valkey/_users.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/core/Pipe/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/core/Pipe/_attributes.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/core/Pipe/_bootstrap.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/core/Pipe/_clear.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/core/Pipe/_copy.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/core/Pipe/_data.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/core/Pipe/_deduplicate.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/core/Pipe/_delete.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/core/Pipe/_drop.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/core/Pipe/_dtypes.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/core/Pipe/_edit.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/core/Pipe/_fetch.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/core/Pipe/_register.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/core/Pipe/_show.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/core/Pipe/_sync.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/core/Pipe/_verify.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/core/Plugin/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/core/User/_User.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/core/User/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/core/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/jobs/_Executor.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/jobs/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/jobs/systemd.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/plugins/_Plugin.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/plugins/bootstrap.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/utils/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/utils/_get_pipes.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/utils/daemon/FileDescriptorInterceptor.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/utils/daemon/RotatingFile.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/utils/daemon/StdinFile.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/utils/daemon/_names.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/utils/dataframe.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/utils/debug.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/utils/dtypes/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/utils/dtypes/sql.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/utils/formatting/__init__.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/utils/formatting/_jobs.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/utils/formatting/_pipes.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/utils/formatting/_pprint.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/utils/formatting/_shell.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/utils/interactive.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/utils/networking.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/utils/packages/lazy_loader.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/utils/pool.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/utils/process.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/utils/schedule.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/utils/sql.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/utils/threading.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/utils/typing.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/utils/venv/_Venv.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/utils/warnings.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum/utils/yaml.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum.egg-info/SOURCES.txt +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum.egg-info/dependency_links.txt +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum.egg-info/entry_points.txt +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum.egg-info/top_level.txt +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/meerschaum.egg-info/zip-safe +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/setup.cfg +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/setup.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/tests/test_actions.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/tests/test_arguments.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/tests/test_deduplicate.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/tests/test_pipe_data.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/tests/test_sql.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/tests/test_sync.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/tests/test_users.py +0 -0
- {meerschaum-2.7.5 → meerschaum-2.7.6}/tests/test_verify.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: meerschaum
|
3
|
-
Version: 2.7.
|
3
|
+
Version: 2.7.6
|
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"
|
@@ -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:
|
@@ -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
|
@@ -12,7 +12,6 @@ import shlex
|
|
12
12
|
from textwrap import dedent
|
13
13
|
from urllib.parse import urlencode
|
14
14
|
|
15
|
-
from dash.dependencies import Input, Output, State
|
16
15
|
from meerschaum.utils.typing import List, Optional, Dict, Any, Tuple, Union
|
17
16
|
from meerschaum.utils.misc import string_to_dict
|
18
17
|
from meerschaum.utils.packages import attempt_import, import_dcc, import_html, import_pandas
|
@@ -76,7 +75,7 @@ def keys_from_state(
|
|
76
75
|
try:
|
77
76
|
# params = string_to_dict(state['params-textarea.value'])
|
78
77
|
params = string_to_dict(state['search-parameters-editor.value'])
|
79
|
-
except Exception
|
78
|
+
except Exception:
|
80
79
|
params = None
|
81
80
|
else:
|
82
81
|
params = None
|
@@ -506,7 +505,7 @@ def accordion_items_from_pipe(
|
|
506
505
|
|
507
506
|
stats_rows = []
|
508
507
|
if rowcount is not None:
|
509
|
-
stats_rows.append(html.Tr([html.Td("Row
|
508
|
+
stats_rows.append(html.Tr([html.Td("Row Count"), html.Td(f"{rowcount:,}")]))
|
510
509
|
if interval is not None:
|
511
510
|
stats_rows.append(
|
512
511
|
html.Tr([html.Td("Timespan"), html.Td(humanfriendly.format_timespan(interval))])
|
@@ -76,6 +76,11 @@ default_system_config = {
|
|
76
76
|
},
|
77
77
|
'instance': {
|
78
78
|
'stale_temporary_tables_minutes': 1440,
|
79
|
+
'temporary_target': {
|
80
|
+
'prefix': '_',
|
81
|
+
'transaction_id_length': 4,
|
82
|
+
'separator': '_',
|
83
|
+
},
|
79
84
|
},
|
80
85
|
'chunksize': 100_000,
|
81
86
|
'poolclass': 'sqlalchemy.pool.QueuePool',
|
@@ -20,12 +20,13 @@ def get_mrsm_version(self, **kw) -> Optional[str]:
|
|
20
20
|
use_token=False,
|
21
21
|
**kw
|
22
22
|
).json()
|
23
|
-
except Exception
|
23
|
+
except Exception:
|
24
24
|
return None
|
25
25
|
if isinstance(j, dict) and 'detail' in j:
|
26
26
|
return None
|
27
27
|
return j
|
28
28
|
|
29
|
+
|
29
30
|
def get_chaining_status(self, **kw) -> Optional[bool]:
|
30
31
|
"""
|
31
32
|
Fetch the chaining status of the API instance.
|
@@ -39,7 +40,7 @@ def get_chaining_status(self, **kw) -> Optional[bool]:
|
|
39
40
|
)
|
40
41
|
if not response:
|
41
42
|
return None
|
42
|
-
except Exception
|
43
|
+
except Exception:
|
43
44
|
return None
|
44
45
|
|
45
46
|
return response.json()
|
@@ -9,8 +9,7 @@ Register or fetch Pipes from the API
|
|
9
9
|
from __future__ import annotations
|
10
10
|
import time
|
11
11
|
import json
|
12
|
-
from
|
13
|
-
from datetime import datetime
|
12
|
+
from datetime import datetime, timedelta
|
14
13
|
|
15
14
|
import meerschaum as mrsm
|
16
15
|
from meerschaum.utils.debug import dprint
|
@@ -178,11 +177,11 @@ def sync_pipe(
|
|
178
177
|
"""Sync a DataFrame into a Pipe."""
|
179
178
|
from decimal import Decimal
|
180
179
|
from meerschaum.utils.debug import dprint
|
181
|
-
from meerschaum.utils.misc import json_serialize_datetime, items_str
|
180
|
+
from meerschaum.utils.misc import json_serialize_datetime, items_str, interval_str
|
182
181
|
from meerschaum.config import get_config
|
183
182
|
from meerschaum.utils.packages import attempt_import
|
184
|
-
from meerschaum.utils.dataframe import get_numeric_cols, to_json
|
185
|
-
begin = time.
|
183
|
+
from meerschaum.utils.dataframe import get_numeric_cols, to_json
|
184
|
+
begin = time.perf_counter()
|
186
185
|
more_itertools = attempt_import('more_itertools')
|
187
186
|
if df is None:
|
188
187
|
msg = f"DataFrame is `None`. Cannot sync {pipe}."
|
@@ -304,9 +303,10 @@ def sync_pipe(
|
|
304
303
|
num_success_chunks += 1
|
305
304
|
|
306
305
|
success_tuple = True, (
|
307
|
-
f"It took {
|
306
|
+
f"It took {interval_str(timedelta(seconds=(time.perf_counter() - begin)))} "
|
307
|
+
+ "to sync {rowcount:,} row"
|
308
308
|
+ ('s' if rowcount != 1 else '')
|
309
|
-
+ f" across {num_success_chunks} chunk" + ('s' if num_success_chunks != 1 else '') +
|
309
|
+
+ f" across {num_success_chunks:,} chunk" + ('s' if num_success_chunks != 1 else '') +
|
310
310
|
f" to {pipe}."
|
311
311
|
)
|
312
312
|
return success_tuple
|
@@ -549,10 +549,9 @@ def create_metadata(
|
|
549
549
|
if debug:
|
550
550
|
dprint("Create metadata response: {response.text}")
|
551
551
|
try:
|
552
|
-
|
552
|
+
_ = json.loads(response.text)
|
553
553
|
except Exception as e:
|
554
554
|
warn(f"Failed to create metadata on {self}:\n{e}")
|
555
|
-
metadata_response = False
|
556
555
|
return False
|
557
556
|
|
558
557
|
|
@@ -1505,7 +1505,6 @@ def sync_pipe(
|
|
1505
1505
|
UPDATE_QUERIES,
|
1506
1506
|
get_reset_autoincrement_queries,
|
1507
1507
|
)
|
1508
|
-
from meerschaum.utils.misc import generate_password
|
1509
1508
|
from meerschaum.utils.dtypes import are_dtypes_equal
|
1510
1509
|
from meerschaum.utils.dtypes.sql import get_db_type_from_pd_type
|
1511
1510
|
from meerschaum import Pipe
|
@@ -1720,9 +1719,7 @@ def sync_pipe(
|
|
1720
1719
|
warn(f"Could not reset auto-incrementing primary key for {pipe}.", stack=False)
|
1721
1720
|
|
1722
1721
|
if update_df is not None and len(update_df) > 0:
|
1723
|
-
|
1724
|
-
temp_prefix = '##' if self.flavor != 'oracle' else '_'
|
1725
|
-
temp_target = temp_prefix + transact_id + '_' + pipe.target
|
1722
|
+
temp_target = self.get_temporary_target(pipe.target, label='update')
|
1726
1723
|
self._log_temporary_tables_creation(temp_target, create=(not pipe.temporary), debug=debug)
|
1727
1724
|
temp_pipe = Pipe(
|
1728
1725
|
pipe.connector_keys.replace(':', '_') + '_', pipe.metric_key, pipe.location_key,
|
@@ -1743,7 +1740,7 @@ def sync_pipe(
|
|
1743
1740
|
static=True,
|
1744
1741
|
autoincrement=False,
|
1745
1742
|
parameters={
|
1746
|
-
'schema':
|
1743
|
+
'schema': self.internal_schema,
|
1747
1744
|
'hypertable': False,
|
1748
1745
|
},
|
1749
1746
|
)
|
@@ -1910,15 +1907,18 @@ def sync_pipe_inplace(
|
|
1910
1907
|
)
|
1911
1908
|
from meerschaum.utils.misc import generate_password
|
1912
1909
|
|
1913
|
-
|
1914
|
-
|
1915
|
-
|
1916
|
-
|
1910
|
+
transaction_id_length = (
|
1911
|
+
mrsm.get_config(
|
1912
|
+
'system', 'connectors', 'sql', 'instance', 'temporary_target', 'transaction_id_length'
|
1913
|
+
)
|
1914
|
+
)
|
1915
|
+
transact_id = generate_password(transaction_id_length)
|
1917
1916
|
|
1918
1917
|
internal_schema = self.internal_schema
|
1918
|
+
target = pipe.target
|
1919
1919
|
temp_table_roots = ['backtrack', 'new', 'delta', 'joined', 'unseen', 'update']
|
1920
1920
|
temp_tables = {
|
1921
|
-
table_root:
|
1921
|
+
table_root: self.get_temporary_target(target, transact_id=transact_id, label=table_root)
|
1922
1922
|
for table_root in temp_table_roots
|
1923
1923
|
}
|
1924
1924
|
temp_table_names = {
|
@@ -3626,3 +3626,30 @@ def get_pipe_schema(self, pipe: mrsm.Pipe) -> Union[str, None]:
|
|
3626
3626
|
A schema string or `None` if nothing is configured.
|
3627
3627
|
"""
|
3628
3628
|
return pipe.parameters.get('schema', self.schema)
|
3629
|
+
|
3630
|
+
|
3631
|
+
@staticmethod
|
3632
|
+
def get_temporary_target(
|
3633
|
+
target: str,
|
3634
|
+
transact_id: Optional[str, None] = None,
|
3635
|
+
label: Optional[str] = None,
|
3636
|
+
separator: Optional[str] = None,
|
3637
|
+
) -> str:
|
3638
|
+
"""
|
3639
|
+
Return a unique(ish) temporary target for a pipe.
|
3640
|
+
"""
|
3641
|
+
from meerschaum.utils.misc import generate_password
|
3642
|
+
temp_target_cf = (
|
3643
|
+
mrsm.get_config('system', 'connectors', 'sql', 'instance', 'temporary_target') or {}
|
3644
|
+
)
|
3645
|
+
transaction_id_len = temp_target_cf.get('transaction_id_length', 3)
|
3646
|
+
transact_id = transact_id or generate_password(transaction_id_len)
|
3647
|
+
temp_prefix = temp_target_cf.get('prefix', '_')
|
3648
|
+
separator = separator or temp_target_cf.get('separator', '_')
|
3649
|
+
return (
|
3650
|
+
temp_prefix
|
3651
|
+
+ target
|
3652
|
+
+ separator
|
3653
|
+
+ transact_id
|
3654
|
+
+ ((separator + label) if label else '')
|
3655
|
+
)
|
@@ -778,6 +778,7 @@ def to_sql(
|
|
778
778
|
import time
|
779
779
|
import json
|
780
780
|
from decimal import Decimal
|
781
|
+
from datetime import timedelta
|
781
782
|
from meerschaum.utils.warnings import error, warn
|
782
783
|
import warnings
|
783
784
|
import functools
|
@@ -816,6 +817,7 @@ def to_sql(
|
|
816
817
|
PD_TO_SQLALCHEMY_DTYPES_FLAVORS,
|
817
818
|
get_db_type_from_pd_type,
|
818
819
|
)
|
820
|
+
from meerschaum.utils.misc import interval_str
|
819
821
|
from meerschaum.connectors.sql._create_engine import flavor_configs
|
820
822
|
from meerschaum.utils.packages import attempt_import, import_pandas
|
821
823
|
sqlalchemy = attempt_import('sqlalchemy', debug=debug)
|
@@ -998,7 +1000,13 @@ def to_sql(
|
|
998
1000
|
|
999
1001
|
end = time.perf_counter()
|
1000
1002
|
if success:
|
1001
|
-
|
1003
|
+
num_rows = len(df)
|
1004
|
+
msg = (
|
1005
|
+
f"It took {interval_str(timedelta(seconds=(end - start)))} "
|
1006
|
+
+ f"to sync {num_rows:,} row"
|
1007
|
+
+ ('s' if num_rows != 1 else '')
|
1008
|
+
+ f" to {name}."
|
1009
|
+
)
|
1002
1010
|
stats['start'] = start
|
1003
1011
|
stats['end'] = end
|
1004
1012
|
stats['duration'] = end - start
|
@@ -126,8 +126,8 @@ def pre_sync_hook(
|
|
126
126
|
|
127
127
|
|
128
128
|
def post_sync_hook(
|
129
|
-
|
130
|
-
|
129
|
+
function: Callable[[Any], Any],
|
130
|
+
) -> Callable[[Any], Any]:
|
131
131
|
"""
|
132
132
|
Register a function as a sync hook to be executed upon completion of a sync.
|
133
133
|
|
@@ -143,10 +143,14 @@ def post_sync_hook(
|
|
143
143
|
Examples
|
144
144
|
--------
|
145
145
|
>>> from meerschaum.plugins import post_sync_hook
|
146
|
+
>>> from meerschaum.utils.misc import interval_str
|
147
|
+
>>> from datetime import timedelta
|
146
148
|
>>>
|
147
149
|
>>> @post_sync_hook
|
148
150
|
... def log_sync(pipe, success_tuple, duration=None, **kwargs):
|
149
|
-
...
|
151
|
+
... duration_delta = timedelta(seconds=duration)
|
152
|
+
... duration_text = interval_str(duration_delta)
|
153
|
+
... print(f"It took {duration_text} to sync {pipe}.")
|
150
154
|
>>>
|
151
155
|
"""
|
152
156
|
with _locks['_post_sync_hooks']:
|
@@ -1017,7 +1017,8 @@ class Daemon:
|
|
1017
1017
|
|
1018
1018
|
def read_pickle(self) -> Daemon:
|
1019
1019
|
"""Read a Daemon's pickle file and return the `Daemon`."""
|
1020
|
-
import pickle
|
1020
|
+
import pickle
|
1021
|
+
import traceback
|
1021
1022
|
if not self.pickle_path.exists():
|
1022
1023
|
error(f"Pickle file does not exist for daemon '{self.daemon_id}'.")
|
1023
1024
|
|
@@ -1053,6 +1054,9 @@ class Daemon:
|
|
1053
1054
|
if self._properties is None:
|
1054
1055
|
self._properties = {}
|
1055
1056
|
|
1057
|
+
if self._properties.get('result', None) is None:
|
1058
|
+
_ = self._properties.pop('result', None)
|
1059
|
+
|
1056
1060
|
if _file_properties is not None:
|
1057
1061
|
self._properties = apply_patch_to_config(
|
1058
1062
|
_file_properties,
|
@@ -37,7 +37,7 @@ def daemon_entry(sysargs: Optional[List[str]] = None) -> SuccessTuple:
|
|
37
37
|
filtered_sysargs = [arg for arg in sysargs if arg not in ('-d', '--daemon')]
|
38
38
|
try:
|
39
39
|
label = shlex.join(filtered_sysargs) if sysargs else None
|
40
|
-
except Exception
|
40
|
+
except Exception:
|
41
41
|
label = ' '.join(filtered_sysargs) if sysargs else None
|
42
42
|
|
43
43
|
name = _args.get('name', None)
|
@@ -45,7 +45,7 @@ def daemon_entry(sysargs: Optional[List[str]] = None) -> SuccessTuple:
|
|
45
45
|
if name:
|
46
46
|
try:
|
47
47
|
daemon = Daemon(daemon_id=name)
|
48
|
-
except Exception
|
48
|
+
except Exception:
|
49
49
|
daemon = None
|
50
50
|
|
51
51
|
if daemon is not None:
|