pulse-framework 0.1.59__py3-none-any.whl → 0.1.60__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.
pulse/form.py CHANGED
@@ -422,8 +422,9 @@ class ManualForm(Disposable):
422
422
  Returns:
423
423
  Dict with action, method, encType, and onSubmit props.
424
424
  """
425
+ prefix = PulseContext.get().app.api_prefix
425
426
  return {
426
- "action": f"{server_address()}/pulse/forms/{self._render.id}/{self.registration.id}",
427
+ "action": f"{server_address()}{prefix}/forms/{self._render.id}/{self.registration.id}",
427
428
  "method": "POST",
428
429
  "encType": "multipart/form-data",
429
430
  "onSubmit": self._start_submit,
pulse/renderer.py CHANGED
@@ -451,9 +451,14 @@ class Renderer:
451
451
  def register_component_expr(self, expr: Expr) -> str:
452
452
  ref = registry_ref(expr)
453
453
  if ref is None:
454
+ expr_type = type(expr).__name__
455
+ expr_repr = repr(expr)
456
+ if len(expr_repr) > 200:
457
+ expr_repr = f"{expr_repr[:197]}..."
454
458
  raise TypeError(
455
459
  "Component tag expressions must be registry-backed Expr values "
456
- + "(Import/JsFunction/Constant/JsxFunction)."
460
+ + "(Import/JsFunction/Constant/JsxFunction). "
461
+ + f"Got {expr_type}: {expr_repr}"
457
462
  )
458
463
  return ref["key"]
459
464
 
pulse/transpiler/nodes.py CHANGED
@@ -450,6 +450,8 @@ class Jsx(ExprWrapper):
450
450
 
451
451
  for k, v in kwargs.items():
452
452
  if k == "key":
453
+ if v is None:
454
+ continue
453
455
  if not isinstance(v, str):
454
456
  raise ValueError("key must be a string")
455
457
  key = v
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pulse-framework
3
- Version: 0.1.59
3
+ Version: 0.1.60
4
4
  Summary: Pulse - Full-stack framework for building real-time React applications in Python
5
5
  Requires-Dist: websockets>=12.0
6
6
  Requires-Dist: fastapi>=0.128.0
@@ -37,7 +37,7 @@ pulse/dom/svg.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
37
37
  pulse/dom/tags.py,sha256=U6mKmwB9JAFM6LTESMJcoIejNfnyxIdQo2-TLM5OaZ0,7585
38
38
  pulse/dom/tags.pyi,sha256=0BC7zTh22roPBuMQawL8hgI6IrfN8xJZuDIoKMd4QKc,14393
39
39
  pulse/env.py,sha256=etfubfwq7VWlo2iKy_972WtHZSiVe4StAnjFga0xgj8,4244
40
- pulse/form.py,sha256=XJiDJU0WQBkDHhtruDwOwYQqfvLsEQwlsqi5OwPbn7I,14011
40
+ pulse/form.py,sha256=dzzcxuIkA8EOAETrbMV916Jv_tlgVuoBKfgL3P2MySo,14058
41
41
  pulse/helpers.py,sha256=feHkC2g3DgfGN7FrvgRPZjmXzBjBYXwFu6wRPdy3w_I,15056
42
42
  pulse/hooks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
43
43
  pulse/hooks/core.py,sha256=tDEcB_CTD4yI5bNKn7CtB40sRKIanGNqPD5_qLgSzf4,10982
@@ -89,7 +89,7 @@ pulse/react_component.py,sha256=8RLg4Bi7IcjqbnbEnp4hJpy8t1UsE7mG0UR1Q655LDk,2332
89
89
  pulse/reactive.py,sha256=FxxpH7NBtQr7G89iCVN7y1EG21f23GcRi1M-XIxcRQA,31280
90
90
  pulse/reactive_extensions.py,sha256=yQ1PpdAh4kMvll7R15T72FOg8NFdG_HGBsGc63dawYk,33754
91
91
  pulse/render_session.py,sha256=9gfwuBZRCWuQMN_nFuaAi__1UPN3I3C1mKWtAXyA3-A,21340
92
- pulse/renderer.py,sha256=bH7MWaQB1BVk6s60yEgZhUIoAuXO9olY5IA8dUqc_64,16002
92
+ pulse/renderer.py,sha256=CLUke7H3yL_idfjlWeGngWhO0iEZxJAQ2iMJOAuqlZc,16170
93
93
  pulse/request.py,sha256=N0oFOLiGxpbgSgxznjvu64lG3YyOcZPKC8JFyKx6X7w,6023
94
94
  pulse/routing.py,sha256=LzTITvGgaLI1w7qTDZjFwoBcWAb4O8Dz7AmXeTNYrFU,16903
95
95
  pulse/serializer.py,sha256=HmQZgxQiaCx2SL2XwmEQLd_xsk_P8XfLtGciLLLOxx0,7616
@@ -112,7 +112,7 @@ pulse/transpiler/modules/math.py,sha256=8gjvdYTMqtuOnXrvX_Lwuo0ywAdSl7cpss4TMk6m
112
112
  pulse/transpiler/modules/pulse/__init__.py,sha256=TfMsiiB53ZFlxdNl7jfCAiMZs-vSRUTxUmqzkLTj-po,91
113
113
  pulse/transpiler/modules/pulse/tags.py,sha256=YFodKrhmt4DH7QtjTBdVvK5J6Qq2ntfhzb50tP-PTac,6273
114
114
  pulse/transpiler/modules/typing.py,sha256=hMGff6gBscFJE2GPV9xUFNfLuff2QCMIbMJUs3f24BY,1771
115
- pulse/transpiler/nodes.py,sha256=PvTHSLlau4xaf35UjI24FV_L4jhT2BwiIRmCtGowQ8A,50392
115
+ pulse/transpiler/nodes.py,sha256=BI6maJdQ3KXyVHB-rf4H8ffp3nWpLZ2K6ZNUXzkj2vc,50424
116
116
  pulse/transpiler/py_module.py,sha256=YYSeroGInkXsoy39Y34Oxj1mrwDQnbSFVEgWru7vqG0,4465
117
117
  pulse/transpiler/transpiler.py,sha256=28diEp1yZTs3RsUEJZZdCv1DfzgO9WyOGI-xSHe7y_4,32562
118
118
  pulse/transpiler/vdom.py,sha256=l4CKQlt-wSSFJ7j7cF4dVwqYHWyAT1uAmbgsx0Kk4Jc,6310
@@ -120,7 +120,7 @@ pulse/types/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
120
120
  pulse/types/event_handler.py,sha256=psQCydj-WEtBcFU5JU4mDwvyzkW8V2O0g_VFRU2EOHI,1618
121
121
  pulse/user_session.py,sha256=nsnsMgqq2xGJZLpbHRMHUHcLrElMP8WcA4gjGMrcoBk,10208
122
122
  pulse/version.py,sha256=711vaM1jVIQPgkisGgKZqwmw019qZIsc_QTae75K2pg,1895
123
- pulse_framework-0.1.59.dist-info/WHEEL,sha256=eh7sammvW2TypMMMGKgsM83HyA_3qQ5Lgg3ynoecH3M,79
124
- pulse_framework-0.1.59.dist-info/entry_points.txt,sha256=i7aohd3QaPu5IcuGKKvsQQEiMYMe5HcF56QEsaLVO64,46
125
- pulse_framework-0.1.59.dist-info/METADATA,sha256=IjfeExD3KNWxSW7wIExnhmRsUMghIRRFbf67NGkTMVI,8300
126
- pulse_framework-0.1.59.dist-info/RECORD,,
123
+ pulse_framework-0.1.60.dist-info/WHEEL,sha256=eh7sammvW2TypMMMGKgsM83HyA_3qQ5Lgg3ynoecH3M,79
124
+ pulse_framework-0.1.60.dist-info/entry_points.txt,sha256=i7aohd3QaPu5IcuGKKvsQQEiMYMe5HcF56QEsaLVO64,46
125
+ pulse_framework-0.1.60.dist-info/METADATA,sha256=2WsEddjjerzG1oroktnH5BSjkptzY4OD6VzCiUge1Kw,8300
126
+ pulse_framework-0.1.60.dist-info/RECORD,,