meerschaum 2.6.16__tar.gz → 2.7.0__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (276) hide show
  1. {meerschaum-2.6.16/meerschaum.egg-info → meerschaum-2.7.0}/PKG-INFO +2 -2
  2. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/_internal/arguments/_parse_arguments.py +1 -1
  3. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/actions/delete.py +65 -69
  4. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/actions/edit.py +22 -2
  5. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/actions/install.py +1 -2
  6. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/actions/sync.py +2 -3
  7. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/routes/_pipes.py +7 -8
  8. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/config/_default.py +1 -1
  9. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/config/_paths.py +2 -1
  10. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/config/_version.py +1 -1
  11. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/connectors/api/_pipes.py +18 -21
  12. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/connectors/sql/_create_engine.py +3 -3
  13. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/connectors/sql/_instance.py +11 -12
  14. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/connectors/sql/_pipes.py +143 -91
  15. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/connectors/sql/_sql.py +43 -8
  16. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/connectors/valkey/_pipes.py +12 -1
  17. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/core/Pipe/__init__.py +23 -13
  18. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/core/Pipe/_attributes.py +25 -1
  19. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/core/Pipe/_dtypes.py +23 -16
  20. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/core/Pipe/_sync.py +59 -31
  21. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/core/Pipe/_verify.py +8 -7
  22. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/jobs/_Job.py +4 -1
  23. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/plugins/_Plugin.py +11 -14
  24. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/utils/daemon/Daemon.py +22 -15
  25. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/utils/dataframe.py +178 -16
  26. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/utils/dtypes/__init__.py +149 -14
  27. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/utils/dtypes/sql.py +41 -7
  28. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/utils/misc.py +8 -8
  29. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/utils/packages/_packages.py +1 -1
  30. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/utils/schedule.py +8 -3
  31. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/utils/sql.py +180 -100
  32. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/utils/venv/_Venv.py +4 -4
  33. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/utils/venv/__init__.py +53 -20
  34. {meerschaum-2.6.16 → meerschaum-2.7.0/meerschaum.egg-info}/PKG-INFO +2 -2
  35. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum.egg-info/requires.txt +1 -1
  36. {meerschaum-2.6.16 → meerschaum-2.7.0}/tests/test_pipes_dtypes.py +158 -9
  37. {meerschaum-2.6.16 → meerschaum-2.7.0}/tests/test_sync.py +3 -2
  38. {meerschaum-2.6.16 → meerschaum-2.7.0}/LICENSE +0 -0
  39. {meerschaum-2.6.16 → meerschaum-2.7.0}/NOTICE +0 -0
  40. {meerschaum-2.6.16 → meerschaum-2.7.0}/README.md +0 -0
  41. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/__init__.py +0 -0
  42. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/__main__.py +0 -0
  43. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/_internal/__init__.py +0 -0
  44. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/_internal/arguments/__init__.py +0 -0
  45. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/_internal/arguments/_parser.py +0 -0
  46. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/_internal/docs/__init__.py +0 -0
  47. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/_internal/docs/index.py +0 -0
  48. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/_internal/entry.py +0 -0
  49. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/_internal/gui/__init__.py +0 -0
  50. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/_internal/gui/app/__init__.py +0 -0
  51. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/_internal/gui/app/_windows.py +0 -0
  52. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/_internal/gui/app/actions.py +0 -0
  53. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/_internal/gui/app/pipes.py +0 -0
  54. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/_internal/shell/Shell.py +0 -0
  55. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/_internal/shell/ShellCompleter.py +0 -0
  56. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/_internal/shell/ValidAutoSuggest.py +0 -0
  57. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/_internal/shell/__init__.py +0 -0
  58. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/_internal/shell/resources/__init__.py +0 -0
  59. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/_internal/shell/updates.py +0 -0
  60. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/_internal/term/TermPageHandler.py +0 -0
  61. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/_internal/term/__init__.py +0 -0
  62. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/_internal/term/tools.py +0 -0
  63. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/actions/__init__.py +0 -0
  64. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/actions/api.py +0 -0
  65. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/actions/attach.py +0 -0
  66. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/actions/bootstrap.py +0 -0
  67. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/actions/clear.py +0 -0
  68. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/actions/copy.py +0 -0
  69. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/actions/deduplicate.py +0 -0
  70. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/actions/drop.py +0 -0
  71. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/actions/login.py +0 -0
  72. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/actions/os.py +0 -0
  73. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/actions/pause.py +0 -0
  74. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/actions/python.py +0 -0
  75. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/actions/register.py +0 -0
  76. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/actions/reload.py +0 -0
  77. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/actions/restart.py +0 -0
  78. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/actions/setup.py +0 -0
  79. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/actions/sh.py +0 -0
  80. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/actions/show.py +0 -0
  81. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/actions/sql.py +0 -0
  82. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/actions/stack.py +0 -0
  83. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/actions/start.py +0 -0
  84. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/actions/stop.py +0 -0
  85. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/actions/tag.py +0 -0
  86. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/actions/uninstall.py +0 -0
  87. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/actions/upgrade.py +0 -0
  88. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/actions/verify.py +0 -0
  89. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/__init__.py +0 -0
  90. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/_chain.py +0 -0
  91. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/_events.py +0 -0
  92. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/_oauth2.py +0 -0
  93. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/_websockets.py +0 -0
  94. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/dash/__init__.py +0 -0
  95. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/dash/assets/__init__.py +0 -0
  96. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/dash/assets/ansi_up.js +0 -0
  97. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/dash/assets/banner_1920x320.png +0 -0
  98. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/dash/assets/favicon.ico +0 -0
  99. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/dash/assets/logo_48x48.png +0 -0
  100. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/dash/assets/logo_500x500.png +0 -0
  101. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/dash/callbacks/__init__.py +0 -0
  102. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/dash/callbacks/custom.py +0 -0
  103. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/dash/callbacks/dashboard.py +0 -0
  104. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/dash/callbacks/jobs.py +0 -0
  105. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/dash/callbacks/login.py +0 -0
  106. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/dash/callbacks/pipes.py +0 -0
  107. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/dash/callbacks/plugins.py +0 -0
  108. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/dash/callbacks/register.py +0 -0
  109. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/dash/components.py +0 -0
  110. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/dash/connectors.py +0 -0
  111. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/dash/graphs.py +0 -0
  112. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/dash/jobs.py +0 -0
  113. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/dash/keys.py +0 -0
  114. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/dash/pages/__init__.py +0 -0
  115. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/dash/pages/dashboard.py +0 -0
  116. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/dash/pages/error.py +0 -0
  117. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/dash/pages/job.py +0 -0
  118. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/dash/pages/login.py +0 -0
  119. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/dash/pages/pipes.py +0 -0
  120. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/dash/pages/plugins.py +0 -0
  121. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/dash/pages/register.py +0 -0
  122. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/dash/pipes.py +0 -0
  123. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/dash/plugins.py +0 -0
  124. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/dash/sessions.py +0 -0
  125. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/dash/sync.py +0 -0
  126. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/dash/users.py +0 -0
  127. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/dash/websockets.py +0 -0
  128. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/dash/webterm.py +0 -0
  129. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/models/__init__.py +0 -0
  130. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/models/_interfaces.py +0 -0
  131. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/models/_locations.py +0 -0
  132. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/models/_metrics.py +0 -0
  133. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/models/_pipes.py +0 -0
  134. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/resources/__init__.py +0 -0
  135. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/resources/static/__init__.py +0 -0
  136. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/resources/static/css/__init__.py +0 -0
  137. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/resources/static/css/bootstrap.min.css +0 -0
  138. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/resources/static/css/dash.css +0 -0
  139. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/resources/static/css/dbc_dark.css +0 -0
  140. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/resources/static/css/styles.css +0 -0
  141. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/resources/static/css/xterm.css +0 -0
  142. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/resources/static/ico/__init__.py +0 -0
  143. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/resources/static/ico/logo.ico +0 -0
  144. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/resources/static/js/__init__.py +0 -0
  145. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/resources/static/js/action_button.js +0 -0
  146. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/resources/static/js/main.js +0 -0
  147. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/resources/static/js/terminado.js +0 -0
  148. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/resources/static/js/xterm.js +0 -0
  149. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/resources/static/png/__init__.py +0 -0
  150. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/resources/templates/__init__.py +0 -0
  151. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/resources/templates/index.html +0 -0
  152. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/resources/templates/old_index.html +0 -0
  153. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/resources/templates/secret.html +0 -0
  154. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/resources/templates/termpage.html +0 -0
  155. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/routes/__init__.py +0 -0
  156. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/routes/_actions.py +0 -0
  157. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/routes/_connectors.py +0 -0
  158. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/routes/_index.py +0 -0
  159. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/routes/_jobs.py +0 -0
  160. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/routes/_login.py +0 -0
  161. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/routes/_misc.py +0 -0
  162. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/routes/_plugins.py +0 -0
  163. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/routes/_users.py +0 -0
  164. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/routes/_version.py +0 -0
  165. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/routes/_webterm.py +0 -0
  166. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/api/tables/__init__.py +0 -0
  167. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/config/__init__.py +0 -0
  168. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/config/_dash.py +0 -0
  169. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/config/_edit.py +0 -0
  170. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/config/_environment.py +0 -0
  171. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/config/_formatting.py +0 -0
  172. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/config/_jobs.py +0 -0
  173. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/config/_patch.py +0 -0
  174. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/config/_preprocess.py +0 -0
  175. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/config/_read_config.py +0 -0
  176. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/config/_shell.py +0 -0
  177. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/config/_sync.py +0 -0
  178. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/config/paths.py +0 -0
  179. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/config/resources/__init__.py +0 -0
  180. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/config/stack/__init__.py +0 -0
  181. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/config/stack/grafana/__init__.py +0 -0
  182. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/config/stack/mosquitto/__init__.py +0 -0
  183. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/config/stack/mosquitto/resources/__init__.py +0 -0
  184. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/config/stack/resources/__init__.py +0 -0
  185. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/config/static/__init__.py +0 -0
  186. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/connectors/_Connector.py +0 -0
  187. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/connectors/__init__.py +0 -0
  188. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/connectors/api/_APIConnector.py +0 -0
  189. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/connectors/api/__init__.py +0 -0
  190. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/connectors/api/_actions.py +0 -0
  191. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/connectors/api/_fetch.py +0 -0
  192. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/connectors/api/_jobs.py +0 -0
  193. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/connectors/api/_login.py +0 -0
  194. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/connectors/api/_misc.py +0 -0
  195. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/connectors/api/_plugins.py +0 -0
  196. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/connectors/api/_request.py +0 -0
  197. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/connectors/api/_uri.py +0 -0
  198. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/connectors/api/_users.py +0 -0
  199. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/connectors/parse.py +0 -0
  200. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/connectors/plugin/PluginConnector.py +0 -0
  201. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/connectors/plugin/__init__.py +0 -0
  202. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/connectors/poll.py +0 -0
  203. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/connectors/sql/_SQLConnector.py +0 -0
  204. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/connectors/sql/__init__.py +0 -0
  205. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/connectors/sql/_cli.py +0 -0
  206. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/connectors/sql/_fetch.py +0 -0
  207. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/connectors/sql/_plugins.py +0 -0
  208. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/connectors/sql/_uri.py +0 -0
  209. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/connectors/sql/_users.py +0 -0
  210. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/connectors/sql/tables/__init__.py +0 -0
  211. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/connectors/sql/tables/types.py +0 -0
  212. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/connectors/sql/tools.py +0 -0
  213. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/connectors/valkey/_ValkeyConnector.py +0 -0
  214. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/connectors/valkey/__init__.py +0 -0
  215. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/connectors/valkey/_fetch.py +0 -0
  216. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/connectors/valkey/_plugins.py +0 -0
  217. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/connectors/valkey/_users.py +0 -0
  218. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/core/Pipe/_bootstrap.py +0 -0
  219. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/core/Pipe/_clear.py +0 -0
  220. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/core/Pipe/_copy.py +0 -0
  221. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/core/Pipe/_data.py +0 -0
  222. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/core/Pipe/_deduplicate.py +0 -0
  223. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/core/Pipe/_delete.py +0 -0
  224. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/core/Pipe/_drop.py +0 -0
  225. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/core/Pipe/_edit.py +0 -0
  226. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/core/Pipe/_fetch.py +0 -0
  227. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/core/Pipe/_register.py +0 -0
  228. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/core/Pipe/_show.py +0 -0
  229. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/core/Plugin/__init__.py +0 -0
  230. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/core/User/_User.py +0 -0
  231. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/core/User/__init__.py +0 -0
  232. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/core/__init__.py +0 -0
  233. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/jobs/_Executor.py +0 -0
  234. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/jobs/__init__.py +0 -0
  235. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/jobs/systemd.py +0 -0
  236. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/plugins/__init__.py +0 -0
  237. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/plugins/bootstrap.py +0 -0
  238. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/utils/__init__.py +0 -0
  239. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/utils/_get_pipes.py +0 -0
  240. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/utils/daemon/FileDescriptorInterceptor.py +0 -0
  241. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/utils/daemon/RotatingFile.py +0 -0
  242. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/utils/daemon/StdinFile.py +0 -0
  243. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/utils/daemon/__init__.py +0 -0
  244. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/utils/daemon/_names.py +0 -0
  245. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/utils/debug.py +0 -0
  246. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/utils/formatting/__init__.py +0 -0
  247. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/utils/formatting/_jobs.py +0 -0
  248. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/utils/formatting/_pipes.py +0 -0
  249. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/utils/formatting/_pprint.py +0 -0
  250. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/utils/formatting/_shell.py +0 -0
  251. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/utils/interactive.py +0 -0
  252. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/utils/networking.py +0 -0
  253. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/utils/packages/__init__.py +0 -0
  254. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/utils/packages/lazy_loader.py +0 -0
  255. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/utils/pool.py +0 -0
  256. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/utils/process.py +0 -0
  257. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/utils/prompt.py +0 -0
  258. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/utils/threading.py +0 -0
  259. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/utils/typing.py +0 -0
  260. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/utils/warnings.py +0 -0
  261. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum/utils/yaml.py +0 -0
  262. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum.egg-info/SOURCES.txt +0 -0
  263. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum.egg-info/dependency_links.txt +0 -0
  264. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum.egg-info/entry_points.txt +0 -0
  265. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum.egg-info/top_level.txt +0 -0
  266. {meerschaum-2.6.16 → meerschaum-2.7.0}/meerschaum.egg-info/zip-safe +0 -0
  267. {meerschaum-2.6.16 → meerschaum-2.7.0}/setup.cfg +0 -0
  268. {meerschaum-2.6.16 → meerschaum-2.7.0}/setup.py +0 -0
  269. {meerschaum-2.6.16 → meerschaum-2.7.0}/tests/test_actions.py +0 -0
  270. {meerschaum-2.6.16 → meerschaum-2.7.0}/tests/test_arguments.py +0 -0
  271. {meerschaum-2.6.16 → meerschaum-2.7.0}/tests/test_deduplicate.py +0 -0
  272. {meerschaum-2.6.16 → meerschaum-2.7.0}/tests/test_jobs.py +0 -0
  273. {meerschaum-2.6.16 → meerschaum-2.7.0}/tests/test_pipe_data.py +0 -0
  274. {meerschaum-2.6.16 → meerschaum-2.7.0}/tests/test_sql.py +0 -0
  275. {meerschaum-2.6.16 → meerschaum-2.7.0}/tests/test_users.py +0 -0
  276. {meerschaum-2.6.16 → meerschaum-2.7.0}/tests/test_verify.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: meerschaum
