meerschaum 2.7.6__tar.gz → 2.7.8__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (280) hide show
  1. {meerschaum-2.7.6/meerschaum.egg-info → meerschaum-2.7.8}/PKG-INFO +14 -2
  2. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/actions/copy.py +1 -0
  3. meerschaum-2.7.8/meerschaum/actions/drop.py +164 -0
  4. meerschaum-2.7.8/meerschaum/actions/index.py +71 -0
  5. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/actions/register.py +8 -12
  6. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/actions/sql.py +1 -1
  7. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/routes/_pipes.py +18 -0
  8. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/routes/_plugins.py +1 -1
  9. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/routes/_users.py +62 -61
  10. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/config/_version.py +1 -1
  11. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/connectors/api/_pipes.py +20 -0
  12. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/connectors/sql/_SQLConnector.py +8 -12
  13. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/connectors/sql/_create_engine.py +1 -1
  14. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/connectors/sql/_fetch.py +9 -39
  15. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/connectors/sql/_instance.py +3 -3
  16. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/connectors/sql/_pipes.py +262 -70
  17. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/connectors/sql/_plugins.py +11 -16
  18. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/connectors/sql/_sql.py +60 -39
  19. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/connectors/sql/_uri.py +9 -9
  20. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/connectors/sql/_users.py +10 -12
  21. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/connectors/sql/tables/__init__.py +13 -14
  22. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/connectors/valkey/_ValkeyConnector.py +2 -2
  23. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/core/Pipe/__init__.py +12 -2
  24. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/core/Pipe/_attributes.py +32 -38
  25. meerschaum-2.7.8/meerschaum/core/Pipe/_drop.py +118 -0
  26. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/core/Pipe/_fetch.py +4 -0
  27. meerschaum-2.7.8/meerschaum/core/Pipe/_index.py +68 -0
  28. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/core/Pipe/_sync.py +16 -9
  29. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/utils/daemon/Daemon.py +9 -2
  30. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/utils/daemon/RotatingFile.py +3 -3
  31. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/utils/dataframe.py +42 -12
  32. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/utils/dtypes/__init__.py +144 -24
  33. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/utils/dtypes/sql.py +52 -9
  34. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/utils/formatting/__init__.py +2 -2
  35. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/utils/formatting/_pprint.py +12 -11
  36. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/utils/misc.py +16 -18
  37. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/utils/prompt.py +1 -1
  38. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/utils/sql.py +106 -42
  39. {meerschaum-2.7.6 → meerschaum-2.7.8/meerschaum.egg-info}/PKG-INFO +14 -2
  40. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum.egg-info/SOURCES.txt +2 -0
  41. {meerschaum-2.7.6 → meerschaum-2.7.8}/tests/test_jobs.py +1 -1
  42. {meerschaum-2.7.6 → meerschaum-2.7.8}/tests/test_pipes_dtypes.py +61 -0
  43. {meerschaum-2.7.6 → meerschaum-2.7.8}/tests/test_sync.py +160 -4
  44. meerschaum-2.7.6/meerschaum/actions/drop.py +0 -86
  45. meerschaum-2.7.6/meerschaum/core/Pipe/_drop.py +0 -47
  46. {meerschaum-2.7.6 → meerschaum-2.7.8}/LICENSE +0 -0
  47. {meerschaum-2.7.6 → meerschaum-2.7.8}/NOTICE +0 -0
  48. {meerschaum-2.7.6 → meerschaum-2.7.8}/README.md +0 -0
  49. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/__init__.py +0 -0
  50. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/__main__.py +0 -0
  51. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/_internal/__init__.py +0 -0
  52. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/_internal/arguments/__init__.py +0 -0
  53. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/_internal/arguments/_parse_arguments.py +0 -0
  54. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/_internal/arguments/_parser.py +0 -0
  55. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/_internal/docs/__init__.py +0 -0
  56. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/_internal/docs/index.py +0 -0
  57. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/_internal/entry.py +0 -0
  58. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/_internal/gui/__init__.py +0 -0
  59. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/_internal/gui/app/__init__.py +0 -0
  60. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/_internal/gui/app/_windows.py +0 -0
  61. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/_internal/gui/app/actions.py +0 -0
  62. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/_internal/gui/app/pipes.py +0 -0
  63. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/_internal/shell/Shell.py +0 -0
  64. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/_internal/shell/ShellCompleter.py +0 -0
  65. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/_internal/shell/ValidAutoSuggest.py +0 -0
  66. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/_internal/shell/__init__.py +0 -0
  67. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/_internal/shell/resources/__init__.py +0 -0
  68. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/_internal/shell/updates.py +0 -0
  69. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/_internal/term/TermPageHandler.py +0 -0
  70. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/_internal/term/__init__.py +0 -0
  71. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/_internal/term/tools.py +0 -0
  72. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/actions/__init__.py +0 -0
  73. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/actions/api.py +0 -0
  74. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/actions/attach.py +0 -0
  75. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/actions/bootstrap.py +0 -0
  76. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/actions/clear.py +0 -0
  77. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/actions/deduplicate.py +0 -0
  78. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/actions/delete.py +0 -0
  79. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/actions/edit.py +0 -0
  80. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/actions/install.py +0 -0
  81. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/actions/login.py +0 -0
  82. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/actions/os.py +0 -0
  83. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/actions/pause.py +0 -0
  84. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/actions/python.py +0 -0
  85. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/actions/reload.py +0 -0
  86. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/actions/restart.py +0 -0
  87. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/actions/setup.py +0 -0
  88. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/actions/sh.py +0 -0
  89. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/actions/show.py +0 -0
  90. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/actions/stack.py +0 -0
  91. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/actions/start.py +0 -0
  92. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/actions/stop.py +0 -0
  93. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/actions/sync.py +0 -0
  94. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/actions/tag.py +0 -0
  95. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/actions/uninstall.py +0 -0
  96. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/actions/upgrade.py +0 -0
  97. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/actions/verify.py +0 -0
  98. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/__init__.py +0 -0
  99. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/_chain.py +0 -0
  100. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/_events.py +0 -0
  101. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/_oauth2.py +0 -0
  102. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/_websockets.py +0 -0
  103. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/dash/__init__.py +0 -0
  104. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/dash/assets/__init__.py +0 -0
  105. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/dash/assets/ansi_up.js +0 -0
  106. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/dash/assets/banner_1920x320.png +0 -0
  107. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/dash/assets/favicon.ico +0 -0
  108. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/dash/assets/logo_48x48.png +0 -0
  109. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/dash/assets/logo_500x500.png +0 -0
  110. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/dash/callbacks/__init__.py +0 -0
  111. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/dash/callbacks/custom.py +0 -0
  112. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/dash/callbacks/dashboard.py +0 -0
  113. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/dash/callbacks/jobs.py +0 -0
  114. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/dash/callbacks/login.py +0 -0
  115. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/dash/callbacks/pipes.py +0 -0
  116. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/dash/callbacks/plugins.py +0 -0
  117. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/dash/callbacks/register.py +0 -0
  118. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/dash/components.py +0 -0
  119. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/dash/connectors.py +0 -0
  120. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/dash/graphs.py +0 -0
  121. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/dash/jobs.py +0 -0
  122. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/dash/keys.py +0 -0
  123. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/dash/pages/__init__.py +0 -0
  124. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/dash/pages/dashboard.py +0 -0
  125. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/dash/pages/error.py +0 -0
  126. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/dash/pages/job.py +0 -0
  127. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/dash/pages/login.py +0 -0
  128. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/dash/pages/pipes.py +0 -0
  129. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/dash/pages/plugins.py +0 -0
  130. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/dash/pages/register.py +0 -0
  131. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/dash/pipes.py +0 -0
  132. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/dash/plugins.py +0 -0
  133. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/dash/sessions.py +0 -0
  134. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/dash/sync.py +0 -0
  135. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/dash/users.py +0 -0
  136. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/dash/websockets.py +0 -0
  137. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/dash/webterm.py +0 -0
  138. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/models/__init__.py +0 -0
  139. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/models/_interfaces.py +0 -0
  140. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/models/_locations.py +0 -0
  141. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/models/_metrics.py +0 -0
  142. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/models/_pipes.py +0 -0
  143. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/resources/__init__.py +0 -0
  144. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/resources/static/__init__.py +0 -0
  145. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/resources/static/css/__init__.py +0 -0
  146. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/resources/static/css/bootstrap.min.css +0 -0
  147. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/resources/static/css/dash.css +0 -0
  148. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/resources/static/css/dbc_dark.css +0 -0
  149. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/resources/static/css/styles.css +0 -0
  150. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/resources/static/css/xterm.css +0 -0
  151. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/resources/static/ico/__init__.py +0 -0
  152. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/resources/static/ico/logo.ico +0 -0
  153. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/resources/static/js/__init__.py +0 -0
  154. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/resources/static/js/action_button.js +0 -0
  155. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/resources/static/js/main.js +0 -0
  156. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/resources/static/js/terminado.js +0 -0
  157. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/resources/static/js/xterm.js +0 -0
  158. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/resources/static/png/__init__.py +0 -0
  159. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/resources/templates/__init__.py +0 -0
  160. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/resources/templates/index.html +0 -0
  161. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/resources/templates/old_index.html +0 -0
  162. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/resources/templates/secret.html +0 -0
  163. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/resources/templates/termpage.html +0 -0
  164. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/routes/__init__.py +0 -0
  165. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/routes/_actions.py +0 -0
  166. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/routes/_connectors.py +0 -0
  167. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/routes/_index.py +0 -0
  168. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/routes/_jobs.py +0 -0
  169. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/routes/_login.py +0 -0
  170. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/routes/_misc.py +0 -0
  171. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/routes/_version.py +0 -0
  172. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/routes/_webterm.py +0 -0
  173. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/api/tables/__init__.py +0 -0
  174. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/config/__init__.py +0 -0
  175. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/config/_dash.py +0 -0
  176. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/config/_default.py +0 -0
  177. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/config/_edit.py +0 -0
  178. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/config/_environment.py +0 -0
  179. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/config/_formatting.py +0 -0
  180. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/config/_jobs.py +0 -0
  181. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/config/_patch.py +0 -0
  182. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/config/_paths.py +0 -0
  183. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/config/_preprocess.py +0 -0
  184. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/config/_read_config.py +0 -0
  185. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/config/_shell.py +0 -0
  186. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/config/_sync.py +0 -0
  187. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/config/paths.py +0 -0
  188. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/config/resources/__init__.py +0 -0
  189. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/config/stack/__init__.py +0 -0
  190. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/config/stack/grafana/__init__.py +0 -0
  191. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/config/stack/mosquitto/__init__.py +0 -0
  192. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/config/stack/mosquitto/resources/__init__.py +0 -0
  193. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/config/stack/resources/__init__.py +0 -0
  194. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/config/static/__init__.py +0 -0
  195. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/connectors/_Connector.py +0 -0
  196. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/connectors/__init__.py +0 -0
  197. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/connectors/api/_APIConnector.py +0 -0
  198. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/connectors/api/__init__.py +0 -0
  199. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/connectors/api/_actions.py +0 -0
  200. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/connectors/api/_fetch.py +0 -0
  201. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/connectors/api/_jobs.py +0 -0
  202. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/connectors/api/_login.py +0 -0
  203. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/connectors/api/_misc.py +0 -0
  204. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/connectors/api/_plugins.py +0 -0
  205. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/connectors/api/_request.py +0 -0
  206. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/connectors/api/_uri.py +0 -0
  207. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/connectors/api/_users.py +0 -0
  208. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/connectors/parse.py +0 -0
  209. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/connectors/plugin/PluginConnector.py +0 -0
  210. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/connectors/plugin/__init__.py +0 -0
  211. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/connectors/poll.py +0 -0
  212. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/connectors/sql/__init__.py +0 -0
  213. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/connectors/sql/_cli.py +0 -0
  214. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/connectors/sql/tables/types.py +0 -0
  215. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/connectors/sql/tools.py +0 -0
  216. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/connectors/valkey/__init__.py +0 -0
  217. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/connectors/valkey/_fetch.py +0 -0
  218. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/connectors/valkey/_pipes.py +0 -0
  219. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/connectors/valkey/_plugins.py +0 -0
  220. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/connectors/valkey/_users.py +0 -0
  221. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/core/Pipe/_bootstrap.py +0 -0
  222. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/core/Pipe/_clear.py +0 -0
  223. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/core/Pipe/_copy.py +0 -0
  224. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/core/Pipe/_data.py +0 -0
  225. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/core/Pipe/_deduplicate.py +0 -0
  226. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/core/Pipe/_delete.py +0 -0
  227. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/core/Pipe/_dtypes.py +0 -0
  228. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/core/Pipe/_edit.py +0 -0
  229. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/core/Pipe/_register.py +0 -0
  230. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/core/Pipe/_show.py +0 -0
  231. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/core/Pipe/_verify.py +0 -0
  232. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/core/Plugin/__init__.py +0 -0
  233. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/core/User/_User.py +0 -0
  234. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/core/User/__init__.py +0 -0
  235. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/core/__init__.py +0 -0
  236. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/jobs/_Executor.py +0 -0
  237. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/jobs/_Job.py +0 -0
  238. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/jobs/__init__.py +0 -0
  239. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/jobs/systemd.py +0 -0
  240. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/plugins/_Plugin.py +0 -0
  241. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/plugins/__init__.py +0 -0
  242. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/plugins/bootstrap.py +0 -0
  243. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/utils/__init__.py +0 -0
  244. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/utils/_get_pipes.py +0 -0
  245. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/utils/daemon/FileDescriptorInterceptor.py +0 -0
  246. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/utils/daemon/StdinFile.py +0 -0
  247. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/utils/daemon/__init__.py +0 -0
  248. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/utils/daemon/_names.py +0 -0
  249. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/utils/debug.py +0 -0
  250. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/utils/formatting/_jobs.py +0 -0
  251. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/utils/formatting/_pipes.py +0 -0
  252. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/utils/formatting/_shell.py +0 -0
  253. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/utils/interactive.py +0 -0
  254. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/utils/networking.py +0 -0
  255. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/utils/packages/__init__.py +0 -0
  256. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/utils/packages/_packages.py +0 -0
  257. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/utils/packages/lazy_loader.py +0 -0
  258. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/utils/pool.py +0 -0
  259. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/utils/process.py +0 -0
  260. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/utils/schedule.py +0 -0
  261. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/utils/threading.py +0 -0
  262. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/utils/typing.py +0 -0
  263. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/utils/venv/_Venv.py +0 -0
  264. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/utils/venv/__init__.py +0 -0
  265. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/utils/warnings.py +0 -0
  266. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum/utils/yaml.py +0 -0
  267. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum.egg-info/dependency_links.txt +0 -0
  268. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum.egg-info/entry_points.txt +0 -0
  269. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum.egg-info/requires.txt +0 -0
  270. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum.egg-info/top_level.txt +0 -0
  271. {meerschaum-2.7.6 → meerschaum-2.7.8}/meerschaum.egg-info/zip-safe +0 -0
  272. {meerschaum-2.7.6 → meerschaum-2.7.8}/setup.cfg +0 -0
  273. {meerschaum-2.7.6 → meerschaum-2.7.8}/setup.py +0 -0
  274. {meerschaum-2.7.6 → meerschaum-2.7.8}/tests/test_actions.py +0 -0
  275. {meerschaum-2.7.6 → meerschaum-2.7.8}/tests/test_arguments.py +0 -0
  276. {meerschaum-2.7.6 → meerschaum-2.7.8}/tests/test_deduplicate.py +0 -0
  277. {meerschaum-2.7.6 → meerschaum-2.7.8}/tests/test_pipe_data.py +0 -0
  278. {meerschaum-2.7.6 → meerschaum-2.7.8}/tests/test_sql.py +0 -0
  279. {meerschaum-2.7.6 → meerschaum-2.7.8}/tests/test_users.py +0 -0
  280. {meerschaum-2.7.6 → meerschaum-2.7.8}/tests/test_verify.py +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: meerschaum
