fal 1.30.0__py3-none-any.whl → 1.31.0__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.

Potentially problematic release.


This version of fal might be problematic. Click here for more details.

fal/_fal_version.py CHANGED
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
28
28
  commit_id: COMMIT_ID
29
29
  __commit_id__: COMMIT_ID
30
30
 
31
- __version__ = version = '1.30.0'
32
- __version_tuple__ = version_tuple = (1, 30, 0)
31
+ __version__ = version = '1.31.0'
32
+ __version_tuple__ = version_tuple = (1, 31, 0)
33
33
 
34
34
  __commit_id__ = commit_id = None
fal/api.py CHANGED
@@ -600,7 +600,27 @@ class FalServerlessHost(Host):
600
600
  kwargs: dict[str, Any],
601
601
  ) -> ReturnT:
602
602
  def result_handler(partial_result):
603
+ from fal.console import console
604
+
605
+ if service_urls := partial_result.service_urls:
606
+ console.print("Playground:")
607
+ endpoints = getattr(func, "_routes", ["/"]) # type: ignore[attr-defined]
608
+ for endpoint in endpoints:
609
+ console.print(f"\t{service_urls.playground}{endpoint}")
610
+ console.print("Synchronous Endpoints:")
611
+ for endpoint in endpoints:
612
+ console.print(f"\t{service_urls.run}{endpoint}")
613
+ console.print("Asynchronous Endpoints (Recommended):")
614
+ for endpoint in endpoints:
615
+ console.print(f"\t{service_urls.queue}{endpoint}")
616
+
603
617
  for log in partial_result.logs:
618
+ if (
619
+ "Access the playground at" in log.message
620
+ or "And API access through" in log.message
621
+ ):
622
+ # Obsolete messages from before service_urls were added.
623
+ continue
604
624
  self._log_printer.print(log)
605
625
 
606
626
  return self._run(func, options, args, kwargs, result_handler=result_handler)
fal/app.py CHANGED
@@ -110,6 +110,7 @@ def wrap_app(cls: type[App], **kwargs) -> IsolatedFunction:
110
110
  metadata["openapi"] = app.openapi()
111
111
 
112
112
  routes = app.collect_routes()
113
+ initialize_and_serve._routes = [r.path for r in routes.keys()] or ["/"] # type: ignore[attr-defined]
113
114
  realtime_app = any(route.is_websocket for route in routes)
114
115
 
115
116
  kind = cls.host_kwargs.pop("kind", "virtualenv")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fal
3
- Version: 1.30.0
3
+ Version: 1.31.0
4
4
  Summary: fal is an easy-to-use Serverless Python Framework
5
5
  Author: Features & Labels <support@fal.ai>
6
6
  Requires-Python: >=3.8
@@ -31,7 +31,7 @@ Requires-Dist: python-dateutil<3,>=2.8.0
31
31
  Requires-Dist: types-python-dateutil<3,>=2.8.0
32
32
  Requires-Dist: importlib-metadata>=4.4; python_version < "3.10"
33
33
  Requires-Dist: msgpack<2,>=1.0.7
34
- Requires-Dist: websockets<16,>=12.0
34
+ Requires-Dist: websockets>=12.0
35
35
  Requires-Dist: pillow<11,>=10.2.0
36
36
  Requires-Dist: pyjwt[crypto]<3,>=2.8.0
37
37
  Requires-Dist: uvicorn<1,>=0.29.0
@@ -1,10 +1,10 @@
1
1
  fal/__init__.py,sha256=wXs1G0gSc7ZK60-bHe-B2m0l_sA6TrFk4BxY0tMoLe8,784
2
2
  fal/__main__.py,sha256=4JMK66Wj4uLZTKbF-sT3LAxOsr6buig77PmOkJCRRxw,83
3
- fal/_fal_version.py,sha256=z2-YScutuXozpQDoDBzRXepmCAPjCxXPXKoXD3x7ggE,706
3
+ fal/_fal_version.py,sha256=MkLunoDN6cSKBo-5WyDIUQeMsbu7I4hMqQk3qsFTh2w,706
4
4
  fal/_serialization.py,sha256=npXNsFJ5G7jzBeBIyVMH01Ww34mGY4XWhHpRbSrTtnQ,7598
5
5
  fal/_version.py,sha256=1BbTFnucNC_6ldKJ_ZoC722_UkW4S9aDBSW9L0fkKAw,2315
6
- fal/api.py,sha256=TWUpQICgsRO5aDdRP8A3sFI26P6QM93TobcW9M4E0lQ,47501
7
- fal/app.py,sha256=2zCrpSgqWY8kIuxu2RIOeoKC1_dbC3s7Im2qokUq0js,25872
6
+ fal/api.py,sha256=U0Le4aqG4ikiNC9_I9Tn7IZkSXVG_FguY_qx95VNcvY,48485
7
+ fal/app.py,sha256=sSWr2pPjaTSJbKuhwp5gCjLEnoumjto08KBNzzGY8og,25978
8
8
  fal/apps.py,sha256=pzCd2mrKl5J_4oVc40_pggvPtFahXBCdrZXWpnaEJVs,12130
9
9
  fal/config.py,sha256=1HRaOJFOAjB7fbQoEPCSH85gMvEEMIMPeupVWgrHVgU,3572
10
10
  fal/container.py,sha256=FTsa5hOW4ars-yV1lUoc0BNeIIvAZcpw7Ftyt3A4m_w,2000
@@ -143,8 +143,8 @@ openapi_fal_rest/models/workflow_node_type.py,sha256=-FzyeY2bxcNmizKbJI8joG7byRi
143
143
  openapi_fal_rest/models/workflow_schema.py,sha256=4K5gsv9u9pxx2ItkffoyHeNjBBYf6ur5bN4m_zePZNY,2019
144
144
  openapi_fal_rest/models/workflow_schema_input.py,sha256=2OkOXWHTNsCXHWS6EGDFzcJKkW5FIap-2gfO233EvZQ,1191
145
145
  openapi_fal_rest/models/workflow_schema_output.py,sha256=EblwSPAGfWfYVWw_WSSaBzQVju296is9o28rMBAd0mc,1196
146
- fal-1.30.0.dist-info/METADATA,sha256=TGC06pQWQEN5vwNf81Qzy-NlPuqAhw5Fc4lB1VT6Oz0,4089
147
- fal-1.30.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
148
- fal-1.30.0.dist-info/entry_points.txt,sha256=32zwTUC1U1E7nSTIGCoANQOQ3I7-qHG5wI6gsVz5pNU,37
149
- fal-1.30.0.dist-info/top_level.txt,sha256=r257X1L57oJL8_lM0tRrfGuXFwm66i1huwQygbpLmHw,21
150
- fal-1.30.0.dist-info/RECORD,,
146
+ fal-1.31.0.dist-info/METADATA,sha256=bqned_KqLmah2egl9lbQN_4ypaU2UZhaaBydPLHksEI,4085
147
+ fal-1.31.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
148
+ fal-1.31.0.dist-info/entry_points.txt,sha256=32zwTUC1U1E7nSTIGCoANQOQ3I7-qHG5wI6gsVz5pNU,37
149
+ fal-1.31.0.dist-info/top_level.txt,sha256=r257X1L57oJL8_lM0tRrfGuXFwm66i1huwQygbpLmHw,21
150
+ fal-1.31.0.dist-info/RECORD,,
File without changes