3
- Version: 2.6.16
3
+ Version: 2.7.0
4
4
  Summary: Sync Time-Series Pipes with Meerschaum
5
5
  Home-page: https://meerschaum.io
6
6
  Author: Bennett Meares
@@ -80,7 +80,7 @@ Requires-Dist: duckdb>=1.0.0; extra == "drivers"
80
80
  Requires-Dist: duckdb-engine>=0.13.0; extra == "drivers"
81
81
  Provides-Extra: drivers-extras
82
82
  Requires-Dist: pyodbc>=4.0.30; extra == "drivers-extras"
83
- Requires-Dist: cx_Oracle>=8.3.0; extra == "drivers-extras"
83
+ Requires-Dist: oracledb>=2.5.0; extra == "drivers-extras"
84
84
  Provides-Extra: cli
85
85
  Requires-Dist: pgcli>=3.1.0; extra == "cli"
86
86
  Requires-Dist: mycli>=1.23.2; extra == "cli"
@@ -226,7 +226,7 @@ def parse_line(line: str) -> Dict[str, Any]:
226
226
  import shlex
227
227
  try:
228
228
  return parse_arguments(shlex.split(line))
229
- except Exception as e:
229
+ except Exception:
230
230
  return {'action': [], 'text': line}
231
231
 