3
- Version: 2.7.6
3
+ Version: 2.7.8
4
4
  Summary: Sync Time-Series Pipes with Meerschaum
5
5
  Home-page: https://meerschaum.io
6
6
  Author: Bennett Meares
@@ -318,6 +318,18 @@ Requires-Dist: python-multipart>=0.0.9; extra == "full"
318
318
  Requires-Dist: httpx>=0.27.2; extra == "full"
319
319
  Requires-Dist: httpcore>=1.0.6; extra == "full"
320
320
  Requires-Dist: valkey>=6.0.0; extra == "full"
321
+ Dynamic: author
322
+ Dynamic: author-email
323
+ Dynamic: classifier
324
+ Dynamic: description
325
+ Dynamic: description-content-type
326
+ Dynamic: home-page
327
+ Dynamic: license
328
+ Dynamic: maintainer-email
329
+ Dynamic: project-url
330
+ Dynamic: provides-extra
331
+ Dynamic: requires-python
332
+ Dynamic: summary
321
333
 
322
334
  <img src="https://meerschaum.io/assets/banner_1920x320.png" alt="Meerschaum banner" style="width: 100%"/>
323
335
 
@@ -9,6 +9,7 @@ Functions for copying elements.
9
9
  from __future__ import annotations
10
10
  from meerschaum.utils.typing import Any, SuccessTuple, Optional, List
