meerschaum 3.0.6__py3-none-any.whl → 3.0.8__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.
meerschaum/api/_chain.py CHANGED
@@ -11,7 +11,7 @@ from __future__ import annotations
11
11
  DISALLOW_CHAINING_MESSAGE = """API chaining is not enabled on this Meerschaum instance!
12
12
 
13
13
  If you manage this server and want to allow this API instance be a parent instance for other API instances,
14
- run `edit config system` and search for `permissions`.
14
+ run `edit config api` and search for `permissions`.
15
15
  Under 'api:permissions:chaining', change the value of `child_apis` to `true`, and restart the API.
16
16
 
17
17
  It is highly encouraged that you serve this API over HTTPS! Sensitive data like pipe data and salted
@@ -20,5 +20,5 @@ password hashes will be shared between APIs."""
20
20
  def check_allow_chaining() -> bool:
21
21
  """Consult the configuration to see if"""
22
22
  from meerschaum.config import get_config
23
- return get_config('system', 'api', 'permissions', 'chaining', 'child_apis')
23
+ return get_config('api', 'permissions', 'chaining', 'child_apis')
24
24
 
meerschaum/api/_chunks.py CHANGED
@@ -14,7 +14,7 @@ from meerschaum.api import get_cache_connector
14
14
  from meerschaum.utils.misc import generate_password
15
15
 
16
16
  CHUNKS_TOKENS_GENERATORS: Dict[str, Dict[str, Union[Generator[Any, None, None], datetime, int]]]
17
- DEFAULT_TTL_SECONDS = mrsm.get_config('system', 'api', 'data', 'chunks', 'ttl_seconds')
17
+ DEFAULT_TTL_SECONDS = mrsm.get_config('api', 'data', 'chunks', 'ttl_seconds')
18
18
 
19
19
 
