fal 1.0.7__py3-none-any.whl → 1.1.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.

Files changed (50) hide show
  1. fal/_fal_version.py +2 -2
  2. fal/api.py +116 -29
  3. fal/app.py +63 -1
  4. fal/cli/deploy.py +18 -8
  5. fal/cli/doctor.py +37 -0
  6. fal/cli/main.py +2 -2
  7. fal/sdk.py +6 -2
  8. fal/toolkit/file/providers/fal.py +1 -0
  9. fal/workflows.py +1 -1
  10. {fal-1.0.7.dist-info → fal-1.1.0.dist-info}/METADATA +2 -1
  11. {fal-1.0.7.dist-info → fal-1.1.0.dist-info}/RECORD +49 -27
  12. {fal-1.0.7.dist-info → fal-1.1.0.dist-info}/WHEEL +1 -1
  13. openapi_fal_rest/api/comfy/__init__.py +0 -0
  14. openapi_fal_rest/api/comfy/create_workflow.py +172 -0
  15. openapi_fal_rest/api/comfy/delete_workflow.py +175 -0
  16. openapi_fal_rest/api/comfy/get_workflow.py +181 -0
  17. openapi_fal_rest/api/comfy/list_user_workflows.py +189 -0
  18. openapi_fal_rest/api/comfy/update_workflow.py +198 -0
  19. openapi_fal_rest/api/users/__init__.py +0 -0
  20. openapi_fal_rest/api/users/get_current_user.py +143 -0
  21. openapi_fal_rest/api/workflows/{create_or_update_workflow_workflows_post.py → create_workflow.py} +4 -4
  22. openapi_fal_rest/api/workflows/{get_workflows_workflows_get.py → list_user_workflows.py} +4 -4
  23. openapi_fal_rest/api/workflows/update_workflow.py +198 -0
  24. openapi_fal_rest/models/__init__.py +32 -10
  25. openapi_fal_rest/models/comfy_workflow_detail.py +109 -0
  26. openapi_fal_rest/models/comfy_workflow_item.py +88 -0
  27. openapi_fal_rest/models/comfy_workflow_schema.py +119 -0
  28. openapi_fal_rest/models/{execute_workflow_workflows_user_id_workflow_name_post_json_body_type_0.py → comfy_workflow_schema_extra_data.py} +5 -5
  29. openapi_fal_rest/models/{execute_workflow_workflows_user_id_workflow_name_post_response_200_type_0.py → comfy_workflow_schema_fal_inputs.py} +5 -5
  30. openapi_fal_rest/models/comfy_workflow_schema_fal_inputs_dev_info.py +44 -0
  31. openapi_fal_rest/models/{workflow_detail_contents_type_0.py → comfy_workflow_schema_prompt.py} +5 -5
  32. openapi_fal_rest/models/current_user.py +138 -0
  33. openapi_fal_rest/models/customer_details.py +8 -8
  34. openapi_fal_rest/models/lock_reason.py +3 -0
  35. openapi_fal_rest/models/page_comfy_workflow_item.py +107 -0
  36. openapi_fal_rest/models/team_role.py +10 -0
  37. openapi_fal_rest/models/typed_comfy_workflow.py +85 -0
  38. openapi_fal_rest/models/typed_comfy_workflow_update.py +95 -0
  39. openapi_fal_rest/models/typed_workflow_update.py +95 -0
  40. openapi_fal_rest/models/user_member.py +87 -0
  41. openapi_fal_rest/models/workflow_contents.py +20 -1
  42. openapi_fal_rest/models/workflow_contents_metadata.py +44 -0
  43. openapi_fal_rest/models/workflow_detail.py +18 -59
  44. openapi_fal_rest/models/workflow_detail_contents.py +44 -0
  45. openapi_fal_rest/models/workflow_item.py +19 -1
  46. openapi_fal_rest/api/workflows/execute_workflow_workflows_user_id_workflow_name_post.py +0 -268
  47. {fal-1.0.7.dist-info → fal-1.1.0.dist-info}/entry_points.txt +0 -0
  48. {fal-1.0.7.dist-info → fal-1.1.0.dist-info}/top_level.txt +0 -0
  49. /openapi_fal_rest/api/workflows/{delete_workflow_workflows_user_id_workflow_name_delete.py → delete_workflow.py} +0 -0
  50. /openapi_fal_rest/api/workflows/{get_workflow_workflows_user_id_workflow_name_get.py → get_workflow.py} +0 -0