11
11
 
12
+
12
13
  def copy(
13
14
  action: Optional[List[str]] = None,
14
15
  **kw : Any
@@ -0,0 +1,164 @@
1
+ #! /usr/bin/env python
2
+ # -*- coding: utf-8 -*-
3
+ # vim:fenc=utf-8
4
+ """
5
+ Functions for dropping elements
6
+ """
7
+
8
+ from __future__ import annotations
9
+ from meerschaum.utils.typing import SuccessTuple, Any, Optional, List
10
+
11
+
12
+ def drop(
13
+ action: Optional[List[str]] = None,
14
+ **kw: Any
15
+ ) -> SuccessTuple:
16
+ """
17
+ Drop pipe data (maintaining registration) or tables.
18
+ """
19
+ from meerschaum.actions import choose_subaction
20
+ options = {
21
+ 'pipes' : _drop_pipes,
22
+ 'indices': _drop_indices,
23
+ 'index': _drop_indices,
24
+ 'indexes': _drop_indices,
25
+ }
26
+ return choose_subaction(action, options, **kw)
27
+
28
+
29
+ def _drop_pipes(
30
+ action: Optional[List[str]] = None,
31
+ yes: bool = False,
32
+ force: bool = False,
33
+ noask: bool = False,
34
+ debug: bool = False,
35
+ **kw: Any
36
+ ) -> SuccessTuple:
37
+ """
38
+ Drop pipes' tables but keep pipe metadata registration.
39
+ """
40
+ from meerschaum.utils.prompt import yes_no
41
+ from meerschaum import get_pipes
42
+ from meerschaum.utils.warnings import warn
43
+ from meerschaum.utils.debug import dprint
44
+ from meerschaum.utils.formatting import pprint
45
+
46
+ pipes = get_pipes(as_list=True, debug=debug, **kw)
47
+ if len(pipes) == 0:
48
+ return False, "No pipes to drop."
49
+
50
+ question = (
51
+ "Are you sure you want to drop these tables?\n "
52
+ "Data will be lost and will need to be resynced.\n\n"
53
+ )
54
+ seen_targets = set()
55
+ for pipe in pipes:
56
+ target = pipe.target
57
+ if target in seen_targets:
58
+ continue
59
+ question += f" - {target}" + "\n"
60
+ seen_targets.add(target)
61
+
62
+ question += '\n'
63
+ if force:
64
+ answer = True
65
+ else:
66
+ answer = yes_no(question, default='n', noask=noask, yes=yes)
67
+
68
+ if not answer:
69
+ return False, "No pipes were dropped."
70
+
71
+ success_dict = {}
72
+ successes, fails = 0, 0
73
+ msg = ""
74
+
75
+ for pipe in pipes:
76
+ drop_success, drop_msg = pipe.drop(debug=debug)
77
+ success_dict[pipe] = drop_msg
78
+ if drop_success:
79
+ successes += 1
80
+ else:
81
+ fails += 1
82
+ warn(drop_msg, stack=False)
83
+
84
+ if debug:
85
+ dprint("Results for dropping pipes.")
86
+ pprint(success_dict)
87
+
88
+ msg = (
89
+ f"Finished dropping {len(pipes)} pipes"
90
+ + ('s' if len(pipes) != 1 else '')
91
+ + f"\n ({successes} succeeded, {fails} failed)."
92
+ )
93
+ return successes > 0, msg
94
+
95
+
96
+ def _drop_indices(
97
+ action: Optional[List[str]] = None,
98
+ yes: bool = False,
99
+ force: bool = False,
100
+ noask: bool = False,
101
+ debug: bool = False,
102
+ **kw: Any
103
+ ) -> SuccessTuple:
104
+ """
105
+ Drop pipes' tables but keep pipe metadata registration.
106
+ """
107
+ from meerschaum.utils.prompt import yes_no
108
+ from meerschaum import get_pipes
109
+ from meerschaum.utils.warnings import warn
110
+ from meerschaum.utils.debug import dprint
111
+ from meerschaum.utils.formatting import pprint
112
+
113
+ pipes = get_pipes(as_list=True, debug=debug, **kw)
114
+ if len(pipes) == 0:
115
+ return False, "No pipes to drop."
116
+
117
+ question = "Are you sure you want to drop these indices?\n"
118
+ for pipe in pipes:
119
+ indices = pipe.get_indices()
120
+ if not indices:
121
+ continue
122
+ question += f"\n{pipe}\n"
123
+ for ix_key, index_name in indices.items():
124
+ question += f" - {index_name}\n"
125
+
126
+ question += '\n'
127
+ if force:
128
+ answer = True
129
+ else:
130
+ answer = yes_no(question, default='n', noask=noask, yes=yes)
131
+
132
+ if not answer:
133
+ return False, "No pipes were dropped."
134
+
135
+ success_dict = {}
136
+ successes, fails = 0, 0
137
+ msg = ""
138
+
139
+ for pipe in pipes:
140
+ drop_success, drop_msg = pipe.drop_indices(debug=debug)
141
+ success_dict[pipe] = drop_msg
142
+ if drop_success:
143
+ successes += 1
144
+ else:
145
+ fails += 1
146
+ warn(drop_msg, stack=False)
147
+
148
+ if debug:
149
+ dprint("Results for dropping indices.")
150
+ pprint(success_dict)
151
+
152
+ msg = (
153
+ f"Finished dropping indices for {len(pipes)} pipe"
154
+ + ('s' if len(pipes) != 1 else '')
155
+ + f"\n ({successes} succeeded, {fails} failed)."
156
+ )
157
+ return successes > 0, msg
158
+
159
+
160
+ ### NOTE: This must be the final statement of the module.
161
+ ### Any subactions added below these lines will not
162
+ ### be added to the `help` docstring.
163
+ from meerschaum.actions import choices_docstring as _choices_docstring
164
+ drop.__doc__ += _choices_docstring('drop')
@@ -0,0 +1,71 @@
1
+ #! /usr/bin/env python
2
+ # -*- coding: utf-8 -*-
3
+ # vim:fenc=utf-8
4
+
5
+ """
6
+ Functions for indexing tables.
7
+ """
8
+
9
+ from __future__ import annotations
10
+ from meerschaum.utils.typing import SuccessTuple, Any, Optional, List
11
+
12
+
13
+ def index(
14
+ action: Optional[List[str]] = None,
15
+ **kw: Any
16
+ ) -> SuccessTuple:
17
+ """
18
+ Create pipes' indices.
19
+ """
20
+ from meerschaum.actions import choose_subaction
21
+ options = {
22
+ 'pipes' : _index_pipes,
23
+ }
24
+ return choose_subaction(action, options, **kw)
25
+
26
+
27
+ def _index_pipes(
28
+ action: Optional[List[str]] = None,
29
+ yes: bool = False,
30
+ force: bool = False,
31
+ noask: bool = False,
32
+ debug: bool = False,
33
+ **kw: Any
34
+ ) -> SuccessTuple:
35
+ """
36
+ Create pipes' indices.
37
+ """
38
+ from meerschaum import get_pipes
39
+ from meerschaum.utils.warnings import warn, info
40
+
41
+ pipes = get_pipes(as_list=True, debug=debug, **kw)
42
+ if len(pipes) == 0:
43
+ return False, "No pipes to index."
44
+
45
+ success_dict = {}
46
+ successes, fails = 0, 0
47
+ msg = ""
48
+
49
+ for pipe in pipes:
50
+ info(f"Creating indices for {pipe}...")
51
+ index_success, index_msg = pipe.create_indices(debug=debug)
52
+ success_dict[pipe] = index_msg
53
+ if index_success:
54
+ successes += 1
55
+ else:
56
+ fails += 1
57
+ warn(index_msg, stack=False)
58
+
59
+ msg = (
60
+ f"Finished indexing {len(pipes)} pipes"
61
+ + ('s' if len(pipes) != 1 else '')
62
+ + f"\n ({successes} succeeded, {fails} failed)."
63
+ )
64
+ return successes > 0, msg
65
+
66
+
67
+ ### NOTE: This must be the final statement of the module.
68
+ ### Any subactions added below these lines will not
69
+ ### be added to the `help` docstring.
70
+ from meerschaum.actions import choices_docstring as _choices_docstring
71
+ index.__doc__ += _choices_docstring('index')
@@ -10,6 +10,7 @@ from __future__ import annotations
10
10
  import meerschaum as mrsm
11
11
  from meerschaum.utils.typing import SuccessTuple, Any, List, Optional, Dict
12
12
 
13
+
13
14
  def register(
14
15
  action: Optional[List[str]] = None,
15
16
  **kw: Any
@@ -70,10 +71,9 @@ def _register_pipes(
70
71
  `connector_keys` and `metric_keys`.
71
72
  If `location_keys` is empty, assume [`None`].
72
73
  """
73
- from meerschaum import get_pipes, get_connector
74
+ from meerschaum import get_pipes
74
75
  from meerschaum.utils.debug import dprint
75
- from meerschaum.utils.warnings import warn, info
76
- from meerschaum.utils.misc import items_str
76
+ from meerschaum.utils.warnings import warn
77
77
  from meerschaum.config._patch import apply_patch_to_config
78
78
 
79
79
  if connector_keys is None:
@@ -164,10 +164,8 @@ def _register_plugins(
164
164
  from meerschaum.utils.debug import dprint
165
165
  from meerschaum.plugins import reload_plugins, get_plugins_names
166
166
  from meerschaum.connectors.parse import parse_repo_keys
167
- from meerschaum.config import get_config
168
- from meerschaum.utils.warnings import warn, error, info
167
+ from meerschaum.utils.warnings import warn, info
169
168
  from meerschaum.core import Plugin
170
- from meerschaum import get_connector
171
169
  from meerschaum.utils.formatting import print_tuple
172
170
  from meerschaum.utils.prompt import prompt, yes_no
173
171
 
@@ -179,7 +177,7 @@ def _register_plugins(
179
177
  repo_connector = parse_repo_keys(repository)
180
178
  if repo_connector.__dict__.get('type', None) != 'api':
181
179
  return False, (
182
- f"Can only upload plugins to the Meerschaum API." +
180
+ "Can only upload plugins to the Meerschaum API." +
183
181
  f"Connector '{repo_connector}' is of type " +
184
182
  f"'{repo_connector.get('type', type(repo_connector))}'."
185
183
  )
@@ -283,13 +281,11 @@ def _register_users(
283
281
  """
284
282
  from meerschaum.config import get_config
285
283
  from meerschaum.config.static import STATIC_CONFIG
286
- from meerschaum import get_connector
287
284
  from meerschaum.connectors.parse import parse_instance_keys
288
- from meerschaum.utils.debug import dprint
289
- from meerschaum.utils.warnings import warn, error, info
285
+ from meerschaum.utils.warnings import warn, info
290
286
  from meerschaum.core import User
291
287
  from meerschaum.utils.formatting import print_tuple
292
- from meerschaum.utils.prompt import prompt, get_password, get_email
288
+ from meerschaum.utils.prompt import get_password, get_email
293
289
  if mrsm_instance is None:
294
290
  mrsm_instance = get_config('meerschaum', 'instance')
295
291
  instance_connector = parse_instance_keys(mrsm_instance)
@@ -325,7 +321,7 @@ def _register_users(
325
321
  minimum_length = STATIC_CONFIG['users']['min_password_length']
326
322
  )
327
323
  email = get_email(username, allow_omit=True)
328
- except Exception as e:
324
+ except Exception:
329
325
  return False, (
330
326
  "Aborted registering users " +
331
327
  ', '.join(
@@ -127,7 +127,7 @@ def sql(
127
127
 
128
128
  from meerschaum.utils.packages import attempt_import
129
129
  from meerschaum.utils.formatting import print_tuple, pprint
130
- _ = attempt_import('sqlalchemy.engine.result')
130
+ _ = attempt_import('sqlalchemy.engine.result', lazy=False)
131
131
  if 'sqlalchemy' in str(type(result)):
132
132
  if not nopretty:
133
133
  print_tuple((True, f"Successfully executed query:\n\n{query}"))
@@ -688,3 +688,21 @@ def get_pipe_columns_indices(
688
688
  Return a dictionary of column names and related indices.
689
689
  """
690
690
  return get_pipe(connector_keys, metric_key, location_key).get_columns_indices()
691
+
692
+
693
+ @app.get(
694
+ pipes_endpoint + '/{connector_keys}/{metric_key}/{location_key}/indices/names',
695
+ tags=['Pipes']
696
+ )
697
+ def get_pipe_index_names(
698
+ connector_keys: str,
699
+ metric_key: str,
700
+ location_key: str,
701
+ curr_user=(
702
+ fastapi.Depends(manager) if not no_auth else None
703
+ ),
704
+ ) -> Dict[str, List[Dict[str, str]]]:
705
+ """
706
+ Return a dictionary of index keys and index names.
707
+ """
708
+ return get_pipe(connector_keys, metric_key, location_key).get_indices()
@@ -29,7 +29,7 @@ from meerschaum.core import Plugin
29
29
  starlette_responses = attempt_import('starlette.responses', warn=False)
30
30
  FileResponse = starlette_responses.FileResponse
31
31
 
32
- sqlalchemy = attempt_import('sqlalchemy')
32
+ sqlalchemy = attempt_import('sqlalchemy', lazy=False)
33
33
  plugins_endpoint = endpoints['plugins']
34
34
 
35
35
  @app.post(plugins_endpoint + '/{name}', tags=['Plugins'])
@@ -7,36 +7,34 @@ Routes for managing users
7
7
  """
8
8
 
9
9
  from __future__ import annotations
10
+
10
11
  from meerschaum.utils.typing import (
11
- Optional, Union, SuccessTuple, Any, Mapping, Sequence, Dict, List
12
+ Union, SuccessTuple, Any, Dict, List
12
13
  )
13
14
 
14
15
  from meerschaum.utils.packages import attempt_import
15
16
  from meerschaum.api import (
16
- fastapi, app, endpoints, get_api_connector, pipes, get_pipe,
17
- manager, debug, check_allow_chaining, DISALLOW_CHAINING_MESSAGE,
17
+ fastapi, app, endpoints, get_api_connector, manager,
18
+ debug, check_allow_chaining, DISALLOW_CHAINING_MESSAGE,
18
19
  no_auth, private,
19
20
  )
20
21
  from meerschaum.utils.misc import string_to_dict
21
22
  from meerschaum.config import get_config
22
- from meerschaum.api.tables import get_tables
23
- from starlette.responses import Response, JSONResponse
24
23
  from meerschaum.core import User
25
- import os, pathlib, datetime
26
24
 
27
- import meerschaum.core
28
- sqlalchemy = attempt_import('sqlalchemy')
25
+ sqlalchemy = attempt_import('sqlalchemy', lazy=False)
29
26
  users_endpoint = endpoints['users']
30
27
 
31
28
  import fastapi
32
29
  from fastapi import HTTPException, Form
33
30
 
31
+
34
32
  @app.get(users_endpoint + "/me", tags=['Users'])
35
33
  def read_current_user(
36
- curr_user = (
37
- fastapi.Depends(manager) if not no_auth else None
38
- ),
39
- ) -> Dict[str, Union[str, int]]:
34
+ curr_user = (
35
+ fastapi.Depends(manager) if not no_auth else None
36
+ ),
37
+ ) -> Dict[str, Union[str, int]]:
40
38
  """
41
39
  Get information about the currently logged-in user.
42
40
  """
@@ -58,12 +56,13 @@ def read_current_user(
58
56
  ),
59
57
  }
60
58
 
59
+
61
60
  @app.get(users_endpoint, tags=['Users'])
62
61
  def get_users(
63
- curr_user = (
64
- fastapi.Depends(manager) if private else None
65
- ),
66
- ) -> List[str]:
62
+ curr_user = (
63
+ fastapi.Depends(manager) if private else None
64
+ ),
65
+ ) -> List[str]:
67
66
  """
68
67
  Get a list of the registered users.
69
68
  """
@@ -72,15 +71,15 @@ def get_users(
72
71
 
73
72
  @app.post(users_endpoint + "/register", tags=['Users'])
74
73
  def register_user(
75
- username: str = Form(None),
76
- password: str = Form(None),
77
- attributes: str = Form(None),
78
- type: str = Form(None),
79
- email: str = Form(None),
80
- curr_user = (
81
- fastapi.Depends(manager) if private else None
82
- ),
83
- ) -> SuccessTuple:
74
+ username: str = Form(None),
75
+ password: str = Form(None),
76
+ attributes: str = Form(None),
77
+ type: str = Form(None),
78
+ email: str = Form(None),
79
+ curr_user = (
80
+ fastapi.Depends(manager) if private else None
81
+ ),
82
+ ) -> SuccessTuple:
84
83
  """
85
84
  Register a new user.
86
85
  """
@@ -90,7 +89,7 @@ def register_user(
90
89
  if attributes is not None:
91
90
  try:
92
91
  attributes = string_to_dict(attributes)
93
- except Exception as e:
92
+ except Exception:
94
93
  return False, f"Invalid dictionary string received for attributes."
95
94
 
96
95
  allow_users = get_config('system', 'api', 'permissions', 'registration', 'users')
@@ -114,22 +113,22 @@ def register_user(
114
113
 
115
114
  @app.post(users_endpoint + "/edit", tags=['Users'])
116
115
  def edit_user(
117
- username: str = Form(None),
118
- password: str = Form(None),
119
- type: str = Form(None),
120
- email: str = Form(None),
121
- attributes: str = Form(None),
122
- curr_user = (
123
- fastapi.Depends(manager) if not no_auth else None
124
- ),
125
- ) -> SuccessTuple:
116
+ username: str = Form(None),
117
+ password: str = Form(None),
118
+ type: str = Form(None),
119
+ email: str = Form(None),
120
+ attributes: str = Form(None),
121
+ curr_user = (
122
+ fastapi.Depends(manager) if not no_auth else None
123
+ ),
124
+ ) -> SuccessTuple:
126
125
  """
127
126
  Edit an existing user.
128
127
  """
129
128
  if attributes is not None:
130
129
  try:
131
130
  attributes = string_to_dict(attributes)
132
- except Exception as e:
131
+ except Exception:
133
132
  return False, f"Invalid dictionary string received for attributes."
134
133
 
135
134
  user = User(username, password, email=email, attributes=attributes)
@@ -144,11 +143,11 @@ def edit_user(
144
143
 
145
144
  @app.get(users_endpoint + "/{username}/id", tags=['Users'])
146
145
  def get_user_id(
147
- username : str,
148
- curr_user = (
149
- fastapi.Depends(manager) if not no_auth else None
150
- ),
151
- ) -> Union[int, None]:
146
+ username : str,
147
+ curr_user = (
148
+ fastapi.Depends(manager) if not no_auth else None
149
+ ),
150
+ ) -> Union[int, None]:
152
151
  """
153
152
  Get a user's ID.
154
153
  """
@@ -157,23 +156,24 @@ def get_user_id(
157
156
 
158
157
  @app.get(users_endpoint + "/{username}/attributes", tags=['Users'])
159
158
  def get_user_attributes(
160
- username : str,
161
- curr_user = (
162
- fastapi.Depends(manager) if private else None
163
- ),
164
- ) -> Union[Dict[str, Any], None]:
159
+ username : str,
160
+ curr_user = (
161
+ fastapi.Depends(manager) if private else None
162
+ ),
163
+ ) -> Union[Dict[str, Any], None]:
165
164
  """
166
165
  Get a user's attributes.
167
166
  """
168
167
  return get_api_connector().get_user_attributes(User(username), debug=debug)
169
168
 
169
+
170
170
  @app.delete(users_endpoint + "/{username}", tags=['Users'])
171
171
  def delete_user(
172
- username: str,
173
- curr_user = (
174
- fastapi.Depends(manager) if not no_auth else None
175
- ),
176
- ) -> SuccessTuple:
172
+ username: str,
173
+ curr_user = (
174
+ fastapi.Depends(manager) if not no_auth else None
175
+ ),
176
+ ) -> SuccessTuple:
177
177
  """
178
178
  Delete a user.
179
179
  """
@@ -193,11 +193,11 @@ def delete_user(
193
193
 
194
194
  @app.get(users_endpoint + '/{username}/password_hash', tags=['Users'])
195
195
  def get_user_password_hash(
196
- username: str,
197
- curr_user = (
198
- fastapi.Depends(manager) if not no_auth else None
199
- ),
200
- ) -> str:
196
+ username: str,
197
+ curr_user = (
198
+ fastapi.Depends(manager) if not no_auth else None
199
+ ),
200
+ ) -> str:
201
201
  """
202
202
  If configured to allow chaining, return a user's password_hash.
203
203
  """
@@ -205,13 +205,14 @@ def get_user_password_hash(
205
205
  raise HTTPException(status_code=403, detail=DISALLOW_CHAINING_MESSAGE)
206
206
  return get_api_connector().get_user_password_hash(User(username), debug=debug)
207
207
 
208
+
208
209
  @app.get(users_endpoint + '/{username}/type', tags=['Users'])
209
210
  def get_user_type(
210
- username : str,
211
- curr_user = (
212
- fastapi.Depends(manager) if not no_auth else None
213
- ),
214
- ) -> str:
211
+ username : str,
212
+ curr_user = (
213
+ fastapi.Depends(manager) if not no_auth else None
214
+ ),
215
+ ) -> str:
215
216
  """
216
217
  If configured to allow chaining, return a user's type.
217
218
  """
@@ -2,4 +2,4 @@
2
2
  Specify the Meerschaum release version.
3
3
  """
4
4
 
5
- __version__ = "2.7.6"
5
+ __version__ = "2.7.8"
@@ -757,3 +757,23 @@ def get_pipe_columns_indices(
757
757
  warn(response.text)
758
758
  return None
759
759
  return j
760
+
761
+
762
+ def get_pipe_index_names(self, pipe: mrsm.Pipe, debug: bool = False) -> Dict[str, str]:
763
+ """
764
+ Return the templated index names.
765
+ """
766
+ r_url = pipe_r_url(pipe) + '/indices/names'
767
+ response = self.get(
768
+ r_url,
769
+ debug=debug
770
+ )
771
+ j = response.json()
772
+ if isinstance(j, dict) and 'detail' in j and len(j.keys()) == 1:
773
+ warn(j['detail'])
774
+ return None
775
+ if not isinstance(j, dict):
776
+ warn(response.text)
777
+ return None
778
+ return j
779
+