20
20
  def generate_chunks_cursor_token(
@@ -15,7 +15,7 @@ from meerschaum.config import get_config
15
15
  from meerschaum.utils.warnings import dprint
16
16
 
17
17
  SESSION_KEY_TEMPLATE: str = 'mrsm_session_id:{session_id}'
18
- EXPIRES_SECONDS: int = get_config('system', 'api', 'cache', 'session_expires_minutes') * 60
18
+ EXPIRES_SECONDS: int = get_config('api', 'cache', 'session_expires_minutes') * 60
19
19
  _active_sessions: Dict[str, Dict[str, Any]] = {}
20
20
 
21
21
 
@@ -155,7 +155,7 @@ def is_session_authenticated(session_id: Optional[str]) -> bool:
155
155
  if cached_auth is not None:
156
156
  return cached_auth
157
157
 
158
- permissions = get_config('system', 'api', 'permissions')
158
+ permissions = get_config('api', 'permissions')
159
159
  allow_non_admin = permissions.get('actions', {}).get('non_admin', False)
160
160
 
161
161
  is_auth = True if allow_non_admin else session_is_admin(session_id)
@@ -417,7 +417,7 @@ def build_tokens_register_input_modal() -> dbc.Modal:
417
417
  """
418
418
  now = datetime.now(timezone.utc)
419
419
  default_expiration_days = mrsm.get_config(
420
- 'system', 'api', 'tokens', 'default_expiration_days',
420
+ 'api', 'tokens', 'default_expiration_days',
421
421
  ) or 366
422
422
  default_expiration = round_time(
423
423
  now + timedelta(days=default_expiration_days),
@@ -35,7 +35,7 @@ from meerschaum.utils.warnings import warn
35
35
  from meerschaum.api._oauth2 import CustomOAuth2PasswordRequestForm
36
36
 
37
37
 
38
- USER_ID_CACHE_EXPIRES_SECONDS: int = mrsm.get_config('system', 'api', 'cache', 'session_expires_minutes') * 60
38
+ USER_ID_CACHE_EXPIRES_SECONDS: int = mrsm.get_config('api', 'cache', 'session_expires_minutes') * 60
39
39
  _active_user_ids = {}
40
40
 
41
41
 
@@ -58,7 +58,7 @@ StreamingResponse = fastapi_responses.StreamingResponse
58
58
  pipes_endpoint = endpoints['pipes']
59
59
  pd = attempt_import('pandas', lazy=False)
60
60
 
61
- MAX_RESPONSE_ROW_LIMIT: int = mrsm.get_config('system', 'api', 'data', 'max_response_row_limit')
61
+ MAX_RESPONSE_ROW_LIMIT: int = mrsm.get_config('api', 'data', 'max_response_row_limit')
62
62
 
63
63
 
64
64
  @app.post(
@@ -77,12 +77,12 @@ def register_pipe(
77
77
  """
78
78
  Register a new pipe.
79
79
  """
80
- allow_pipes = mrsm.get_config('system', 'api', 'permissions', 'registration', 'pipes')
80
+ allow_pipes = mrsm.get_config('api', 'permissions', 'registration', 'pipes')
81
81
  if not allow_pipes:
82
82
  return False, (
83
83
  "The administrator for this server has not allowed pipe registration.\n\n"
84
84
  "Please contact the system administrator, or if you are running this server, "
85
- "open the configuration file with `edit config system` and search for 'permissions'."
85
+ "open the configuration file with `edit config api` and search for 'permissions'."
86
86
  " Under the keys `api:permissions:registration`, " +
87
87
  "you can toggle various registration types."
88
88
  )
@@ -116,12 +116,12 @@ def edit_pipe(
116
116
  """
117
117
  Edit an existing pipe's parameters.
118
118
  """
119
- allow_actions = mrsm.get_config('system', 'api', 'permissions', 'actions', 'non_admin')
119
+ allow_actions = mrsm.get_config('api', 'permissions', 'actions', 'non_admin')
120
120
  if not allow_actions:
121
121
  return False, (
122
122
  "The administrator for this server has not allowed actions.\n\n"
123
123
  "Please contact the system administrator, or if you are running this server, "
124
- "open the configuration file with `edit config system` and search for 'permissions'."
124
+ "open the configuration file with `edit config api` and search for 'permissions'."
125
125
  " Under the keys `api:permissions:actions`, "
126
126
  "you can toggle non-admin actions."
127
127
  )
@@ -81,12 +81,12 @@ def register_plugin(
81
81
 
82
82
  """
83
83
  from meerschaum.config import get_config
84
- allow_plugins = get_config('system', 'api', 'permissions', 'registration', 'plugins')
84
+ allow_plugins = get_config('api', 'permissions', 'registration', 'plugins')
85
85
  if not allow_plugins:
86
86
  return False, (
87
87
  "The administrator for this server has not allowed plugin registration.\n\n" +
88
88
  "Please contact the system administrator, or if you are running this server, " +
89
- "open the configuration file with `edit config system` and search for 'permissions'. " +
89
+ "open the configuration file with `edit config api` and search for 'permissions'. " +
90
90
  " Under the keys `api:permissions:registration`, " +
91
91
  "you can toggle various registration types."
92
92
  )
@@ -109,12 +109,12 @@ def register_user(
109
109
  except Exception:
110
110
  return False, "Invalid dictionary string received for attributes."
111
111
 
112
- allow_users = get_config('system', 'api', 'permissions', 'registration', 'users')
112
+ allow_users = get_config('api', 'permissions', 'registration', 'users')
113
113
  if not allow_users:
114
114
  return False, (
115
115
  "The administrator for this server has not allowed user registration.\n\n"
116
116
  "Please contact the system administrator, or if you are running this server, "
117
- "open the configuration file with `edit config system` and search for 'permissions'. "
117
+ "open the configuration file with `edit config api` and search for 'permissions'. "
118
118
  " Under the keys api:permissions:registration, "
119
119
  "you can toggle various registration types."
120
120
  )
@@ -119,8 +119,6 @@ default_system_config = {
119
119
  'api': {
120
120
  },
121
121
  },
122
- 'api': 'MRSM{api}',
123
- 'webterm': 'MRSM{api:webterm}',
124
122
  'cli': {
125
123
  'max_daemons': (multiprocessing.cpu_count() * 3),
126
124
  'refresh_seconds': 0.1,
@@ -153,6 +151,7 @@ default_system_config = {
153
151
  'daemon',
154
152
  'sql',
155
153
  'register plugin',
154
+ 'copy ',
156
155
  ],
157
156
  },
158
157
  'experimental': {
@@ -2,4 +2,4 @@
2
2
  Specify the Meerschaum release version.
3
3
  """
4
4
 
5
- __version__ = "3.0.6"
5
+ __version__ = "3.0.8"
@@ -1134,7 +1134,7 @@ def psql_insert_copy(
1134
1134
 
1135
1135
  from meerschaum.utils.sql import sql_item_name
1136
1136
  from meerschaum.utils.warnings import dprint
1137
- from meerschaum.utils.dtypes import json_serialize_value
1137
+ from meerschaum.utils.dtypes import json_serialize_value, value_is_null
1138
1138
 
1139
1139
  ### NOTE: PostgreSQL doesn't support NUL chars in text, so they're removed from strings.
1140
1140
  data_iter = (
@@ -1152,7 +1152,7 @@ def psql_insert_copy(
1152
1152
  else item.replace('\0', '').replace('\\u0000', '')
1153
1153
  )
1154
1154
  )
1155
- ) if item is not None
1155
+ ) if not value_is_null(item)
1156
1156
  else r'\N'
1157
1157
  for item in row
1158
1158
  ) for row in data_iter
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: meerschaum
3
- Version: 3.0.6
3
+ Version: 3.0.8
4
4
  Summary: Sync Time-Series Pipes with Meerschaum
5
5
  Author-email: Bennett Meares <bennett.meares@gmail.com>
6
6
  Maintainer-email: Bennett Meares <bennett.meares@gmail.com>
@@ -53,8 +53,8 @@ meerschaum/actions/uninstall.py,sha256=tBXhdXggSieGEQe4EPGxpgMK0MZTJCweNvAJ9-59E
53
53
  meerschaum/actions/upgrade.py,sha256=-N7S0ewA__azTg4Q-Woj0Ehv2SN-Siarr4_HGPlJREk,6711
54
54
  meerschaum/actions/verify.py,sha256=yKNqh2T38t3yxqErr2o8i-nNG4ZZuyQUkaImATRdl5M,4676
55
55
  meerschaum/api/__init__.py,sha256=r9h44c-l8Qx7QNoNWdvDe6ovJPbZC34PzqWnT-Odi3E,11214
56
- meerschaum/api/_chain.py,sha256=h8-WXUGXX6AqzdALfsBC5uv0FkAcLdHJXCGzqzuq89k,875
57
- meerschaum/api/_chunks.py,sha256=rmhz8h4MZDnjkE02fDqDEwbYwwZbnU4gVwy3-QqB5y0,1898
56
+ meerschaum/api/_chain.py,sha256=LB8hFXMoMjvWySmI5FJy0BdwK4hR0WqkmEgD44EHq40,862
57
+ meerschaum/api/_chunks.py,sha256=fa2FVj0MzjMiURAq1KvfAA6a72sxZdhxDx1uKroauCE,1888
58
58
  meerschaum/api/_events.py,sha256=6VcZ8SkIYfMC72RWVUuqG0Yjels1bFm66Sma5v2w2sg,3835
59
59
  meerschaum/api/_exceptions.py,sha256=xfbWp8F8JYrMUdtDXesn8C8e39_jAXHz51IosIGjkVM,463
60
60
  meerschaum/api/_oauth2.py,sha256=agWeuG5LzxLHZTjt3psdemhF_yoVJtdnfDdxSBVQMnY,7048
@@ -68,9 +68,9 @@ meerschaum/api/dash/jobs.py,sha256=p0mC30jO7aYS0vUbfn540d66-s19_c-GgjyfNmVXgrs,7
68
68
  meerschaum/api/dash/keys.py,sha256=pGIbKxp5RsIelzAU4WZMcYGDN835tF4mGhoktydc42M,8561
69
69
  meerschaum/api/dash/pipes.py,sha256=PUWvuoVGKKwqWb2yIc5l_CLClzcmBk5di4OTWYwlPkg,37992
70
70
  meerschaum/api/dash/plugins.py,sha256=KdfG04f6SsUpBg-nm7MUJegFGuElOj-GAkxDX98hi60,3768
71
- meerschaum/api/dash/sessions.py,sha256=jUM0a9CXNZC3j7SF3QkZim-8ZAbDom-V1iXklvMyBZE,5382
71
+ meerschaum/api/dash/sessions.py,sha256=zFh9knCddq9WOor-qxXdEbmzZuavCEXOc2VIWCnYNJI,5362
72
72
  meerschaum/api/dash/sync.py,sha256=9lt7IRdG-fe9gf_ZO_viPiGlerX7ic6r_VFocv3I51A,504
73
- meerschaum/api/dash/tokens.py,sha256=7_4k45drB6uoL1izDFo6TezzSQ6v1DP_aHw7orYk4ZU,20832
73
+ meerschaum/api/dash/tokens.py,sha256=Y880PVE6AkPy5pD7iZrCJnAGMwm24pFCoMSP98cO_D0,20822
74
74
  meerschaum/api/dash/users.py,sha256=3wq3ZG51DxOjNeF-X5HdlXD1MYQ1nQ9oowYSvFEY7hs,1050
75
75
  meerschaum/api/dash/websockets.py,sha256=L6e7Ved7Osh9JRJitS4wMbVGPrrXPD4uB61Yj1Y5aug,927
76
76
  meerschaum/api/dash/webterm.py,sha256=IgEaAW8Dx3am8Mk6lJ9ydMhk9GurHHa-AoodWzxQbHo,4768
@@ -133,18 +133,18 @@ meerschaum/api/routes/_actions.py,sha256=LUU_F87_CyjZMj5sCJ9P4XbmjgnpM865lzii26X
133
133
  meerschaum/api/routes/_connectors.py,sha256=T8ssmO15qB5jFn-DORRXq6xhdNWkqB1seUj2NDbaBK0,1731
134
134
  meerschaum/api/routes/_index.py,sha256=Z8kuyqm3vmJadw8iIYyswYI4-3IOJ7KXdkhDTv1oUsY,697
135
135
  meerschaum/api/routes/_jobs.py,sha256=USOafck07Rtk11HG0NHtFnan0LjjPruiXy8SIPHRe7c,12740
136
- meerschaum/api/routes/_login.py,sha256=TIOy0GKSKDqMXaMgTIxNNk3EdyiWtbfOJQSt3wMMgGE,5533
136
+ meerschaum/api/routes/_login.py,sha256=fSfREsYIuzsJFQtiq9kyRLNJgXVjvuZy5Y0VteMg6sQ,5523
137
137
  meerschaum/api/routes/_misc.py,sha256=fX2ZC5TeudpKn4iSfJcO6OPq8sMAI9gRQJVSEnZtAJo,2618
138
- meerschaum/api/routes/_pipes.py,sha256=aRbU1QIvINReHGR80VuRhzGhmPwCnMgfo60RX0Ordag,30757
139
- meerschaum/api/routes/_plugins.py,sha256=mdFetewPea2cxjBzeuJDCQFOQFZTGwDFWCvnaNQGQis,6844
138
+ meerschaum/api/routes/_pipes.py,sha256=YWQdlL6IiT2uESSe7c8Od5_sZmdbpKFvU7L8woPRcic,30721
139
+ meerschaum/api/routes/_plugins.py,sha256=H--IrwOeUWO9khR95FlkvW5hbmGrYsHtUQ7e-4a_xMY,6831
140
140
  meerschaum/api/routes/_tokens.py,sha256=XuG410HixRjpQ-d7X5FAr4fDUNGfDY0M_AqOkrEzxw4,6348
141
- meerschaum/api/routes/_users.py,sha256=O6CkvSIvA47opglXgH9RLppHshPMCxBktTLe1I-TiM0,7696
141
+ meerschaum/api/routes/_users.py,sha256=lE7CLA-NNIDzuUf-lbXCEKF1gile4993QouZYiof63s,7683
142
142
  meerschaum/api/routes/_version.py,sha256=B9DY3_x6OlqU8CoEkoXUZ1x534svY58Z00GERnZGm3s,797
143
143
  meerschaum/api/routes/_webterm.py,sha256=TviHMz0_pLnby7dZW76y3mt-40Cq3VGFItSVcBipOeI,4163
144
144
  meerschaum/api/tables/__init__.py,sha256=e2aNC0CdlWICTUMx1i9RauF8Pm426J0RZJbsJWv4SWo,482
145
145
  meerschaum/config/__init__.py,sha256=IZLzkI7jBycfmHSR6R_WG3eBe0Uv53c-CI_QqNf4lnw,12966
146
146
  meerschaum/config/_dash.py,sha256=BJHl4xMrQB-YHUEU7ldEW8q_nOPoIRSOqLrfGElc6Dw,187
147
- meerschaum/config/_default.py,sha256=kon77hqv6Iw0i_FovooR62iZOD589EqAMSeG5Z-gOkI,8172
147
+ meerschaum/config/_default.py,sha256=346f8PGiH-k4DGnT9sKAMPuPmVmD4TXxQJn4UTLrIOk,8133
148
148
  meerschaum/config/_edit.py,sha256=WCdt7BSspPytH-NiPS1kpCZxXDDG7VbOu0H1AnMtwlw,9177
149
149
  meerschaum/config/_formatting.py,sha256=SXUU0QFAlO_eIZjyodXQGSrjg-mVkL2qXuQwxqqdJps,6746
150
150
  meerschaum/config/_jobs.py,sha256=gS_4mMGdmVP7WB4V5Sz8kYP0HmhWcMY2jSWGR7jX6cw,1279
@@ -154,7 +154,7 @@ meerschaum/config/_preprocess.py,sha256=-AEA8m_--KivZwTQ1sWN6LTn5sio_fUr2XZ51BO6
154
154
  meerschaum/config/_read_config.py,sha256=Y4O-eozH94FsucqLWXb5hS57RLPMHsLUQe7a24doi0o,16231
155
155
  meerschaum/config/_shell.py,sha256=46_m49Txc5q1rGfCgO49ca48BODx45DQJi8D0zz1R18,4245
156
156
  meerschaum/config/_sync.py,sha256=nN5bLCHU8sFDdlPi7pQXuRVFcX457rZjOiALTvqRS_E,4332
157
- meerschaum/config/_version.py,sha256=n_QQMtQ9-WXprfhW3j-OxjwbwRq-50WX3f9QvOq_8Gc,71
157
+ meerschaum/config/_version.py,sha256=kaVgri-QnTrGSoyLsWzBKmdjtXMxD8rirdkYVB7E_2Y,71
158
158
  meerschaum/config/environment.py,sha256=hTyjPLrGp3R4sytg_Jqv4TnCVI1WdmbX2YoRBCWSNt8,8277
159
159
  meerschaum/config/paths.py,sha256=JjibeGN3YAdSNceRwsd42aNmeUrIgM6ndzC8qZAmNI0,621
160
160
  meerschaum/config/static.py,sha256=92fSGxoHFDOK9GEsN8NVbAEh9W7-eZ1BS6thyEqcjeI,359
@@ -197,7 +197,7 @@ meerschaum/connectors/sql/_fetch.py,sha256=ZqtYd1LSGmz-UVXLcEppRAhY2mAUNAkE2SU-u
197
197
  meerschaum/connectors/sql/_instance.py,sha256=xCc8M0xWMzF5Tu_1uWIFivAoHey5N1ccFhN_Z7u04zk,6304
198
198
  meerschaum/connectors/sql/_pipes.py,sha256=tlIAgzGY2vEeO9a891QpuE9UBCiAj7MiCo5r0xrQd5M,130705
199
199
  meerschaum/connectors/sql/_plugins.py,sha256=SubR5HUJaetoUCv83YNEMwhv4wTTBCMcxSOEUgyMML4,8747
200
- meerschaum/connectors/sql/_sql.py,sha256=T94jbuiZ1IRqkt_s_LQNTXyRc8OmzWLZSYnWIityFkU,45313
200
+ meerschaum/connectors/sql/_sql.py,sha256=L8iX5slICvLYf5m-txblNoBl6PzVC2gk4GE272QCuNQ,45335
201
201
  meerschaum/connectors/sql/_uri.py,sha256=pSqGo6DfSvCUl2rjk833W3Foi20goZ0301pyqZR4R2I,3454
202
202
  meerschaum/connectors/sql/_users.py,sha256=n3bW01GHWNT5QpI_uGyQV6aZA_FEwgV61QrhFmgNit8,10837
203
203
  meerschaum/connectors/sql/tools.py,sha256=jz8huOaRCwGlYdtGfAqAh7SoK8uydYBrasKQba9FT38,187
@@ -279,11 +279,11 @@ meerschaum/utils/packages/_packages.py,sha256=KWVfxsm-6ZdffpskIjHPki6wSQvf0LK9MW
279
279
  meerschaum/utils/packages/lazy_loader.py,sha256=VHnph3VozH29R4JnSSBfwtA5WKZYZQFT_GeQSShCnuc,2540
280
280
  meerschaum/utils/venv/_Venv.py,sha256=lYiuyCloG1OmKh_8xMMXHkAq1VIMUWLhYGtCVm6nvdA,4044
281
281
  meerschaum/utils/venv/__init__.py,sha256=P40aC-RMz3iGrMnED6D4tha6Tj0Mz-pDgUqJVibgjwo,27767
282
- meerschaum-3.0.6.dist-info/licenses/LICENSE,sha256=jG2zQEdRNt88EgHUWPpXVWmOrOduUQRx7MnYV9YIPaw,11359
283
- meerschaum-3.0.6.dist-info/licenses/NOTICE,sha256=OTA9Fcthjf5BRvWDDIcBC_xfLpeDV-RPZh3M-HQBRtQ,114
284
- meerschaum-3.0.6.dist-info/METADATA,sha256=g0QWm96vMEp03QxtpG03iUoN096UGYkLe6noa3uny4Y,25325
285
- meerschaum-3.0.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
286
- meerschaum-3.0.6.dist-info/entry_points.txt,sha256=5YBVzibw-0rNA_1VjB16z5GABsOGf-CDhW4yqH8C7Gc,88
287
- meerschaum-3.0.6.dist-info/top_level.txt,sha256=bNoSiDj0El6buocix-FRoAtJOeq1qOF5rRm2u9i7Q6A,11
288
- meerschaum-3.0.6.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
289
- meerschaum-3.0.6.dist-info/RECORD,,
282
+ meerschaum-3.0.8.dist-info/licenses/LICENSE,sha256=jG2zQEdRNt88EgHUWPpXVWmOrOduUQRx7MnYV9YIPaw,11359
283
+ meerschaum-3.0.8.dist-info/licenses/NOTICE,sha256=OTA9Fcthjf5BRvWDDIcBC_xfLpeDV-RPZh3M-HQBRtQ,114
284
+ meerschaum-3.0.8.dist-info/METADATA,sha256=knbevm746wUv5LdQRIPJ7ZJ9wP4qDA2IWutQ91y8bqQ,25325
285
+ meerschaum-3.0.8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
286
+ meerschaum-3.0.8.dist-info/entry_points.txt,sha256=5YBVzibw-0rNA_1VjB16z5GABsOGf-CDhW4yqH8C7Gc,88
287
+ meerschaum-3.0.8.dist-info/top_level.txt,sha256=bNoSiDj0El6buocix-FRoAtJOeq1qOF5rRm2u9i7Q6A,11
288
+ meerschaum-3.0.8.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
289
+ meerschaum-3.0.8.dist-info/RECORD,,