fal 1.28.1__py3-none-any.whl → 1.28.3__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 +2 -2
- fal/cli/apps.py +16 -3
- fal/cli/deploy.py +25 -10
- fal/toolkit/file/file.py +7 -5
- {fal-1.28.1.dist-info → fal-1.28.3.dist-info}/METADATA +1 -1
- {fal-1.28.1.dist-info → fal-1.28.3.dist-info}/RECORD +9 -9
- {fal-1.28.1.dist-info → fal-1.28.3.dist-info}/WHEEL +0 -0
- {fal-1.28.1.dist-info → fal-1.28.3.dist-info}/entry_points.txt +0 -0
- {fal-1.28.1.dist-info → fal-1.28.3.dist-info}/top_level.txt +0 -0
fal/_fal_version.py
CHANGED
fal/cli/apps.py
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
+
import json
|
|
4
|
+
from dataclasses import asdict
|
|
3
5
|
from typing import TYPE_CHECKING
|
|
4
6
|
|
|
5
7
|
import fal.cli.runners as runners
|
|
@@ -62,9 +64,13 @@ def _list(args):
|
|
|
62
64
|
else:
|
|
63
65
|
apps.sort(key=lambda x: x.alias)
|
|
64
66
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
67
|
+
if args.output == "pretty":
|
|
68
|
+
table = _apps_table(apps)
|
|
69
|
+
args.console.print(table)
|
|
70
|
+
elif args.output == "json":
|
|
71
|
+
apps_as_dicts = [asdict(a) for a in apps]
|
|
72
|
+
res = json.dumps(apps_as_dicts)
|
|
73
|
+
args.console.print({"apps": res})
|
|
68
74
|
|
|
69
75
|
|
|
70
76
|
def _add_list_parser(subparsers, parents):
|
|
@@ -85,6 +91,13 @@ def _add_list_parser(subparsers, parents):
|
|
|
85
91
|
type=str,
|
|
86
92
|
help="Filter applications by alias contents",
|
|
87
93
|
)
|
|
94
|
+
parser.add_argument(
|
|
95
|
+
"--output",
|
|
96
|
+
type=str,
|
|
97
|
+
default="pretty",
|
|
98
|
+
choices=["pretty", "json"],
|
|
99
|
+
help="Modify the command output",
|
|
100
|
+
)
|
|
88
101
|
parser.set_defaults(func=_list)
|
|
89
102
|
|
|
90
103
|
|
fal/cli/deploy.py
CHANGED
|
@@ -122,20 +122,28 @@ def _deploy_from_reference(
|
|
|
122
122
|
# just replace .ai for .run
|
|
123
123
|
endpoint_host = env_host.replace(".ai", ".run")
|
|
124
124
|
|
|
125
|
-
args.
|
|
126
|
-
"Registered a new revision for function "
|
|
127
|
-
f"'{app_name}' (revision='{app_id}')."
|
|
128
|
-
)
|
|
129
|
-
args.console.print("Playground:")
|
|
130
|
-
for endpoint in loaded.endpoints:
|
|
125
|
+
if args.output == "json":
|
|
131
126
|
args.console.print(
|
|
132
|
-
|
|
127
|
+
{
|
|
128
|
+
"revision": app_id,
|
|
129
|
+
"app_name": app_name,
|
|
130
|
+
}
|
|
133
131
|
)
|
|
134
|
-
args.
|
|
135
|
-
for endpoint in loaded.endpoints:
|
|
132
|
+
elif args.output == "pretty":
|
|
136
133
|
args.console.print(
|
|
137
|
-
|
|
134
|
+
"Registered a new revision for function "
|
|
135
|
+
f"'{app_name}' (revision='{app_id}')."
|
|
138
136
|
)
|
|
137
|
+
args.console.print("Playground:")
|
|
138
|
+
for endpoint in loaded.endpoints:
|
|
139
|
+
args.console.print(
|
|
140
|
+
f"\thttps://{playground_host}/models/{user.username}/{app_name}{endpoint}"
|
|
141
|
+
)
|
|
142
|
+
args.console.print("Endpoints:")
|
|
143
|
+
for endpoint in loaded.endpoints:
|
|
144
|
+
args.console.print(
|
|
145
|
+
f"\thttps://{endpoint_host}/{user.username}/{app_name}{endpoint}"
|
|
146
|
+
)
|
|
139
147
|
|
|
140
148
|
|
|
141
149
|
def _deploy(args):
|
|
@@ -245,5 +253,12 @@ def add_parser(main_subparsers, parents):
|
|
|
245
253
|
dest="app_scale_settings",
|
|
246
254
|
help="Use the application code for scale settings.",
|
|
247
255
|
)
|
|
256
|
+
parser.add_argument(
|
|
257
|
+
"--output",
|
|
258
|
+
type=str,
|
|
259
|
+
default="pretty",
|
|
260
|
+
choices=["pretty", "json"],
|
|
261
|
+
help="Modify the command output",
|
|
262
|
+
)
|
|
248
263
|
|
|
249
264
|
parser.set_defaults(func=_deploy)
|
fal/toolkit/file/file.py
CHANGED
|
@@ -84,15 +84,15 @@ def _try_with_fallback(
|
|
|
84
84
|
fallback_save_kwargs: dict,
|
|
85
85
|
) -> Any:
|
|
86
86
|
if fallback_repository is None:
|
|
87
|
-
|
|
87
|
+
fallback_repository = []
|
|
88
88
|
elif isinstance(fallback_repository, list):
|
|
89
|
-
|
|
89
|
+
pass
|
|
90
90
|
else:
|
|
91
|
-
|
|
91
|
+
fallback_repository = [fallback_repository]
|
|
92
92
|
|
|
93
|
-
attempts = [
|
|
93
|
+
attempts: list[tuple[FileRepository | RepositoryId, dict]] = [
|
|
94
94
|
(repository, save_kwargs),
|
|
95
|
-
*((fallback, fallback_save_kwargs) for fallback in
|
|
95
|
+
*((fallback, fallback_save_kwargs) for fallback in fallback_repository),
|
|
96
96
|
]
|
|
97
97
|
for idx, (repo, kwargs) in enumerate(attempts):
|
|
98
98
|
repo_obj = get_builtin_repository(repo)
|
|
@@ -204,6 +204,7 @@ class File(BaseModel):
|
|
|
204
204
|
if request:
|
|
205
205
|
object_lifecycle_preference = request_lifecycle_preference(request)
|
|
206
206
|
else:
|
|
207
|
+
print("[WARNING] No request provided, using global lifecycle preference")
|
|
207
208
|
object_lifecycle_preference = LIFECYCLE_PREFERENCE.get()
|
|
208
209
|
|
|
209
210
|
save_kwargs.setdefault(
|
|
@@ -256,6 +257,7 @@ class File(BaseModel):
|
|
|
256
257
|
if request:
|
|
257
258
|
object_lifecycle_preference = request_lifecycle_preference(request)
|
|
258
259
|
else:
|
|
260
|
+
print("[WARNING] No request provided, using global lifecycle preference")
|
|
259
261
|
object_lifecycle_preference = LIFECYCLE_PREFERENCE.get()
|
|
260
262
|
|
|
261
263
|
save_kwargs.setdefault(
|
|
@@ -1,6 +1,6 @@
|
|
|
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=
|
|
3
|
+
fal/_fal_version.py,sha256=zl2Qa-ow_Xigp5Wrwp5UxpbNaPBnMse892EKHaAbzJs,513
|
|
4
4
|
fal/_serialization.py,sha256=npXNsFJ5G7jzBeBIyVMH01Ww34mGY4XWhHpRbSrTtnQ,7598
|
|
5
5
|
fal/_version.py,sha256=1BbTFnucNC_6ldKJ_ZoC722_UkW4S9aDBSW9L0fkKAw,2315
|
|
6
6
|
fal/api.py,sha256=TWUpQICgsRO5aDdRP8A3sFI26P6QM93TobcW9M4E0lQ,47501
|
|
@@ -23,12 +23,12 @@ fal/auth/local.py,sha256=sndkM6vKpeVny6NHTacVlTbiIFqaksOmw0Viqs_RN1U,1790
|
|
|
23
23
|
fal/cli/__init__.py,sha256=padK4o0BFqq61kxAA1qQ0jYr2SuhA2mf90B3AaRkmJA,37
|
|
24
24
|
fal/cli/_utils.py,sha256=ulYezhr3G29nTIF8MDQ6tsW01Oj1zPo-YSqMoBi05Ic,1871
|
|
25
25
|
fal/cli/api.py,sha256=ZuDE_PIC-czzneTAWMwvC7P7WnwIyluNZSuJqzCFhqI,2640
|
|
26
|
-
fal/cli/apps.py,sha256=
|
|
26
|
+
fal/cli/apps.py,sha256=eRTrJTewXCcJMVDMusFEfsUf7C0ygsuTVpbw8j6FzkI,11008
|
|
27
27
|
fal/cli/auth.py,sha256=Qe-Z3ycXJnOzHimz5PjCQYoni8MF4csmdL19yGN7a1o,5171
|
|
28
28
|
fal/cli/cli_nested_json.py,sha256=veSZU8_bYV3Iu1PAoxt-4BMBraNIqgH5nughbs2UKvE,13539
|
|
29
29
|
fal/cli/create.py,sha256=a8WDq-nJLFTeoIXqpb5cr7GR7YR9ZZrQCawNm34KXXE,627
|
|
30
30
|
fal/cli/debug.py,sha256=u_urnyFzSlNnrq93zz_GXE9FX4VyVxDoamJJyrZpFI0,1312
|
|
31
|
-
fal/cli/deploy.py,sha256=
|
|
31
|
+
fal/cli/deploy.py,sha256=He09liHnyIWEuDltZSin5_elH5Jyeeu-gUz7HRbkzuQ,8351
|
|
32
32
|
fal/cli/doctor.py,sha256=U4ne9LX5gQwNblsYQ27XdO8AYDgbYjTO39EtxhwexRM,983
|
|
33
33
|
fal/cli/files.py,sha256=pSgAnTm2eHdP-IPkMIVfnK_Ii7mkSSOVgvbsiFUVBC0,2936
|
|
34
34
|
fal/cli/keys.py,sha256=7Sf4DT4le89G42eAOt0ltRjbZAtE70AVQ62hmjZhUy0,3059
|
|
@@ -59,7 +59,7 @@ fal/toolkit/types.py,sha256=kkbOsDKj1qPGb1UARTBp7yuJ5JUuyy7XQurYUBCdti8,4064
|
|
|
59
59
|
fal/toolkit/audio/__init__.py,sha256=sqNVfrKbppWlIGLoFTaaNTxLpVXsFHxOSHLA5VG547A,35
|
|
60
60
|
fal/toolkit/audio/audio.py,sha256=gt458h989iQ-EhQSH-mCuJuPBY4RneLJE05f_QWU1E0,572
|
|
61
61
|
fal/toolkit/file/__init__.py,sha256=FbNl6wD-P0aSSTUwzHt4HujBXrbC3ABmaigPQA4hRfg,70
|
|
62
|
-
fal/toolkit/file/file.py,sha256=
|
|
62
|
+
fal/toolkit/file/file.py,sha256=_KCKmtmBkBIKD_gFOZALV10dCtOFZTC9MQw2qmdeevw,11013
|
|
63
63
|
fal/toolkit/file/types.py,sha256=MMAH_AyLOhowQPesOv1V25wB4qgbJ3vYNlnTPbdSv1M,2304
|
|
64
64
|
fal/toolkit/file/providers/fal.py,sha256=Ph8v3Cm_eFu1b1AXiPKZQ5r8AWUALD3Wk18uw3z8RDQ,46910
|
|
65
65
|
fal/toolkit/file/providers/gcp.py,sha256=DKeZpm1MjwbvEsYvkdXUtuLIJDr_UNbqXj_Mfv3NTeo,2437
|
|
@@ -142,8 +142,8 @@ openapi_fal_rest/models/workflow_node_type.py,sha256=-FzyeY2bxcNmizKbJI8joG7byRi
|
|
|
142
142
|
openapi_fal_rest/models/workflow_schema.py,sha256=4K5gsv9u9pxx2ItkffoyHeNjBBYf6ur5bN4m_zePZNY,2019
|
|
143
143
|
openapi_fal_rest/models/workflow_schema_input.py,sha256=2OkOXWHTNsCXHWS6EGDFzcJKkW5FIap-2gfO233EvZQ,1191
|
|
144
144
|
openapi_fal_rest/models/workflow_schema_output.py,sha256=EblwSPAGfWfYVWw_WSSaBzQVju296is9o28rMBAd0mc,1196
|
|
145
|
-
fal-1.28.
|
|
146
|
-
fal-1.28.
|
|
147
|
-
fal-1.28.
|
|
148
|
-
fal-1.28.
|
|
149
|
-
fal-1.28.
|
|
145
|
+
fal-1.28.3.dist-info/METADATA,sha256=Kiu3zHQJmCNTMO1qEmsX-fypffI2zBIpX89ofxEkcf4,4089
|
|
146
|
+
fal-1.28.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
147
|
+
fal-1.28.3.dist-info/entry_points.txt,sha256=32zwTUC1U1E7nSTIGCoANQOQ3I7-qHG5wI6gsVz5pNU,37
|
|
148
|
+
fal-1.28.3.dist-info/top_level.txt,sha256=r257X1L57oJL8_lM0tRrfGuXFwm66i1huwQygbpLmHw,21
|
|
149
|
+
fal-1.28.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|