232
232
 
@@ -9,6 +9,7 @@ Functions for deleting elements.
9
9
  from __future__ import annotations
10
10
  from meerschaum.utils.typing import Any, SuccessTuple, Union, Optional, List
11
11
 
12
+
12
13
  def delete(
13
14
  action: Optional[List[str]] = None,
14
15
  **kw: Any
@@ -21,7 +22,6 @@ def delete(
21
22
 
22
23
  """
23
24
  from meerschaum.actions import choose_subaction
24
- from meerschaum.utils.debug import dprint
25
25
  options = {
26
26
  'config' : _delete_config,
27
27
  'pipes' : _delete_pipes,
@@ -65,19 +65,18 @@ def _complete_delete(
65
65
 
66
66
 
67
67
  def _delete_pipes(
68
- debug: bool = False,
69
- yes: bool = False,
70
- force: bool = False,
71
- noask: bool = False,
72
- **kw: Any
73
- ) -> SuccessTuple:
68
+ debug: bool = False,
69
+ yes: bool = False,
70
+ force: bool = False,
71
+ noask: bool = False,
72
+ **kw: Any
73
+ ) -> SuccessTuple:
74
74
  """
75
75
  Drop pipes and delete their registrations.
76
-
77
76
  """
78
77
  from meerschaum import get_pipes
79
78
  from meerschaum.utils.prompt import yes_no
80
- from meerschaum.utils.formatting import pprint, highlight_pipes
79
+ from meerschaum.utils.formatting import highlight_pipes
81
80
  from meerschaum.utils.warnings import warn
82
81
  from meerschaum.actions import actions
83
82
  pipes = get_pipes(as_list=True, debug=debug, **kw)
@@ -126,21 +125,22 @@ def _delete_pipes(
126
125
 
127
126
  return successes > 0, msg
128
127
 
128
+
129
129
  def _delete_config(
130
- action: Optional[List[str]] = None,
131
- yes: bool = False,
132
- force: bool = False,
133
- noask: bool = False,
134
- debug: bool = False,
135
- **kw: Any
136
- ) -> SuccessTuple:
130
+ action: Optional[List[str]] = None,
131
+ yes: bool = False,
132
+ force: bool = False,
133
+ noask: bool = False,
134
+ debug: bool = False,
135
+ **kw: Any
136
+ ) -> SuccessTuple:
137
137
  """
138
138
  Delete configuration files.
139
-
140
139
  """
141
- import os, shutil
140
+ import os
141
+ import shutil
142
142
  from meerschaum.utils.prompt import yes_no
143
- from meerschaum.config._paths import CONFIG_DIR_PATH, STACK_COMPOSE_PATH, DEFAULT_CONFIG_DIR_PATH
143
+ from meerschaum.config._paths import STACK_COMPOSE_PATH, DEFAULT_CONFIG_DIR_PATH
144
144
  from meerschaum.config._read_config import get_possible_keys, get_keyfile_path
145
145
  from meerschaum.utils.debug import dprint
146
146
  paths = [p for p in [STACK_COMPOSE_PATH, DEFAULT_CONFIG_DIR_PATH] if p.exists()]
@@ -157,7 +157,7 @@ def _delete_config(
157
157
  else:
158
158
  sep = '\n' + ' - '
159
159
  answer = yes_no(
160
- f"Are you sure you want to delete the following configuration files?" +
160
+ "Are you sure you want to delete the following configuration files?" +
161
161
  f"{sep + sep.join([str(p) for p in paths])}\n",
162
162
  default='n', noask=noask, yes=yes
163
163
  )
@@ -176,18 +176,18 @@ def _delete_config(
176
176
 
177
177
  return success, msg
178
178
 
179
+
179
180
  def _delete_plugins(
180
- action: Optional[List[str]] = None,
181
- repository: Optional[str] = None,
182
- yes: bool = False,
183
- force: bool = False,
184
- noask: bool = False,
185
- debug: bool = False,
186
- **kw: Any
187
- ) -> SuccessTuple:
181
+ action: Optional[List[str]] = None,
182
+ repository: Optional[str] = None,
183
+ yes: bool = False,
184
+ force: bool = False,
185
+ noask: bool = False,
186
+ debug: bool = False,
187
+ **kw: Any
188
+ ) -> SuccessTuple:
188
189
  """
189
190
  Delete plugins from a Meerschaum repository.
190
-
191
191
  """
192
192
  from meerschaum.utils.warnings import info
193
193
  from meerschaum.plugins import reload_plugins
@@ -206,7 +206,7 @@ def _delete_plugins(
206
206
  ) if not force else True
207
207
 
208
208
  if not answer:
209
- return False, f"No plugins deleted."
209
+ return False, "No plugins deleted."
210
210
 
211
211
  successes = {}
212
212
  for name in action:
@@ -218,27 +218,24 @@ def _delete_plugins(
218
218
  reload_plugins(debug=debug)
219
219
  return True, "Success"
220
220
 
221
+
221
222
  def _delete_users(
222
- action: Optional[List[str]] = None,
223
- mrsm_instance: Optional[str] = None,
224
- yes: bool = False,
225
- force: bool = False,
226
- noask: bool = False,
227
- shell: bool = False,
228
- debug: bool = False,
229
- **kw
230
- ) -> SuccessTuple:
223
+ action: Optional[List[str]] = None,
224
+ mrsm_instance: Optional[str] = None,
225
+ yes: bool = False,
226
+ force: bool = False,
227
+ noask: bool = False,
228
+ shell: bool = False,
229
+ debug: bool = False,
230
+ **kw
231
+ ) -> SuccessTuple:
231
232
  """
232
233
  Delete users from a Meerschaum instance. Adequate permissions are required.
233
-
234
234
  """
235
- from meerschaum import get_connector
236
235
  from meerschaum.connectors.parse import parse_instance_keys
237
- from meerschaum.utils.prompt import yes_no, prompt
238
- from meerschaum.utils.debug import dprint
239
- from meerschaum.utils.warnings import warn, error, info
236
+ from meerschaum.utils.prompt import yes_no
237
+ from meerschaum.utils.warnings import info
240
238
  from meerschaum.core import User
241
- from meerschaum.connectors.api import APIConnector
242
239
  from meerschaum.utils.formatting import print_tuple
243
240
  instance_connector = parse_instance_keys(mrsm_instance)
244
241
 
@@ -292,24 +289,25 @@ def _delete_users(
292
289
  )
293
290
  return True, msg
294
291
 
292
+
295
293
  def _delete_connectors(
296
- action: Optional[List[str]] = None,
297
- connector_keys: Optional[List[str]] = None,
298
- yes: bool = False,
299
- force: bool = False,
300
- noask: bool = False,
301
- debug: bool = False,
302
- **kw: Any
303
- ) -> SuccessTuple:
294
+ action: Optional[List[str]] = None,
295
+ connector_keys: Optional[List[str]] = None,
296
+ yes: bool = False,
297
+ force: bool = False,
298
+ noask: bool = False,
299
+ debug: bool = False,
300
+ **kw: Any
301
+ ) -> SuccessTuple:
304
302
  """
305
303
  Delete configured connectors.
306
304
 
307
305
  Example:
308
306
  `delete connectors sql:test`
309
-
310
307
  """
311
- import os, pathlib
312
- from meerschaum.utils.prompt import yes_no, prompt
308
+ import os
309
+ import pathlib
310
+ from meerschaum.utils.prompt import yes_no
313
311
  from meerschaum.connectors.parse import parse_connector_keys
314
312
  from meerschaum.config import _config
315
313
  from meerschaum.config._edit import write_config
@@ -329,7 +327,7 @@ def _delete_connectors(
329
327
  for ck in _keys:
330
328
  try:
331
329
  conn = parse_connector_keys(ck, debug=debug)
332
- except Exception as e:
330
+ except Exception:
333
331
  warn(f"Could not parse connector '{ck}'. Skipping...", stack=False)
334
332
  continue
335
333
 
@@ -357,26 +355,27 @@ def _delete_connectors(
357
355
  ):
358
356
  try:
359
357
  os.remove(c.database)
360
- except Exception as e:
358
+ except Exception:
361
359
  warn(
362
360
  "Failed to delete database file for connector "
363
361
  + f"'{c}'. Ignoring...", stack=False
364
362
  )
365
- except Exception as e:
363
+ except Exception:
366
364
  pass
367
365
  try:
368
366
  del cf['meerschaum']['connectors'][c.type][c.label]
369
- except Exception as e:
367
+ except Exception:
370
368
  warn(f"Failed to delete connector '{c}' from configuration. Skipping...", stack=False)
371
369
 
372
370
  write_config(cf, debug=debug)
373
371
  return True, "Success"
374
372
 
373
+
375
374
  def _complete_delete_connectors(
376
- action: Optional[List[str]] = None,
377
- line: str = '',
378
- **kw: Any
379
- ) -> List[str]:
375
+ action: Optional[List[str]] = None,
376
+ line: str = '',
377
+ **kw: Any
378
+ ) -> List[str]:
380
379
  from meerschaum.config import get_config
381
380
  from meerschaum.utils.misc import get_connector_labels
382
381
  types = list(get_config('meerschaum', 'connectors').keys())
@@ -401,10 +400,8 @@ def _delete_jobs(
401
400
  Remove a job's log files and delete the job's ID.
402
401
 
403
402
  If the job is running, ask to kill the job first.
404
-
405
403
  """
406
404
  from meerschaum.jobs import (
407
- Job,
408
405
  get_running_jobs,
409
406
  get_stopped_jobs,
410
407
  get_filtered_jobs,
@@ -460,7 +457,7 @@ def _delete_jobs(
460
457
  ### Ensure the running jobs are dead.
461
458
  if get_running_jobs(executor_keys, jobs, debug=debug):
462
459
  return False, (
463
- f"Failed to kill running jobs. Please stop these jobs before deleting."
460
+ "Failed to kill running jobs. Please stop these jobs before deleting."
464
461
  )
465
462
  _to_delete.update(to_stop_jobs)
466
463
 
@@ -475,7 +472,7 @@ def _delete_jobs(
475
472
  pprint_jobs(_to_delete, nopretty=nopretty)
476
473
  if not yes_no(
477
474
  "Are you sure you want to delete these jobs?",
478
- yes=yes, noask=noask, default='y',
475
+ yes=yes, noask=noask, default='n',
479
476
  ):
480
477
  return False, "No jobs were deleted."
481
478
 
@@ -569,7 +566,6 @@ def _delete_venvs(
569
566
  from meerschaum.utils.venv import venv_exists
570
567
  from meerschaum.utils.prompt import yes_no
571
568
  from meerschaum.utils.misc import print_options
572
- from meerschaum.utils.warnings import warn
573
569
 
574
570
  venvs_to_skip = ['mrsm']
575
571
  venvs = [
@@ -397,6 +397,7 @@ def _edit_jobs(
397
397
  from meerschaum._internal.arguments import (
398
398
  split_pipeline_sysargs,
399
399
  split_chained_sysargs,
400
+ parse_arguments,
400
401
  )
401
402
  from meerschaum.utils.formatting import make_header, print_options
402
403
  from meerschaum.utils.warnings import info
@@ -410,7 +411,26 @@ def _edit_jobs(
410
411
 
411
412
  num_edited = 0
412
413
  for name, job in jobs.items():
413
- sysargs_str = shlex.join(job.sysargs)
414
+ try:
415
+ sub_args_line = None
416
+ pipeline_args_line = None
417
+ if job.sysargs[:2] == ['start', 'pipeline']:
418
+ job_args = parse_arguments(job.sysargs)
419
+ mrsm.pprint(job_args)
420
+ sub_args_line = job_args['params']['sub_args_line']
421
+ params_index = job.sysargs[2:].index('-P')
422
+ indices_to_skip = (params_index, params_index + 1)
423
+ pipeline_args_line = shlex.join(
424
+ [a for i, a in enumerate(job.sysargs[2:]) if i not in indices_to_skip]
425
+ )
426
+ except (ValueError, IndexError):
427
+ sub_args_line = None
428
+
429
+ sysargs_str = (
430
+ f"{sub_args_line} : {pipeline_args_line}"
431
+ if sub_args_line is not None and pipeline_args_line is not None
432
+ else shlex.join(job.sysargs)
433
+ )
414
434
  clear_screen(debug=debug)
415
435
  info(
416
436
  f"Editing arguments for job '{name}'.\n"
@@ -422,7 +442,7 @@ def _edit_jobs(
422
442
  try:
423
443
  new_sysargs_str = prompt(
424
444
  "",
425
- default_editable=sysargs_str.lstrip().rstrip().replace(' + ', '\n+ '),
445
+ default_editable=job.label,
426
446
  multiline=True,
427
447
  icon=False,
428
448
  completer=ShellCompleter(),
@@ -175,7 +175,7 @@ def _install_packages(
175
175
  + f" into the virtual environment '{venv}'."
176
176
  )
177
177
  return False, (
178
- f"Failed to install package" + ("s" if len(action) != 1 else '') + f" {items_str(action)}."
178
+ "Failed to install package" + ("s" if len(action) != 1 else '') + f" {items_str(action)}."
179
179
  )
180
180
 
181
181
 
@@ -200,7 +200,6 @@ def _install_required(
200
200
  from meerschaum.core import Plugin
201
201
  from meerschaum.utils.warnings import warn, info
202
202
  from meerschaum.connectors.parse import parse_repo_keys
203
- from meerschaum.utils.formatting import print_tuple
204
203
  from meerschaum.plugins import get_plugins_names
205
204
  repo_connector = parse_repo_keys(repository)
206
205
 
@@ -282,9 +282,8 @@ def _sync_pipes(
282
282
  from meerschaum.utils.formatting import print_pipes_results
283
283
  from meerschaum.config.static import STATIC_CONFIG
284
284
 
285
- ### NOTE: Removed MRSM_NONINTERACTIVE check.
286
285
  noninteractive_val = os.environ.get(STATIC_CONFIG['environment']['noninteractive'], None)
287
- _ = noninteractive_val in ('1', 'true', 'True', 'yes')
286
+ noninteractive = str(noninteractive_val).lower() in ('1', 'true', 'yes')
288
287
 
289
288
  run = True
290
289
  msg = ""
@@ -292,7 +291,7 @@ def _sync_pipes(
292
291
  cooldown = 2 * (min_seconds + 1)
293
292
  success_pipes, failure_pipes = [], []
294
293
  while run:
295
- _progress = progress() if shell else None
294
+ _progress = progress() if shell and not noninteractive else None
296
295
  cm = _progress if _progress is not None else contextlib.nullcontext()
297
296
 
298
297
  lap_begin = time.perf_counter()
@@ -11,7 +11,6 @@ from __future__ import annotations
11
11
 
12
12
  import io
13
13
  import json
14
- import fastapi
15
14
  from decimal import Decimal
16
15
  import datetime
17
16
 
@@ -359,16 +358,16 @@ def sync_pipe(
359
358
  p = get_pipe(connector_keys, metric_key, location_key)
360
359
  if p.target in ('users', 'plugins', 'pipes'):
361
360
  raise fastapi.HTTPException(
362
- status_code = 409,
363
- detail = f"Cannot sync data to protected table '{p.target}'.",
361
+ status_code=409,
362
+ detail=f"Cannot sync data to protected table '{p.target}'.",
364
363
  )
365
364
 
366
365
  if not p.columns and columns is not None:
367
366
  p.columns = json.loads(columns)
368
367
  if not p.columns and not is_pipe_registered(p, pipes(refresh=True)):
369
368
  raise fastapi.HTTPException(
370
- status_code = 409,
371
- detail = "Pipe must be registered with the datetime column specified."
369
+ status_code=409,
370
+ detail="Pipe must be registered with index columns specified."
372
371
  )
373
372
 
374
373
  result = list(p.sync(
@@ -412,7 +411,7 @@ def get_pipe_data(
412
411
  if params is not None:
413
412
  try:
414
413
  _params = json.loads(params)
415
- except Exception as e:
414
+ except Exception:
416
415
  _params = None
417
416
  if not isinstance(_params, dict):
418
417
  raise fastapi.HTTPException(
@@ -426,7 +425,7 @@ def get_pipe_data(
426
425
  if select_columns is not None:
427
426
  try:
428
427
  _select_columns = json.loads(select_columns)
429
- except Exception as e:
428
+ except Exception:
430
429
  _select_columns = None
431
430
  if not isinstance(_select_columns, list):
432
431
  raise fastapi.HTTPException(
@@ -440,7 +439,7 @@ def get_pipe_data(
440
439
  if omit_columns is not None:
441
440
  try:
442
441
  _omit_columns = json.loads(omit_columns)
443
- except Exception as e:
442
+ except Exception:
444
443
  _omit_columns = None
445
444
  if _omit_columns is None:
446
445
  raise fastapi.HTTPException(
@@ -137,7 +137,7 @@ default_pipes_config = {
137
137
  },
138
138
  'verify': {
139
139
  'bound_days': 366,
140
- 'chunk_minutes': 1440,
140
+ 'chunk_minutes': 43200,
141
141
  },
142
142
  },
143
143
  'attributes': {
@@ -103,7 +103,7 @@ if ENVIRONMENT_VENVS_DIR in os.environ:
103
103
  if not _VENVS_DIR_PATH.exists():
104
104
  try:
105
105
  _VENVS_DIR_PATH.mkdir(parents=True, exist_ok=True)
106
- except Exception as e:
106
+ except Exception:
107
107
  print(
108
108
  f"Invalid path set for environment variable '{ENVIRONMENT_VENVS_DIR}':\n"
109
109
  + f"{_VENVS_DIR_PATH}"
@@ -148,6 +148,7 @@ paths = {
148
148
  'CACHE_RESOURCES_PATH' : ('{ROOT_DIR_PATH}', '.cache'),
149
149
  'PIPES_CACHE_RESOURCES_PATH' : ('{CACHE_RESOURCES_PATH}', 'pipes'),
150
150
  'USERS_CACHE_RESOURCES_PATH' : ('{CACHE_RESOURCES_PATH}', 'users'),
151
+ 'VENVS_CACHE_RESOURCES_PATH' : ('{CACHE_RESOURCES_PATH}', 'venvs'),
151
152
 
152
153
  'PLUGINS_RESOURCES_PATH' : ('{INTERNAL_RESOURCES_PATH}', 'plugins'),
153
154
  'PLUGINS_INTERNAL_LOCK_PATH' : ('{INTERNAL_RESOURCES_PATH}', 'plugins.lock'),
@@ -2,4 +2,4 @@
2
2
  Specify the Meerschaum release version.
3
3
  """
4
4
 
5
- __version__ = "2.6.16"
5
+ __version__ = "2.7.0"
@@ -15,7 +15,8 @@ from datetime import datetime
15
15
  import meerschaum as mrsm
16
16
  from meerschaum.utils.debug import dprint
17
17
  from meerschaum.utils.warnings import warn, error
18
- from meerschaum.utils.typing import SuccessTuple, Union, Any, Optional, Mapping, List, Dict, Tuple
18
+ from meerschaum.utils.typing import SuccessTuple, Union, Any, Optional, List, Dict, Tuple
19
+
19
20
 
20
21
  def pipe_r_url(
21
22
  pipe: mrsm.Pipe
@@ -30,6 +31,7 @@ def pipe_r_url(
30
31
  + f"{pipe.connector_keys}/{pipe.metric_key}/{location_key}"
31
32
  )
32
33
 
34
+
33
35
  def register_pipe(
34
36
  self,
35
37
  pipe: mrsm.Pipe,
@@ -39,7 +41,6 @@ def register_pipe(
39
41
  Returns a tuple of (success_bool, response_dict).
40
42
  """
41
43
  from meerschaum.utils.debug import dprint
42
- from meerschaum.config.static import STATIC_CONFIG
43
44
  ### NOTE: if `parameters` is supplied in the Pipe constructor,
44
45
  ### then `pipe.parameters` will exist and not be fetched from the database.
45
46
  r_url = pipe_r_url(pipe)
@@ -180,7 +181,7 @@ def sync_pipe(
180
181
  from meerschaum.utils.misc import json_serialize_datetime, items_str
181
182
  from meerschaum.config import get_config
182
183
  from meerschaum.utils.packages import attempt_import
183
- from meerschaum.utils.dataframe import get_numeric_cols, to_json
184
+ from meerschaum.utils.dataframe import get_numeric_cols, to_json, get_bytes_cols
184
185
  begin = time.time()
185
186
  more_itertools = attempt_import('more_itertools')
186
187
  if df is None:
@@ -291,7 +292,7 @@ def sync_pipe(
291
292
 
292
293
  try:
293
294
  j = tuple(j)
294
- except Exception as e:
295
+ except Exception:
295
296
  return False, response.text
296
297
 
297
298
  if debug:
@@ -313,12 +314,12 @@ def sync_pipe(
313
314
 
314
315
  def delete_pipe(
315
316
  self,
316
- pipe: Optional[meerschaum.Pipe] = None,
317
+ pipe: Optional[mrsm.Pipe] = None,
317
318
  debug: bool = None,
318
319
  ) -> SuccessTuple:
319
320
  """Delete a Pipe and drop its table."""
320
321
  if pipe is None:
321
- error(f"Pipe cannot be None.")
322
+ error("Pipe cannot be None.")
322
323
  r_url = pipe_r_url(pipe)
323
324
  response = self.delete(
324
325
  r_url + '/delete',
@@ -339,7 +340,7 @@ def delete_pipe(
339
340
 
340
341
  def get_pipe_data(
341
342
  self,
342
- pipe: meerschaum.Pipe,
343
+ pipe: mrsm.Pipe,
343
344
  select_columns: Optional[List[str]] = None,
344
345
  omit_columns: Optional[List[str]] = None,
345
346
  begin: Union[str, datetime, int, None] = None,
@@ -351,7 +352,6 @@ def get_pipe_data(
351
352
  ) -> Union[pandas.DataFrame, None]:
352
353
  """Fetch data from the API."""
353
354
  r_url = pipe_r_url(pipe)
354
- chunks_list = []
355
355
  while True:
356
356
  try:
357
357
  response = self.get(
@@ -375,12 +375,19 @@ def get_pipe_data(
375
375
  return False, j['detail']
376
376
  break
377
377
 
378
- from meerschaum.utils.packages import import_pandas
379
378
  from meerschaum.utils.dataframe import parse_df_datetimes, add_missing_cols_to_df
380
379
  from meerschaum.utils.dtypes import are_dtypes_equal
381
- pd = import_pandas()
382
380
  try:
383
- df = pd.read_json(StringIO(response.text))
381
+ df = parse_df_datetimes(
382
+ j,
383
+ ignore_cols=[
384
+ col
385
+ for col, dtype in pipe.dtypes.items()
386
+ if not are_dtypes_equal(str(dtype), 'datetime')
387
+ ],
388
+ strip_timezone=(pipe.tzinfo is None),
389
+ debug=debug,
390
+ )
384
391
  except Exception as e:
385
392
  warn(f"Failed to parse response for {pipe}:\n{e}")
386
393
  return None
@@ -388,16 +395,6 @@ def get_pipe_data(
388
395
  if len(df.columns) == 0:
389
396
  return add_missing_cols_to_df(df, pipe.dtypes)
390
397
 
391
- df = parse_df_datetimes(
392
- df,
393
- ignore_cols = [
394
- col
395
- for col, dtype in pipe.dtypes.items()
396
- if not are_dtypes_equal(str(dtype), 'datetime')
397
- ],
398
- strip_timezone=(pipe.tzinfo is None),
399
- debug=debug,
400
- )
401
398
  return df
402
399
 
403
400
 
@@ -107,7 +107,7 @@ flavor_configs = {
107
107
  },
108
108
  },
109
109
  'oracle': {
110
- 'engine': 'oracle+cx_oracle',
110
+ 'engine': 'oracle+oracledb',
111
111
  'create_engine': default_create_engine_args,
112
112
  'omit_create_engine': {'method',},
113
113
  'to_sql': {
@@ -164,7 +164,7 @@ install_flavor_drivers = {
164
164
  'citus': ['psycopg'],
165
165
  'cockroachdb': ['psycopg', 'sqlalchemy_cockroachdb', 'sqlalchemy_cockroachdb.psycopg'],
166
166
  'mssql': ['pyodbc'],
167
- 'oracle': ['cx_Oracle'],
167
+ 'oracle': ['oracledb'],
168
168
  }
169
169
  require_patching_flavors = {'cockroachdb': [('sqlalchemy-cockroachdb', 'sqlalchemy_cockroachdb')]}
170
170
 
@@ -239,7 +239,7 @@ def create_engine(
239
239
  self._sys_config['create_engine'] = {}
240
240
  if 'connect_args' not in self._sys_config['create_engine']:
241
241
  self._sys_config['create_engine']['connect_args'] = {}
242
- self._sys_config['create_engine']['connect_args'].update({"check_same_thread" : False})
242
+ self._sys_config['create_engine']['connect_args'].update({"check_same_thread": False})
243
243
  else:
244
244
  engine_str = (
245
245
  _engine + "://" + (_username if _username is not None else '') +
@@ -9,8 +9,7 @@ Define utilities for instance connectors.
9
9
  import time
10
10
  from datetime import datetime, timezone, timedelta
11
11
  import meerschaum as mrsm
12
- from meerschaum.utils.typing import Dict, SuccessTuple, Optional, Union, List
13
- from meerschaum.utils.warnings import warn
12
+ from meerschaum.utils.typing import Dict, SuccessTuple, Union, List
14
13
 
15
14
 
16
15
  _in_memory_temp_tables: Dict[str, bool] = {}
@@ -28,9 +27,9 @@ def _log_temporary_tables_creation(
28
27
  from meerschaum.connectors.sql.tables import get_tables
29
28
  sqlalchemy = mrsm.attempt_import('sqlalchemy')
30
29
  temp_tables_table = get_tables(
31
- mrsm_instance = self,
32
- create = create,
33
- debug = debug,
30
+ mrsm_instance=self,
31
+ create=create,
32
+ debug=debug,
34
33
  )['temp_tables']
35
34
  if isinstance(tables, str):
36
35
  tables = [tables]
@@ -72,7 +71,9 @@ def _drop_temporary_table(
72
71
  return True, "Success"
73
72
 
74
73
  drop_query = f"DROP TABLE {if_exists} " + sql_item_name(
75
- table, self.flavor, schema=self.internal_schema
74
+ table,
75
+ self.flavor,
76
+ schema=self.internal_schema
76
77
  )
77
78
  drop_success = self.exec(drop_query, silent=True, debug=debug) is not None
78
79
  drop_msg = "Success" if drop_success else f"Failed to drop temporary table '{table}'."
@@ -83,7 +84,6 @@ def _drop_temporary_tables(self, debug: bool = False) -> SuccessTuple:
83
84
  """
84
85
  Drop all tables in the internal schema that are marked as ready to be dropped.
85
86
  """
86
- from meerschaum.utils.sql import sql_item_name, table_exists
87
87
  from meerschaum.utils.misc import items_str
88
88
  from meerschaum.connectors.sql.tables import get_tables
89
89
  sqlalchemy = mrsm.attempt_import('sqlalchemy')
@@ -141,16 +141,15 @@ def _drop_temporary_tables(self, debug: bool = False) -> SuccessTuple:
141
141
 
142
142
 
143
143
  def _drop_old_temporary_tables(
144
- self,
145
- refresh: bool = True,
146
- debug: bool = False,
147
- ) -> SuccessTuple:
144
+ self,
145
+ refresh: bool = True,
146
+ debug: bool = False,
147
+ ) -> SuccessTuple:
148
148
  """
149
149
  Drop temporary tables older than the configured interval (24 hours by default).
150
150
  """
151
151
  from meerschaum.config import get_config
152
152
  from meerschaum.connectors.sql.tables import get_tables
153
- from meerschaum.utils.misc import items_str
154
153
  sqlalchemy = mrsm.attempt_import('sqlalchemy')
155
154
  temp_tables_table = get_tables(mrsm_instance=self, create=False, debug=debug)['temp_tables']
156
155
  last_check = getattr(self, '_stale_temporary_tables_check_timestamp', 0)