fal 1.30.1__py3-none-any.whl → 1.32.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.1'
32
- __version_tuple__ = version_tuple = (1, 30, 1)
31
+ __version__ = version = '1.32.0'
32
+ __version_tuple__ = version_tuple = (1, 32, 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")
fal/cli/files.py CHANGED
@@ -35,6 +35,13 @@ def _upload_url(args):
35
35
  fs.put_file_from_url(args.url, args.remote_path)
36
36
 
37
37
 
38
+ def _mv(args):
39
+ from fal.files import FalFileSystem
40
+
41
+ fs = FalFileSystem()
42
+ fs.mv(args.source, args.destination)
43
+
44
+
38
45
  def add_parser(main_subparsers, parents):
39
46
  files_help = "Manage fal files."
40
47
  parser = main_subparsers.add_parser(
@@ -108,3 +115,14 @@ def add_parser(main_subparsers, parents):
108
115
  "remote_path", type=str, help="Remote path to upload to"
109
116
  )
110
117
  upload_url_parser.set_defaults(func=_upload_url)
118
+
119
+ mv_help = "Move or rename a remote file or directory."
120
+ mv_parser = subparsers.add_parser(
121
+ "mv",
122
+ description=mv_help,
123
+ help=mv_help,
124
+ parents=parents,
125
+ )
126
+ mv_parser.add_argument("source", type=str, help="Remote source path")
127
+ mv_parser.add_argument("destination", type=str, help="Remote destination path")
128
+ mv_parser.set_defaults(func=_mv)
fal/files.py CHANGED
@@ -234,3 +234,17 @@ class FalFileSystem(AbstractFileSystem):
234
234
  f"/files/file/{abs_path}",
235
235
  )
236
236
  self.dircache.clear()
237
+
238
+ def rename(self, path, destination, **kwargs):
239
+ abs_path = self._abspath(path)
240
+ abs_dest = self._abspath(destination)
241
+ self._request(
242
+ "POST",
243
+ f"/files/rename/{abs_path}",
244
+ json={"destination": abs_dest},
245
+ )
246
+ self.dircache.clear()
247
+
248
+ def mv(self, path1, path2, recursive=False, maxdepth=None, **kwargs):
249
+ # Delegate to server-side rename
250
+ self.rename(path1, path2)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fal
3
- Version: 1.30.1
3
+ Version: 1.32.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
@@ -1,14 +1,14 @@
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=mJIDJJ8D9hB2yNKuePFRRCkCI-ZopC_n3RkcRtJv-tg,706
3
+ fal/_fal_version.py,sha256=D8W6cujI4gvPi6u_NV9hpDfJHHsmkXIgy-_NqMIXIes,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
11
- fal/files.py,sha256=iWkOqCtdoz7_V-wOvV1iB1zg9x7fdGRcmGGyBkCuFXI,7449
11
+ fal/files.py,sha256=9hA7mC3Xm794I-P2_YMf0QRebrnBIDz_kUnUd4O3BiQ,7904
12
12
  fal/flags.py,sha256=QonyDM7R2GqfAB1bJr46oriu-fHJCkpUwXuSdanePWg,987
13
13
  fal/project.py,sha256=QgfYfMKmNobMPufrAP_ga1FKcIAlSbw18Iar1-0qepo,2650
14
14
  fal/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -30,7 +30,7 @@ fal/cli/create.py,sha256=a8WDq-nJLFTeoIXqpb5cr7GR7YR9ZZrQCawNm34KXXE,627
30
30
  fal/cli/debug.py,sha256=u_urnyFzSlNnrq93zz_GXE9FX4VyVxDoamJJyrZpFI0,1312
31
31
  fal/cli/deploy.py,sha256=JAUi9FtN58pGk3_2JPd84h-RKurLatRjAUxL_Oe0vWo,8701
32
32
  fal/cli/doctor.py,sha256=U4ne9LX5gQwNblsYQ27XdO8AYDgbYjTO39EtxhwexRM,983
33
- fal/cli/files.py,sha256=pSgAnTm2eHdP-IPkMIVfnK_Ii7mkSSOVgvbsiFUVBC0,2936
33
+ fal/cli/files.py,sha256=-j0q4g53A7CWSczGLdfeUCTSd4zXoV3pfZFdman7JOw,3450
34
34
  fal/cli/keys.py,sha256=7Sf4DT4le89G42eAOt0ltRjbZAtE70AVQ62hmjZhUy0,3059
35
35
  fal/cli/main.py,sha256=LnJCe83Fdr5-i3Fkpvrd9BZPjHtcX_H1EEmy6rVlCz8,3180
36
36
  fal/cli/parser.py,sha256=jYsGQ0BLQuKI7KtN1jnLVYKMbLtez7hPjwTNfG3UPSk,2964
@@ -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.1.dist-info/METADATA,sha256=-NOpC6mIUsPkeGzMYr6EqKXfVMktBFOj5ih4ko8rs-0,4085
147
- fal-1.30.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
148
- fal-1.30.1.dist-info/entry_points.txt,sha256=32zwTUC1U1E7nSTIGCoANQOQ3I7-qHG5wI6gsVz5pNU,37
149
- fal-1.30.1.dist-info/top_level.txt,sha256=r257X1L57oJL8_lM0tRrfGuXFwm66i1huwQygbpLmHw,21
150
- fal-1.30.1.dist-info/RECORD,,
146
+ fal-1.32.0.dist-info/METADATA,sha256=wo-fAlAOB5qXUc6T2TA88Cts8amBBgeWu4YX8IowjAU,4085
147
+ fal-1.32.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
148
+ fal-1.32.0.dist-info/entry_points.txt,sha256=32zwTUC1U1E7nSTIGCoANQOQ3I7-qHG5wI6gsVz5pNU,37
149
+ fal-1.32.0.dist-info/top_level.txt,sha256=r257X1L57oJL8_lM0tRrfGuXFwm66i1huwQygbpLmHw,21
150
+ fal-1.32.0.dist-info/RECORD,,
File without changes