meerschaum 2.9.5__py3-none-any.whl → 3.0.0rc1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (153) hide show
  1. meerschaum/__init__.py +5 -2
  2. meerschaum/_internal/__init__.py +1 -0
  3. meerschaum/_internal/arguments/_parse_arguments.py +4 -4
  4. meerschaum/_internal/arguments/_parser.py +17 -1
  5. meerschaum/_internal/entry.py +6 -6
  6. meerschaum/_internal/shell/Shell.py +1 -1
  7. meerschaum/_internal/static.py +372 -0
  8. meerschaum/actions/api.py +12 -2
  9. meerschaum/actions/bootstrap.py +7 -7
  10. meerschaum/actions/edit.py +142 -18
  11. meerschaum/actions/register.py +137 -6
  12. meerschaum/actions/show.py +117 -29
  13. meerschaum/actions/stop.py +4 -1
  14. meerschaum/actions/sync.py +1 -1
  15. meerschaum/actions/tag.py +9 -8
  16. meerschaum/api/__init__.py +9 -2
  17. meerschaum/api/_events.py +39 -2
  18. meerschaum/api/_oauth2.py +118 -8
  19. meerschaum/api/_tokens.py +102 -0
  20. meerschaum/api/dash/__init__.py +0 -1
  21. meerschaum/api/dash/callbacks/custom.py +2 -2
  22. meerschaum/api/dash/callbacks/dashboard.py +102 -18
  23. meerschaum/api/dash/callbacks/plugins.py +0 -1
  24. meerschaum/api/dash/callbacks/register.py +1 -1
  25. meerschaum/api/dash/callbacks/settings/__init__.py +1 -0
  26. meerschaum/api/dash/callbacks/settings/password_reset.py +2 -2
  27. meerschaum/api/dash/callbacks/settings/tokens.py +388 -0
  28. meerschaum/api/dash/components.py +30 -8
  29. meerschaum/api/dash/keys.py +19 -93
  30. meerschaum/api/dash/pages/dashboard.py +1 -20
  31. meerschaum/api/dash/pages/settings/__init__.py +1 -0
  32. meerschaum/api/dash/pages/settings/password_reset.py +1 -1
  33. meerschaum/api/dash/pages/settings/tokens.py +55 -0
  34. meerschaum/api/dash/pipes.py +94 -59
  35. meerschaum/api/dash/sessions.py +12 -0
  36. meerschaum/api/dash/tokens.py +606 -0
  37. meerschaum/api/dash/websockets.py +1 -1
  38. meerschaum/api/dash/webterm.py +4 -0
  39. meerschaum/api/models/__init__.py +23 -3
  40. meerschaum/api/models/_actions.py +22 -0
  41. meerschaum/api/models/_pipes.py +85 -7
  42. meerschaum/api/models/_tokens.py +81 -0
  43. meerschaum/api/resources/templates/termpage.html +12 -0
  44. meerschaum/api/routes/__init__.py +1 -0
  45. meerschaum/api/routes/_actions.py +3 -4
  46. meerschaum/api/routes/_connectors.py +3 -7
  47. meerschaum/api/routes/_jobs.py +14 -35
  48. meerschaum/api/routes/_login.py +49 -12
  49. meerschaum/api/routes/_misc.py +5 -10
  50. meerschaum/api/routes/_pipes.py +134 -111
  51. meerschaum/api/routes/_plugins.py +38 -28
  52. meerschaum/api/routes/_tokens.py +236 -0
  53. meerschaum/api/routes/_users.py +47 -35
  54. meerschaum/api/routes/_version.py +3 -3
  55. meerschaum/config/__init__.py +43 -20
  56. meerschaum/config/_default.py +32 -5
  57. meerschaum/config/_edit.py +28 -24
  58. meerschaum/config/_environment.py +1 -1
  59. meerschaum/config/_patch.py +6 -6
  60. meerschaum/config/_paths.py +5 -1
  61. meerschaum/config/_read_config.py +65 -34
  62. meerschaum/config/_sync.py +6 -3
  63. meerschaum/config/_version.py +1 -1
  64. meerschaum/config/stack/__init__.py +24 -5
  65. meerschaum/config/static.py +18 -0
  66. meerschaum/connectors/_Connector.py +10 -4
  67. meerschaum/connectors/__init__.py +4 -20
  68. meerschaum/connectors/api/_APIConnector.py +34 -6
  69. meerschaum/connectors/api/_actions.py +2 -2
  70. meerschaum/connectors/api/_jobs.py +1 -1
  71. meerschaum/connectors/api/_login.py +33 -7
  72. meerschaum/connectors/api/_misc.py +2 -2
  73. meerschaum/connectors/api/_pipes.py +15 -14
  74. meerschaum/connectors/api/_plugins.py +2 -2
  75. meerschaum/connectors/api/_request.py +1 -1
  76. meerschaum/connectors/api/_tokens.py +146 -0
  77. meerschaum/connectors/api/_users.py +70 -58
  78. meerschaum/connectors/instance/_InstanceConnector.py +83 -0
  79. meerschaum/connectors/instance/__init__.py +10 -0
  80. meerschaum/connectors/instance/_pipes.py +442 -0
  81. meerschaum/connectors/instance/_plugins.py +151 -0
  82. meerschaum/connectors/instance/_tokens.py +296 -0
  83. meerschaum/connectors/instance/_users.py +181 -0
  84. meerschaum/connectors/parse.py +4 -1
  85. meerschaum/connectors/sql/_SQLConnector.py +8 -5
  86. meerschaum/connectors/sql/_cli.py +12 -11
  87. meerschaum/connectors/sql/_create_engine.py +6 -154
  88. meerschaum/connectors/sql/_fetch.py +2 -18
  89. meerschaum/connectors/sql/_pipes.py +42 -31
  90. meerschaum/connectors/sql/_plugins.py +29 -0
  91. meerschaum/connectors/sql/_sql.py +8 -1
  92. meerschaum/connectors/sql/_users.py +29 -2
  93. meerschaum/connectors/sql/tables/__init__.py +1 -1
  94. meerschaum/connectors/valkey/_ValkeyConnector.py +2 -4
  95. meerschaum/connectors/valkey/_pipes.py +9 -10
  96. meerschaum/connectors/valkey/_plugins.py +2 -26
  97. meerschaum/core/Pipe/__init__.py +31 -14
  98. meerschaum/core/Pipe/_attributes.py +156 -58
  99. meerschaum/core/Pipe/_bootstrap.py +54 -24
  100. meerschaum/core/Pipe/_data.py +41 -1
  101. meerschaum/core/Pipe/_dtypes.py +29 -14
  102. meerschaum/core/Pipe/_edit.py +12 -4
  103. meerschaum/core/Pipe/_show.py +5 -5
  104. meerschaum/core/Pipe/_sync.py +48 -53
  105. meerschaum/core/Pipe/_verify.py +1 -1
  106. meerschaum/{plugins → core/Plugin}/_Plugin.py +9 -11
  107. meerschaum/core/Plugin/__init__.py +1 -1
  108. meerschaum/core/Token/_Token.py +221 -0
  109. meerschaum/core/Token/__init__.py +12 -0
  110. meerschaum/core/User/_User.py +34 -8
  111. meerschaum/core/User/__init__.py +9 -1
  112. meerschaum/core/__init__.py +1 -0
  113. meerschaum/jobs/_Job.py +3 -2
  114. meerschaum/jobs/__init__.py +3 -2
  115. meerschaum/jobs/systemd.py +1 -1
  116. meerschaum/models/__init__.py +35 -0
  117. meerschaum/models/pipes.py +247 -0
  118. meerschaum/models/tokens.py +38 -0
  119. meerschaum/models/users.py +26 -0
  120. meerschaum/plugins/__init__.py +22 -7
  121. meerschaum/plugins/bootstrap.py +2 -1
  122. meerschaum/utils/_get_pipes.py +68 -27
  123. meerschaum/utils/daemon/Daemon.py +2 -1
  124. meerschaum/utils/daemon/__init__.py +30 -2
  125. meerschaum/utils/dataframe.py +95 -14
  126. meerschaum/utils/dtypes/__init__.py +91 -18
  127. meerschaum/utils/dtypes/sql.py +44 -0
  128. meerschaum/utils/formatting/__init__.py +1 -1
  129. meerschaum/utils/formatting/_pipes.py +5 -4
  130. meerschaum/utils/formatting/_shell.py +11 -9
  131. meerschaum/utils/misc.py +237 -80
  132. meerschaum/utils/packages/__init__.py +3 -6
  133. meerschaum/utils/packages/_packages.py +34 -32
  134. meerschaum/utils/pipes.py +181 -0
  135. meerschaum/utils/process.py +1 -1
  136. meerschaum/utils/prompt.py +3 -1
  137. meerschaum/utils/schedule.py +1 -0
  138. meerschaum/utils/sql.py +114 -37
  139. meerschaum/utils/typing.py +1 -4
  140. meerschaum/utils/venv/_Venv.py +2 -2
  141. meerschaum/utils/venv/__init__.py +5 -7
  142. {meerschaum-2.9.5.dist-info → meerschaum-3.0.0rc1.dist-info}/METADATA +88 -80
  143. meerschaum-3.0.0rc1.dist-info/RECORD +282 -0
  144. {meerschaum-2.9.5.dist-info → meerschaum-3.0.0rc1.dist-info}/WHEEL +1 -1
  145. meerschaum/api/models/_interfaces.py +0 -15
  146. meerschaum/api/models/_locations.py +0 -15
  147. meerschaum/api/models/_metrics.py +0 -15
  148. meerschaum/config/static/__init__.py +0 -186
  149. meerschaum-2.9.5.dist-info/RECORD +0 -263
  150. {meerschaum-2.9.5.dist-info → meerschaum-3.0.0rc1.dist-info}/entry_points.txt +0 -0
  151. {meerschaum-2.9.5.dist-info → meerschaum-3.0.0rc1.dist-info}/licenses/LICENSE +0 -0
  152. {meerschaum-2.9.5.dist-info → meerschaum-3.0.0rc1.dist-info}/top_level.txt +0 -0
  153. {meerschaum-2.9.5.dist-info → meerschaum-3.0.0rc1.dist-info}/zip-safe +0 -0
