meerschaum 2.7.4__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.4/meerschaum.egg-info → meerschaum-2.7.6}/PKG-INFO +4 -4
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/_internal/shell/Shell.py +4 -6
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/_internal/shell/ShellCompleter.py +6 -5
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/actions/clear.py +6 -3
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/actions/copy.py +33 -27
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/actions/sql.py +14 -4
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/actions/sync.py +22 -18
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/dash/pipes.py +2 -3
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/config/_default.py +11 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/config/_version.py +1 -1
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/connectors/api/_misc.py +3 -2
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/connectors/api/_pipes.py +8 -9
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/connectors/sql/_SQLConnector.py +1 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/connectors/sql/_cli.py +18 -12
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/connectors/sql/_create_engine.py +1 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/connectors/sql/_pipes.py +51 -14
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/connectors/sql/_sql.py +109 -16
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/jobs/_Job.py +1 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/plugins/__init__.py +7 -3
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/utils/daemon/Daemon.py +11 -3
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/utils/daemon/__init__.py +2 -2
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/utils/misc.py +7 -6
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/utils/packages/__init__.py +35 -28
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/utils/packages/_packages.py +1 -1
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/utils/prompt.py +54 -36
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/utils/venv/_Venv.py +6 -1
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/utils/venv/__init__.py +32 -16
- {meerschaum-2.7.4 → meerschaum-2.7.6/meerschaum.egg-info}/PKG-INFO +4 -4
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum.egg-info/requires.txt +3 -3
- {meerschaum-2.7.4 → meerschaum-2.7.6}/tests/test_jobs.py +3 -6
- {meerschaum-2.7.4 → meerschaum-2.7.6}/tests/test_pipes_dtypes.py +1 -4
- {meerschaum-2.7.4 → meerschaum-2.7.6}/LICENSE +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/NOTICE +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/README.md +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/__init__.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/__main__.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/_internal/__init__.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/_internal/arguments/__init__.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/_internal/arguments/_parse_arguments.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/_internal/arguments/_parser.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/_internal/docs/__init__.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/_internal/docs/index.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/_internal/entry.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/_internal/gui/__init__.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/_internal/gui/app/__init__.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/_internal/gui/app/_windows.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/_internal/gui/app/actions.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/_internal/gui/app/pipes.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/_internal/shell/ValidAutoSuggest.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/_internal/shell/__init__.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/_internal/shell/resources/__init__.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/_internal/shell/updates.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/_internal/term/TermPageHandler.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/_internal/term/__init__.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/_internal/term/tools.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/actions/__init__.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/actions/api.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/actions/attach.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/actions/bootstrap.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/actions/deduplicate.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/actions/delete.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/actions/drop.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/actions/edit.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/actions/install.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/actions/login.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/actions/os.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/actions/pause.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/actions/python.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/actions/register.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/actions/reload.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/actions/restart.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/actions/setup.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/actions/sh.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/actions/show.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/actions/stack.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/actions/start.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/actions/stop.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/actions/tag.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/actions/uninstall.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/actions/upgrade.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/actions/verify.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/__init__.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/_chain.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/_events.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/_oauth2.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/_websockets.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/dash/__init__.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/dash/assets/__init__.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/dash/assets/ansi_up.js +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/dash/assets/banner_1920x320.png +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/dash/assets/favicon.ico +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/dash/assets/logo_48x48.png +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/dash/assets/logo_500x500.png +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/dash/callbacks/__init__.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/dash/callbacks/custom.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/dash/callbacks/dashboard.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/dash/callbacks/jobs.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/dash/callbacks/login.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/dash/callbacks/pipes.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/dash/callbacks/plugins.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/dash/callbacks/register.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/dash/components.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/dash/connectors.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/dash/graphs.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/dash/jobs.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/dash/keys.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/dash/pages/__init__.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/dash/pages/dashboard.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/dash/pages/error.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/dash/pages/job.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/dash/pages/login.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/dash/pages/pipes.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/dash/pages/plugins.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/dash/pages/register.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/dash/plugins.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/dash/sessions.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/dash/sync.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/dash/users.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/dash/websockets.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/dash/webterm.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/models/__init__.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/models/_interfaces.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/models/_locations.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/models/_metrics.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/models/_pipes.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/resources/__init__.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/resources/static/__init__.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/resources/static/css/__init__.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/resources/static/css/bootstrap.min.css +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/resources/static/css/dash.css +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/resources/static/css/dbc_dark.css +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/resources/static/css/styles.css +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/resources/static/css/xterm.css +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/resources/static/ico/__init__.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/resources/static/ico/logo.ico +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/resources/static/js/__init__.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/resources/static/js/action_button.js +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/resources/static/js/main.js +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/resources/static/js/terminado.js +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/resources/static/js/xterm.js +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/resources/static/png/__init__.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/resources/templates/__init__.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/resources/templates/index.html +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/resources/templates/old_index.html +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/resources/templates/secret.html +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/resources/templates/termpage.html +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/routes/__init__.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/routes/_actions.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/routes/_connectors.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/routes/_index.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/routes/_jobs.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/routes/_login.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/routes/_misc.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/routes/_pipes.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/routes/_plugins.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/routes/_users.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/routes/_version.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/routes/_webterm.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/api/tables/__init__.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/config/__init__.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/config/_dash.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/config/_edit.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/config/_environment.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/config/_formatting.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/config/_jobs.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/config/_patch.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/config/_paths.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/config/_preprocess.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/config/_read_config.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/config/_shell.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/config/_sync.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/config/paths.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/config/resources/__init__.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/config/stack/__init__.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/config/stack/grafana/__init__.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/config/stack/mosquitto/__init__.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/config/stack/mosquitto/resources/__init__.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/config/stack/resources/__init__.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/config/static/__init__.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/connectors/_Connector.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/connectors/__init__.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/connectors/api/_APIConnector.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/connectors/api/__init__.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/connectors/api/_actions.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/connectors/api/_fetch.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/connectors/api/_jobs.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/connectors/api/_login.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/connectors/api/_plugins.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/connectors/api/_request.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/connectors/api/_uri.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/connectors/api/_users.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/connectors/parse.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/connectors/plugin/PluginConnector.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/connectors/plugin/__init__.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/connectors/poll.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/connectors/sql/__init__.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/connectors/sql/_fetch.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/connectors/sql/_instance.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/connectors/sql/_plugins.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/connectors/sql/_uri.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/connectors/sql/_users.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/connectors/sql/tables/__init__.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/connectors/sql/tables/types.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/connectors/sql/tools.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/connectors/valkey/_ValkeyConnector.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/connectors/valkey/__init__.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/connectors/valkey/_fetch.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/connectors/valkey/_pipes.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/connectors/valkey/_plugins.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/connectors/valkey/_users.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/core/Pipe/__init__.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/core/Pipe/_attributes.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/core/Pipe/_bootstrap.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/core/Pipe/_clear.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/core/Pipe/_copy.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/core/Pipe/_data.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/core/Pipe/_deduplicate.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/core/Pipe/_delete.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/core/Pipe/_drop.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/core/Pipe/_dtypes.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/core/Pipe/_edit.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/core/Pipe/_fetch.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/core/Pipe/_register.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/core/Pipe/_show.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/core/Pipe/_sync.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/core/Pipe/_verify.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/core/Plugin/__init__.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/core/User/_User.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/core/User/__init__.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/core/__init__.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/jobs/_Executor.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/jobs/__init__.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/jobs/systemd.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/plugins/_Plugin.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/plugins/bootstrap.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/utils/__init__.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/utils/_get_pipes.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/utils/daemon/FileDescriptorInterceptor.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/utils/daemon/RotatingFile.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/utils/daemon/StdinFile.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/utils/daemon/_names.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/utils/dataframe.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/utils/debug.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/utils/dtypes/__init__.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/utils/dtypes/sql.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/utils/formatting/__init__.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/utils/formatting/_jobs.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/utils/formatting/_pipes.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/utils/formatting/_pprint.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/utils/formatting/_shell.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/utils/interactive.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/utils/networking.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/utils/packages/lazy_loader.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/utils/pool.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/utils/process.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/utils/schedule.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/utils/sql.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/utils/threading.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/utils/typing.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/utils/warnings.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum/utils/yaml.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum.egg-info/SOURCES.txt +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum.egg-info/dependency_links.txt +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum.egg-info/entry_points.txt +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum.egg-info/top_level.txt +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/meerschaum.egg-info/zip-safe +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/setup.cfg +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/setup.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/tests/test_actions.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/tests/test_arguments.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/tests/test_deduplicate.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/tests/test_pipe_data.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/tests/test_sql.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/tests/test_sync.py +0 -0
- {meerschaum-2.7.4 → meerschaum-2.7.6}/tests/test_users.py +0 -0
- {meerschaum-2.7.4 → 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:
|
@@ -21,7 +21,7 @@ def sql(
|
|
21
21
|
nopretty: bool = False,
|
22
22
|
debug: bool = False,
|
23
23
|
**kw: Any
|
24
|
-
):
|
24
|
+
) -> SuccessTuple:
|
25
25
|
"""Execute a SQL query or launch an interactive CLI. All positional arguments are optional.
|
26
26
|
|
27
27
|
Usage:
|
@@ -125,10 +125,9 @@ def sql(
|
|
125
125
|
if result is False:
|
126
126
|
return (False, f"Failed to execute query:\n\n{query}")
|
127
127
|
|
128
|
-
from meerschaum.utils.packages import attempt_import
|
128
|
+
from meerschaum.utils.packages import attempt_import
|
129
129
|
from meerschaum.utils.formatting import print_tuple, pprint
|
130
|
-
|
131
|
-
pd = import_pandas()
|
130
|
+
_ = attempt_import('sqlalchemy.engine.result')
|
132
131
|
if 'sqlalchemy' in str(type(result)):
|
133
132
|
if not nopretty:
|
134
133
|
print_tuple((True, f"Successfully executed query:\n\n{query}"))
|
@@ -145,3 +144,14 @@ def sql(
|
|
145
144
|
)
|
146
145
|
|
147
146
|
return (True, "Success")
|
147
|
+
|
148
|
+
|
149
|
+
def _complete_sql(
|
150
|
+
action: Optional[List[str]] = None, **kw: Any
|
151
|
+
) -> List[str]:
|
152
|
+
from meerschaum.utils.misc import get_connector_labels
|
153
|
+
_text = action[0] if action else ""
|
154
|
+
return [
|
155
|
+
label.split('sql:', maxsplit=1)[-1]
|
156
|
+
for label in get_connector_labels('sql', search_term=_text, ignore_exact_match=True)
|
157
|
+
]
|
@@ -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))])
|
@@ -68,8 +68,19 @@ default_system_config = {
|
|
68
68
|
'pandas': 'pandas',
|
69
69
|
},
|
70
70
|
'sql': {
|
71
|
+
'bulk_insert': {
|
72
|
+
'postgresql': True,
|
73
|
+
'citus': True,
|
74
|
+
'timescaledb': True,
|
75
|
+
'mssql': True,
|
76
|
+
},
|
71
77
|
'instance': {
|
72
78
|
'stale_temporary_tables_minutes': 1440,
|
79
|
+
'temporary_target': {
|
80
|
+
'prefix': '_',
|
81
|
+
'transaction_id_length': 4,
|
82
|
+
'separator': '_',
|
83
|
+
},
|
73
84
|
},
|
74
85
|
'chunksize': 100_000,
|
75
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
|
|
@@ -26,46 +26,52 @@ flavor_clis = {
|
|
26
26
|
'duckdb' : 'gadwall',
|
27
27
|
}
|
28
28
|
cli_deps = {
|
29
|
-
'pgcli': ['pgspecial', 'pendulum'],
|
29
|
+
'pgcli': ['pgspecial', 'pendulum', 'cli_helpers'],
|
30
30
|
'mycli': ['cryptography'],
|
31
|
+
'mssql': ['cli_helpers'],
|
31
32
|
}
|
32
33
|
|
33
34
|
|
34
35
|
def cli(
|
35
|
-
|
36
|
-
|
37
|
-
|
36
|
+
self,
|
37
|
+
debug: bool = False,
|
38
|
+
) -> SuccessTuple:
|
38
39
|
"""
|
39
40
|
Launch a subprocess for an interactive CLI.
|
40
41
|
"""
|
42
|
+
from meerschaum.utils.warnings import dprint
|
41
43
|
from meerschaum.utils.venv import venv_exec
|
42
44
|
env = copy.deepcopy(dict(os.environ))
|
43
|
-
|
45
|
+
env_key = f"MRSM_SQL_{self.label.upper()}"
|
46
|
+
env_val = json.dumps(self.meta)
|
47
|
+
env[env_key] = env_val
|
44
48
|
cli_code = (
|
45
49
|
"import sys\n"
|
46
50
|
"import meerschaum as mrsm\n"
|
51
|
+
"import os\n"
|
47
52
|
f"conn = mrsm.get_connector('sql:{self.label}')\n"
|
48
53
|
"success, msg = conn._cli_exit()\n"
|
49
54
|
"mrsm.pprint((success, msg))\n"
|
50
55
|
"if not success:\n"
|
51
56
|
" raise Exception(msg)"
|
52
57
|
)
|
58
|
+
if debug:
|
59
|
+
dprint(cli_code)
|
53
60
|
try:
|
54
|
-
_ = venv_exec(cli_code, venv=None, debug=debug, capture_output=False)
|
61
|
+
_ = venv_exec(cli_code, venv=None, env=env, debug=debug, capture_output=False)
|
55
62
|
except Exception as e:
|
56
63
|
return False, f"[{self}] Failed to start CLI:\n{e}"
|
57
64
|
return True, "Success"
|
58
65
|
|
59
66
|
|
60
67
|
def _cli_exit(
|
61
|
-
|
62
|
-
|
63
|
-
|
68
|
+
self,
|
69
|
+
debug: bool = False
|
70
|
+
) -> SuccessTuple:
|
64
71
|
"""Launch an interactive CLI for the SQLConnector's flavor."""
|
65
|
-
|
72
|
+
import os
|
73
|
+
from meerschaum.utils.packages import attempt_import
|
66
74
|
from meerschaum.utils.debug import dprint
|
67
|
-
from meerschaum.utils.warnings import error
|
68
|
-
import sys, subprocess, os
|
69
75
|
|
70
76
|
if self.flavor not in flavor_clis:
|
71
77
|
return False, f"No CLI available for flavor '{self.flavor}'."
|