@@ -1,268 +0,0 @@
1
- from http import HTTPStatus
2
- from typing import Any, Dict, List, Optional, Union, cast
3
-
4
- import httpx
5
-
6
- from ... import errors
7
- from ...client import Client
8
- from ...models.execute_workflow_workflows_user_id_workflow_name_post_json_body_type_0 import (
9
- ExecuteWorkflowWorkflowsUserIdWorkflowNamePostJsonBodyType0,
10
- )
11
- from ...models.execute_workflow_workflows_user_id_workflow_name_post_response_200_type_0 import (
12
- ExecuteWorkflowWorkflowsUserIdWorkflowNamePostResponse200Type0,
13
- )
14
- from ...models.http_validation_error import HTTPValidationError
15
- from ...types import Response
16
-
17
-
18
- def _get_kwargs(
19
- user_id: str,
20
- workflow_name: str,
21
- *,
22
- client: Client,
23
- json_body: Union["ExecuteWorkflowWorkflowsUserIdWorkflowNamePostJsonBodyType0", List[Any], bool, float, int, str],
24
- ) -> Dict[str, Any]:
25
- url = "{}/workflows/{user_id}/{workflow_name}".format(client.base_url, user_id=user_id, workflow_name=workflow_name)
26
-
27
- headers: Dict[str, str] = client.get_headers()
28
- cookies: Dict[str, Any] = client.get_cookies()
29
-
30
- json_json_body: Union[Dict[str, Any], List[Any], bool, float, int, str]
31
-
32
- if isinstance(json_body, ExecuteWorkflowWorkflowsUserIdWorkflowNamePostJsonBodyType0):
33
- json_json_body = json_body.to_dict()
34
-
35
- elif isinstance(json_body, list):
36
- json_json_body = json_body
37
-
38
- else:
39
- json_json_body = json_body
40
-
41
- return {
42
- "method": "post",
43
- "url": url,
44
- "headers": headers,
45
- "cookies": cookies,
46
- "timeout": client.get_timeout(),
47
- "follow_redirects": client.follow_redirects,
48
- "json": json_json_body,
49
- }
50
-
51
-
52
- def _parse_response(*, client: Client, response: httpx.Response) -> Optional[
53
- Union[
54
- HTTPValidationError,
55
- Union["ExecuteWorkflowWorkflowsUserIdWorkflowNamePostResponse200Type0", List[Any], bool, float, int, str],
56
- ]
57
- ]:
58
- if response.status_code == HTTPStatus.OK:
59
-
60
- def _parse_response_200(
61
- data: object,
62
- ) -> Union["ExecuteWorkflowWorkflowsUserIdWorkflowNamePostResponse200Type0", List[Any], bool, float, int, str]:
63
- try:
64
- if not isinstance(data, dict):
65
- raise TypeError()
66
- response_200_type_0 = ExecuteWorkflowWorkflowsUserIdWorkflowNamePostResponse200Type0.from_dict(data)
67
-
68
- return response_200_type_0
69
- except: # noqa: E722
70
- pass
71
- try:
72
- if not isinstance(data, list):
73
- raise TypeError()
74
- response_200_type_1 = cast(List[Any], data)
75
-
76
- return response_200_type_1
77
- except: # noqa: E722
78
- pass
79
- return cast(
80
- Union[
81
- "ExecuteWorkflowWorkflowsUserIdWorkflowNamePostResponse200Type0", List[Any], bool, float, int, str
82
- ],
83
- data,
84
- )
85
-
86
- response_200 = _parse_response_200(response.json())
87
-
88
- return response_200
89
- if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY:
90
- response_422 = HTTPValidationError.from_dict(response.json())
91
-
92
- return response_422
93
- if client.raise_on_unexpected_status:
94
- raise errors.UnexpectedStatus(response.status_code, response.content)
95
- else:
96
- return None
97
-
98
-
99
- def _build_response(*, client: Client, response: httpx.Response) -> Response[
100
- Union[
101
- HTTPValidationError,
102
- Union["ExecuteWorkflowWorkflowsUserIdWorkflowNamePostResponse200Type0", List[Any], bool, float, int, str],
103
- ]
104
- ]:
105
- return Response(
106
- status_code=HTTPStatus(response.status_code),
107
- content=response.content,
108
- headers=response.headers,
109
- parsed=_parse_response(client=client, response=response),
110
- )
111
-
112
-
113
- def sync_detailed(
114
- user_id: str,
115
- workflow_name: str,
116
- *,
117
- client: Client,
118
- json_body: Union["ExecuteWorkflowWorkflowsUserIdWorkflowNamePostJsonBodyType0", List[Any], bool, float, int, str],
119
- ) -> Response[
120
- Union[
121
- HTTPValidationError,
122
- Union["ExecuteWorkflowWorkflowsUserIdWorkflowNamePostResponse200Type0", List[Any], bool, float, int, str],
123
- ]
124
- ]:
125
- """Execute Workflow
126
-
127
- Args:
128
- user_id (str):
129
- workflow_name (str):
130
- json_body (Union['ExecuteWorkflowWorkflowsUserIdWorkflowNamePostJsonBodyType0', List[Any],
131
- bool, float, int, str]):
132
-
133
- Raises:
134
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
135
- httpx.TimeoutException: If the request takes longer than Client.timeout.
136
-
137
- Returns:
138
- Response[Union[HTTPValidationError, Union['ExecuteWorkflowWorkflowsUserIdWorkflowNamePostResponse200Type0', List[Any], bool, float, int, str]]]
139
- """
140
-
141
- kwargs = _get_kwargs(
142
- user_id=user_id,
143
- workflow_name=workflow_name,
144
- client=client,
145
- json_body=json_body,
146
- )
147
-
148
- response = httpx.request(
149
- verify=client.verify_ssl,
150
- **kwargs,
151
- )
152
-
153
- return _build_response(client=client, response=response)
154
-
155
-
156
- def sync(
157
- user_id: str,
158
- workflow_name: str,
159
- *,
160
- client: Client,
161
- json_body: Union["ExecuteWorkflowWorkflowsUserIdWorkflowNamePostJsonBodyType0", List[Any], bool, float, int, str],
162
- ) -> Optional[
163
- Union[
164
- HTTPValidationError,
165
- Union["ExecuteWorkflowWorkflowsUserIdWorkflowNamePostResponse200Type0", List[Any], bool, float, int, str],
166
- ]
167
- ]:
168
- """Execute Workflow
169
-
170
- Args:
171
- user_id (str):
172
- workflow_name (str):
173
- json_body (Union['ExecuteWorkflowWorkflowsUserIdWorkflowNamePostJsonBodyType0', List[Any],
174
- bool, float, int, str]):
175
-
176
- Raises:
177
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
178
- httpx.TimeoutException: If the request takes longer than Client.timeout.
179
-
180
- Returns:
181
- Union[HTTPValidationError, Union['ExecuteWorkflowWorkflowsUserIdWorkflowNamePostResponse200Type0', List[Any], bool, float, int, str]]
182
- """
183
-
184
- return sync_detailed(
185
- user_id=user_id,
186
- workflow_name=workflow_name,
187
- client=client,
188
- json_body=json_body,
189
- ).parsed
190
-
191
-
192
- async def asyncio_detailed(
193
- user_id: str,
194
- workflow_name: str,
195
- *,
196
- client: Client,
197
- json_body: Union["ExecuteWorkflowWorkflowsUserIdWorkflowNamePostJsonBodyType0", List[Any], bool, float, int, str],
198
- ) -> Response[
199
- Union[
200
- HTTPValidationError,
201
- Union["ExecuteWorkflowWorkflowsUserIdWorkflowNamePostResponse200Type0", List[Any], bool, float, int, str],
202
- ]
203
- ]:
204
- """Execute Workflow
205
-
206
- Args:
207
- user_id (str):
208
- workflow_name (str):
209
- json_body (Union['ExecuteWorkflowWorkflowsUserIdWorkflowNamePostJsonBodyType0', List[Any],
210
- bool, float, int, str]):
211
-
212
- Raises:
213
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
214
- httpx.TimeoutException: If the request takes longer than Client.timeout.
215
-
216
- Returns:
217
- Response[Union[HTTPValidationError, Union['ExecuteWorkflowWorkflowsUserIdWorkflowNamePostResponse200Type0', List[Any], bool, float, int, str]]]
218
- """
219
-
220
- kwargs = _get_kwargs(
221
- user_id=user_id,
222
- workflow_name=workflow_name,
223
- client=client,
224
- json_body=json_body,
225
- )
226
-
227
- async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
228
- response = await _client.request(**kwargs)
229
-
230
- return _build_response(client=client, response=response)
231
-
232
-
233
- async def asyncio(
234
- user_id: str,
235
- workflow_name: str,
236
- *,
237
- client: Client,
238
- json_body: Union["ExecuteWorkflowWorkflowsUserIdWorkflowNamePostJsonBodyType0", List[Any], bool, float, int, str],
239
- ) -> Optional[
240
- Union[
241
- HTTPValidationError,
242
- Union["ExecuteWorkflowWorkflowsUserIdWorkflowNamePostResponse200Type0", List[Any], bool, float, int, str],
243
- ]
244
- ]:
245
- """Execute Workflow
246
-
247
- Args:
248
- user_id (str):
249
- workflow_name (str):
250
- json_body (Union['ExecuteWorkflowWorkflowsUserIdWorkflowNamePostJsonBodyType0', List[Any],
251
- bool, float, int, str]):
252
-
253
- Raises:
254
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
255
- httpx.TimeoutException: If the request takes longer than Client.timeout.
256
-
257
- Returns:
258
- Union[HTTPValidationError, Union['ExecuteWorkflowWorkflowsUserIdWorkflowNamePostResponse200Type0', List[Any], bool, float, int, str]]
259
- """
260
-
261
- return (
262
- await asyncio_detailed(
263
- user_id=user_id,
264
- workflow_name=workflow_name,
265
- client=client,
266
- json_body=json_body,
267
- )
268
- ).parsed