beamlit 0.0.24rc17__py3-none-any.whl → 0.0.24rc18__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.
beamlit/serve/app.py CHANGED
@@ -53,10 +53,13 @@ async def root(request: Request):
53
53
  logger = getLogger(__name__)
54
54
  try:
55
55
  body = await request.json()
56
- if not asyncio.iscoroutinefunction(func):
57
- response = func(body)
58
- else:
56
+
57
+ original_func = getattr(func, '__wrapped__', func)
58
+ if asyncio.iscoroutinefunction(func) or asyncio.iscoroutinefunction(original_func):
59
59
  response = await func(body)
60
+ else:
61
+ response = func(body)
62
+
60
63
  if isinstance(response, Response):
61
64
  return response
62
65
  if type(response) is str:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: beamlit
3
- Version: 0.0.24rc17
3
+ Version: 0.0.24rc18
4
4
  Summary: Add your description here
5
5
  Author-email: cploujoux <ch.ploujoux@gmail.com>
6
6
  Requires-Python: >=3.12
@@ -294,10 +294,10 @@ beamlit/models/websocket_channel.py,sha256=tyNtsVR0cOwd6BK--ehBCH8bIjxtyPhiAkrxY
294
294
  beamlit/models/workspace.py,sha256=s7wS6ibswosB0FdUb3ry3BnlLa325axBdYPLI3ipe0Q,3986
295
295
  beamlit/models/workspace_labels.py,sha256=WbnUY6eCTkUNdY7hhhSF-KQCl8fWFfkCf7hzCTiNp4A,1246
296
296
  beamlit/models/workspace_user.py,sha256=70CcifQWYbeWG7TDui4pblTzUe5sVK0AS19vNCzKE8g,3423
297
- beamlit/serve/app.py,sha256=UFIEb8wbvt8_ZGVXmRFimrG6TAod0ysTtn1E1_yByvA,2514
297
+ beamlit/serve/app.py,sha256=Xoc_A-e9_4U9OZKoKXSc6qc_NTRPuVb6ddAZVENhd34,2617
298
298
  beamlit/serve/middlewares/__init__.py,sha256=1dVmnOmhAQWvWktqHkKSIX-YoF6fmMU8xkUQuhg_rJU,148
299
299
  beamlit/serve/middlewares/accesslog.py,sha256=wM52-hcwtO-_hdM1pnsEJzerzJf1MzEyN5m85BdDccE,609
300
300
  beamlit/serve/middlewares/processtime.py,sha256=lDAaIasZ4bwvN-HKHvZpaD9r-yrkVNZYx4abvbjbrCg,411
301
- beamlit-0.0.24rc17.dist-info/METADATA,sha256=8Rlj6oGJatG92HYskgSXJ4iubImPtr09qkHlDohMnM8,2027
302
- beamlit-0.0.24rc17.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
303
- beamlit-0.0.24rc17.dist-info/RECORD,,
301
+ beamlit-0.0.24rc18.dist-info/METADATA,sha256=0YDdLTLn8yDmAwzK9Mp4ubyUVklAvqF8O5_0T3wj_l4,2027
302
+ beamlit-0.0.24rc18.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
303
+ beamlit-0.0.24rc18.dist-info/RECORD,,