@@ -131,6 +131,7 @@ DB_TO_PD_DTYPES: Dict[str, Union[str, Dict[str, str]]] = {
131
131
  PD_TO_DB_DTYPES_FLAVORS: Dict[str, Dict[str, str]] = {
132
132
  'int': {
133
133
  'timescaledb': 'BIGINT',
134
+ 'timescaledb-ha': 'BIGINT',
134
135
  'postgresql': 'BIGINT',
135
136
  'postgis': 'BIGINT',
136
137
  'mariadb': 'BIGINT',
@@ -145,6 +146,7 @@ PD_TO_DB_DTYPES_FLAVORS: Dict[str, Dict[str, str]] = {
145
146
  },
146
147
  'uint': {
147
148
  'timescaledb': 'BIGINT',
149
+ 'timescaledb-ha': 'BIGINT',
148
150
  'postgresql': 'BIGINT',
149
151
  'postgis': 'BIGINT',
150
152
  'mariadb': 'BIGINT',
@@ -159,6 +161,7 @@ PD_TO_DB_DTYPES_FLAVORS: Dict[str, Dict[str, str]] = {
159
161
  },
160
162
  'int8': {
161
163
  'timescaledb': 'SMALLINT',
164
+ 'timescaledb-ha': 'SMALLINT',
162
165
  'postgresql': 'SMALLINT',
163
166
  'postgis': 'SMALLINT',
164
167
  'mariadb': 'SMALLINT',
@@ -173,6 +176,7 @@ PD_TO_DB_DTYPES_FLAVORS: Dict[str, Dict[str, str]] = {
173
176
  },
174
177
  'uint8': {
175
178
  'timescaledb': 'SMALLINT',
179
+ 'timescaledb-ha': 'SMALLINT',
176
180
  'postgresql': 'SMALLINT',
177
181
  'postgis': 'SMALLINT',
178
182
  'mariadb': 'SMALLINT',
@@ -187,6 +191,7 @@ PD_TO_DB_DTYPES_FLAVORS: Dict[str, Dict[str, str]] = {
187
191
  },
188
192
  'int16': {
189
193
  'timescaledb': 'SMALLINT',
194
+ 'timescaledb-ha': 'SMALLINT',
190
195
  'postgresql': 'SMALLINT',
191
196
  'postgis': 'SMALLINT',
192
197
  'mariadb': 'SMALLINT',
@@ -201,6 +206,7 @@ PD_TO_DB_DTYPES_FLAVORS: Dict[str, Dict[str, str]] = {
201
206
  },
202
207
  'int32': {
203
208
  'timescaledb': 'INT',
209
+ 'timescaledb-ha': 'INT',
204
210
  'postgresql': 'INT',
205
211
  'postgis': 'INT',
206
212
  'mariadb': 'INT',
@@ -215,6 +221,7 @@ PD_TO_DB_DTYPES_FLAVORS: Dict[str, Dict[str, str]] = {
215
221
  },
216
222
  'int64': {
217
223
  'timescaledb': 'BIGINT',
224
+ 'timescaledb-ha': 'BIGINT',
218
225
  'postgresql': 'BIGINT',
219
226
  'postgis': 'BIGINT',
220
227
  'mariadb': 'BIGINT',
@@ -229,6 +236,7 @@ PD_TO_DB_DTYPES_FLAVORS: Dict[str, Dict[str, str]] = {
229
236
  },
230
237
  'float': {
231
238
  'timescaledb': 'DOUBLE PRECISION',
239
+ 'timescaledb-ha': 'DOUBLE PRECISION',
232
240
  'postgresql': 'DOUBLE PRECISION',
233
241
  'postgis': 'DOUBLE PRECISION',
234
242
  'mariadb': 'DOUBLE PRECISION',
@@ -243,6 +251,7 @@ PD_TO_DB_DTYPES_FLAVORS: Dict[str, Dict[str, str]] = {
243
251
  },
244
252
  'double': {
245
253
  'timescaledb': 'DOUBLE PRECISION',
254
+ 'timescaledb-ha': 'DOUBLE PRECISION',
246
255
  'postgresql': 'DOUBLE PRECISION',
247
256
  'postgis': 'DOUBLE PRECISION',
248
257
  'mariadb': 'DOUBLE PRECISION',
@@ -257,6 +266,7 @@ PD_TO_DB_DTYPES_FLAVORS: Dict[str, Dict[str, str]] = {
257
266
  },
258
267
  'datetime64[ns]': {
259
268
  'timescaledb': 'TIMESTAMP',
269
+ 'timescaledb-ha': 'TIMESTAMP',
260
270
  'postgresql': 'TIMESTAMP',
261
271
  'postgis': 'TIMESTAMP',
262
272
  'mariadb': 'DATETIME',
@@ -271,6 +281,7 @@ PD_TO_DB_DTYPES_FLAVORS: Dict[str, Dict[str, str]] = {
271
281
  },
272
282
  'datetime64[ns, UTC]': {
273
283
  'timescaledb': 'TIMESTAMPTZ',
284
+ 'timescaledb-ha': 'TIMESTAMPTZ',
274
285
  'postgresql': 'TIMESTAMPTZ',
275
286
  'postgis': 'TIMESTAMPTZ',
276
287
  'mariadb': 'DATETIME',
@@ -285,6 +296,7 @@ PD_TO_DB_DTYPES_FLAVORS: Dict[str, Dict[str, str]] = {
285
296
  },
286
297
  'datetime': {
287
298
  'timescaledb': 'TIMESTAMPTZ',
299
+ 'timescaledb-ha': 'TIMESTAMPTZ',
288
300
  'postgresql': 'TIMESTAMPTZ',
289
301
  'postgis': 'TIMESTAMPTZ',
290
302
  'mariadb': 'DATETIME',
@@ -299,6 +311,7 @@ PD_TO_DB_DTYPES_FLAVORS: Dict[str, Dict[str, str]] = {
299
311
  },
300
312
  'datetimetz': {
301
313
  'timescaledb': 'TIMESTAMPTZ',
314
+ 'timescaledb-ha': 'TIMESTAMPTZ',
302
315
  'postgresql': 'TIMESTAMPTZ',
303
316
  'postgis': 'TIMESTAMPTZ',
304
317
  'mariadb': 'DATETIME',
@@ -313,6 +326,7 @@ PD_TO_DB_DTYPES_FLAVORS: Dict[str, Dict[str, str]] = {
313
326
  },
314
327
  'bool': {
315
328
  'timescaledb': 'BOOLEAN',
329
+ 'timescaledb-ha': 'BOOLEAN',
316
330
  'postgresql': 'BOOLEAN',
317
331
  'postgis': 'BOOLEAN',
318
332
  'mariadb': 'BOOLEAN',
@@ -327,6 +341,7 @@ PD_TO_DB_DTYPES_FLAVORS: Dict[str, Dict[str, str]] = {
327
341
  },
328
342
  'object': {
329
343
  'timescaledb': 'TEXT',
344
+ 'timescaledb-ha': 'TEXT',
330
345
  'postgresql': 'TEXT',
331
346
  'postgis': 'TEXT',
332
347
  'mariadb': 'TEXT',
@@ -341,6 +356,7 @@ PD_TO_DB_DTYPES_FLAVORS: Dict[str, Dict[str, str]] = {
341
356
  },
342
357
  'string': {
343
358
  'timescaledb': 'TEXT',
359
+ 'timescaledb-ha': 'TEXT',
344
360
  'postgresql': 'TEXT',
345
361
  'postgis': 'TEXT',
346
362
  'mariadb': 'TEXT',
@@ -355,6 +371,7 @@ PD_TO_DB_DTYPES_FLAVORS: Dict[str, Dict[str, str]] = {
355
371
  },
356
372
  'unicode': {
357
373
  'timescaledb': 'TEXT',
374
+ 'timescaledb-ha': 'TEXT',
358
375
  'postgresql': 'TEXT',
359
376
  'postgis': 'TEXT',
360
377
  'mariadb': 'TEXT',
@@ -369,6 +386,7 @@ PD_TO_DB_DTYPES_FLAVORS: Dict[str, Dict[str, str]] = {
369
386
  },
370
387
  'json': {
371
388
  'timescaledb': 'JSONB',
389
+ 'timescaledb-ha': 'JSONB',
372
390
  'postgresql': 'JSONB',
373
391
  'postgis': 'JSONB',
374
392
  'mariadb': 'TEXT',
@@ -383,6 +401,7 @@ PD_TO_DB_DTYPES_FLAVORS: Dict[str, Dict[str, str]] = {
383
401
  },
384
402
  'numeric': {
385
403
  'timescaledb': 'NUMERIC',
404
+ 'timescaledb-ha': 'NUMERIC',
386
405
  'postgresql': 'NUMERIC',
387
406
  'postgis': 'NUMERIC',
388
407
  'mariadb': f'DECIMAL{NUMERIC_PRECISION_FLAVORS["mariadb"]}',
@@ -397,6 +416,7 @@ PD_TO_DB_DTYPES_FLAVORS: Dict[str, Dict[str, str]] = {
397
416
  },
398
417
  'uuid': {
399
418
  'timescaledb': 'UUID',
419
+ 'timescaledb-ha': 'UUID',
400
420
  'postgresql': 'UUID',
401
421
  'postgis': 'UUID',
402
422
  'mariadb': 'CHAR(36)',
@@ -412,6 +432,7 @@ PD_TO_DB_DTYPES_FLAVORS: Dict[str, Dict[str, str]] = {
412
432
  },
413
433
  'bytes': {
414
434
  'timescaledb': 'BYTEA',
435
+ 'timescaledb-ha': 'BYTEA',
415
436
  'postgresql': 'BYTEA',
416
437
  'postgis': 'BYTEA',
417
438
  'mariadb': 'BLOB',
@@ -426,6 +447,7 @@ PD_TO_DB_DTYPES_FLAVORS: Dict[str, Dict[str, str]] = {
426
447
  },
427
448
  'geometry': {
428
449
  'timescaledb': 'TEXT',
450
+ 'timescaledb-ha': 'GEOMETRY',
429
451
  'postgresql': 'TEXT',
430
452
  'postgis': 'GEOMETRY',
431
453
  'mariadb': 'TEXT',
@@ -440,6 +462,7 @@ PD_TO_DB_DTYPES_FLAVORS: Dict[str, Dict[str, str]] = {
440
462
  },
441
463
  'geography': {
442
464
  'timescaledb': 'TEXT',
465
+ 'timescaledb-ha': 'GEOGRAPHY',
443
466
  'postgresql': 'TEXT',
444
467
  'postgis': 'GEOGRAPHY',
445
468
  'mariadb': 'TEXT',
@@ -456,6 +479,7 @@ PD_TO_DB_DTYPES_FLAVORS: Dict[str, Dict[str, str]] = {
456
479
  PD_TO_SQLALCHEMY_DTYPES_FLAVORS: Dict[str, Dict[str, str]] = {
457
480
  'int': {
458
481
  'timescaledb': 'BigInteger',
482
+ 'timescaledb-ha': 'BigInteger',
459
483
  'postgresql': 'BigInteger',
460
484
  'postgis': 'BigInteger',
461
485
  'mariadb': 'BigInteger',
@@ -470,6 +494,7 @@ PD_TO_SQLALCHEMY_DTYPES_FLAVORS: Dict[str, Dict[str, str]] = {
470
494
  },
471
495
  'uint': {
472
496
  'timescaledb': 'BigInteger',
497
+ 'timescaledb-ha': 'BigInteger',
473
498
  'postgresql': 'BigInteger',
474
499
  'postgis': 'BigInteger',
475
500
  'mariadb': 'BigInteger',
@@ -484,6 +509,7 @@ PD_TO_SQLALCHEMY_DTYPES_FLAVORS: Dict[str, Dict[str, str]] = {
484
509
  },
485
510
  'int8': {
486
511
  'timescaledb': 'SmallInteger',
512
+ 'timescaledb-ha': 'SmallInteger',
487
513
  'postgresql': 'SmallInteger',
488
514
  'postgis': 'SmallInteger',
489
515
  'mariadb': 'SmallInteger',
@@ -498,6 +524,7 @@ PD_TO_SQLALCHEMY_DTYPES_FLAVORS: Dict[str, Dict[str, str]] = {
498
524
  },
499
525
  'uint8': {
500
526
  'timescaledb': 'SmallInteger',
527
+ 'timescaledb-ha': 'SmallInteger',
501
528
  'postgresql': 'SmallInteger',
502
529
  'postgis': 'SmallInteger',
503
530
  'mariadb': 'SmallInteger',
@@ -512,6 +539,7 @@ PD_TO_SQLALCHEMY_DTYPES_FLAVORS: Dict[str, Dict[str, str]] = {
512
539
  },
513
540
  'int16': {
514
541
  'timescaledb': 'SmallInteger',
542
+ 'timescaledb-ha': 'SmallInteger',
515
543
  'postgresql': 'SmallInteger',
516
544
  'postgis': 'SmallInteger',
517
545
  'mariadb': 'SmallInteger',
@@ -526,6 +554,7 @@ PD_TO_SQLALCHEMY_DTYPES_FLAVORS: Dict[str, Dict[str, str]] = {
526
554
  },
527
555
  'int32': {
528
556
  'timescaledb': 'Integer',
557
+ 'timescaledb-ha': 'Integer',
529
558
  'postgresql': 'Integer',
530
559
  'postgis': 'Integer',
531
560
  'mariadb': 'Integer',
@@ -540,6 +569,7 @@ PD_TO_SQLALCHEMY_DTYPES_FLAVORS: Dict[str, Dict[str, str]] = {
540
569
  },
541
570
  'int64': {
542
571
  'timescaledb': 'BigInteger',
572
+ 'timescaledb-ha': 'BigInteger',
543
573
  'postgresql': 'BigInteger',
544
574
  'postgis': 'BigInteger',
545
575
  'mariadb': 'BigInteger',
@@ -554,6 +584,7 @@ PD_TO_SQLALCHEMY_DTYPES_FLAVORS: Dict[str, Dict[str, str]] = {
554
584
  },
555
585
  'float': {
556
586
  'timescaledb': 'Float',
587
+ 'timescaledb-ha': 'Float',
557
588
  'postgresql': 'Float',
558
589
  'postgis': 'Float',
559
590
  'mariadb': 'Float',
@@ -568,6 +599,7 @@ PD_TO_SQLALCHEMY_DTYPES_FLAVORS: Dict[str, Dict[str, str]] = {
568
599
  },
569
600
  'datetime': {
570
601
  'timescaledb': 'DateTime(timezone=True)',
602
+ 'timescaledb-ha': 'DateTime(timezone=True)',
571
603
  'postgresql': 'DateTime(timezone=True)',
572
604
  'postgis': 'DateTime(timezone=True)',
573
605
  'mariadb': 'DateTime(timezone=True)',
@@ -582,6 +614,7 @@ PD_TO_SQLALCHEMY_DTYPES_FLAVORS: Dict[str, Dict[str, str]] = {
582
614
  },
583
615
  'datetime64[ns]': {
584
616
  'timescaledb': 'DateTime',
617
+ 'timescaledb-ha': 'DateTime',
585
618
  'postgresql': 'DateTime',
586
619
  'postgis': 'DateTime',
587
620
  'mariadb': 'DateTime',
@@ -596,6 +629,7 @@ PD_TO_SQLALCHEMY_DTYPES_FLAVORS: Dict[str, Dict[str, str]] = {
596
629
  },
597
630
  'datetime64[ns, UTC]': {
598
631
  'timescaledb': 'DateTime(timezone=True)',
632
+ 'timescaledb-ha': 'DateTime(timezone=True)',
599
633
  'postgresql': 'DateTime(timezone=True)',
600
634
  'postgis': 'DateTime(timezone=True)',
601
635
  'mariadb': 'DateTime(timezone=True)',
@@ -610,6 +644,7 @@ PD_TO_SQLALCHEMY_DTYPES_FLAVORS: Dict[str, Dict[str, str]] = {
610
644
  },
611
645
  'bool': {
612
646
  'timescaledb': 'Boolean',
647
+ 'timescaledb-ha': 'Boolean',
613
648
  'postgresql': 'Boolean',
614
649
  'postgis': 'Boolean',
615
650
  'mariadb': 'Integer',
@@ -624,6 +659,7 @@ PD_TO_SQLALCHEMY_DTYPES_FLAVORS: Dict[str, Dict[str, str]] = {
624
659
  },
625
660
  'object': {
626
661
  'timescaledb': 'UnicodeText',
662
+ 'timescaledb-ha': 'UnicodeText',
627
663
  'postgresql': 'UnicodeText',
628
664
  'postgis': 'UnicodeText',
629
665
  'mariadb': 'UnicodeText',
@@ -638,6 +674,7 @@ PD_TO_SQLALCHEMY_DTYPES_FLAVORS: Dict[str, Dict[str, str]] = {
638
674
  },
639
675
  'string': {
640
676
  'timescaledb': 'UnicodeText',
677
+ 'timescaledb-ha': 'UnicodeText',
641
678
  'postgresql': 'UnicodeText',
642
679
  'postgis': 'UnicodeText',
643
680
  'mariadb': 'UnicodeText',
@@ -652,6 +689,7 @@ PD_TO_SQLALCHEMY_DTYPES_FLAVORS: Dict[str, Dict[str, str]] = {
652
689
  },
653
690
  'json': {
654
691
  'timescaledb': 'sqlalchemy.dialects.postgresql.JSONB',
692
+ 'timescaledb-ha': 'sqlalchemy.dialects.postgresql.JSONB',
655
693
  'postgresql': 'sqlalchemy.dialects.postgresql.JSONB',
656
694
  'postgis': 'sqlalchemy.dialects.postgresql.JSONB',
657
695
  'mariadb': 'UnicodeText',
@@ -666,6 +704,7 @@ PD_TO_SQLALCHEMY_DTYPES_FLAVORS: Dict[str, Dict[str, str]] = {
666
704
  },
667
705
  'numeric': {
668
706
  'timescaledb': 'Numeric',
707
+ 'timescaledb-ha': 'Numeric',
669
708
  'postgresql': 'Numeric',
670
709
  'postgis': 'Numeric',
671
710
  'mariadb': 'Numeric',
@@ -680,6 +719,7 @@ PD_TO_SQLALCHEMY_DTYPES_FLAVORS: Dict[str, Dict[str, str]] = {
680
719
  },
681
720
  'uuid': {
682
721
  'timescaledb': 'Uuid',
722
+ 'timescaledb-ha': 'Uuid',
683
723
  'postgresql': 'Uuid',
684
724
  'postgis': 'Uuid',
685
725
  'mariadb': 'sqlalchemy.dialects.mysql.CHAR(36)',
@@ -694,6 +734,7 @@ PD_TO_SQLALCHEMY_DTYPES_FLAVORS: Dict[str, Dict[str, str]] = {
694
734
  },
695
735
  'bytes': {
696
736
  'timescaledb': 'LargeBinary',
737
+ 'timescaledb-ha': 'LargeBinary',
697
738
  'postgresql': 'LargeBinary',
698
739
  'postgis': 'LargeBinary',
699
740
  'mariadb': 'LargeBinary',
@@ -708,6 +749,7 @@ PD_TO_SQLALCHEMY_DTYPES_FLAVORS: Dict[str, Dict[str, str]] = {
708
749
  },
709
750
  'geometry': {
710
751
  'timescaledb': 'UnicodeText',
752
+ 'timescaledb-ha': 'geoalchemy2.Geometry',
711
753
  'postgresql': 'UnicodeText',
712
754
  'postgis': 'geoalchemy2.Geometry',
713
755
  'mariadb': 'UnicodeText',
@@ -722,6 +764,7 @@ PD_TO_SQLALCHEMY_DTYPES_FLAVORS: Dict[str, Dict[str, str]] = {
722
764
  },
723
765
  'geography': {
724
766
  'timescaledb': 'UnicodeText',
767
+ 'timescaledb-ha': 'geoalchemy2.Geography',
725
768
  'postgresql': 'UnicodeText',
726
769
  'postgis': 'geoalchemy2.Geography',
727
770
  'mariadb': 'UnicodeText',
@@ -738,6 +781,7 @@ PD_TO_SQLALCHEMY_DTYPES_FLAVORS: Dict[str, Dict[str, str]] = {
738
781
 
739
782
  AUTO_INCREMENT_COLUMN_FLAVORS: Dict[str, str] = {
740
783
  'timescaledb': 'GENERATED BY DEFAULT AS IDENTITY',
784
+ 'timescaledb-ha': 'GENERATED BY DEFAULT AS IDENTITY',
741
785
  'postgresql': 'GENERATED BY DEFAULT AS IDENTITY',
742
786
  'postgis': 'GENERATED BY DEFAULT AS IDENTITY',
743
787
  'mariadb': 'AUTO_INCREMENT',
@@ -247,7 +247,7 @@ def print_tuple(
247
247
  If `True`, use the default emoji and color scheme.
248
248
 
249
249
  """
250
- from meerschaum.config.static import STATIC_CONFIG
250
+ from meerschaum._internal.static import STATIC_CONFIG
251
251
  do_print = True
252
252
 
253
253
  omit_messages = STATIC_CONFIG['system']['success']['ignore']
@@ -12,6 +12,7 @@ import meerschaum as mrsm
12
12
  from meerschaum.utils.typing import PipesDict, Dict, Union, Optional, SuccessTuple, Any, List
13
13
  from meerschaum.config import get_config
14
14
 
15
+
15
16
  def pprint_pipes(pipes: PipesDict) -> None:
16
17
  """Print a stylized tree of a Pipes dictionary.
17
18
  Supports ANSI and UNICODE global settings."""
@@ -379,10 +380,10 @@ def highlight_pipes(message: str) -> str:
379
380
 
380
381
 
381
382
  def format_pipe_success_tuple(
382
- pipe: mrsm.Pipe,
383
- success_tuple: SuccessTuple,
384
- nopretty: bool = False,
385
- ) -> str:
383
+ pipe: mrsm.Pipe,
384
+ success_tuple: SuccessTuple,
385
+ nopretty: bool = False,
386
+ ) -> str:
386
387
  """
387
388
  Return a formatted string of a pipe and its resulting SuccessTuple.
388
389
 
@@ -11,15 +11,12 @@ from meerschaum.utils.threading import Lock
11
11
  _locks = {'_tried_clear_command': Lock()}
12
12
 
13
13
 
14
- def make_header(
15
- message: str,
16
- ruler: str = '─',
17
- ) -> str:
14
+ def make_header(message: str, ruler: str = '─', left_pad: int = 2) -> str:
18
15
  """Format a message string with a ruler.
19
16
  Length of the ruler is the length of the longest word.
20
17
 
21
18
  Example:
22
- 'My\nheader' -> 'My\nheader\n──────'
19
+ 'My\nheader' -> ' My\n header\n ──────'
23
20
  """
24
21
 
25
22
  from meerschaum.utils.formatting import ANSI, UNICODE, colored
@@ -32,10 +29,15 @@ def make_header(
32
29
  if length > max_length:
33
30
  max_length = length
34
31
 
35
- s = message + "\n"
36
- for i in range(max_length):
37
- s += ruler
38
- return s
32
+ left_buffer = left_pad * ' '
33
+
34
+ return (
35
+ left_buffer
36
+ + message.replace('\n', '\n' + left_buffer)
37
+ + "\n"
38
+ + left_buffer
39
+ + (ruler * max_length)
40
+ )
39
41
 
40
42
 
41
43
  _tried_clear_command = None