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.
- fal/_fal_version.py +2 -2
- fal/api.py +116 -29
- fal/app.py +63 -1
- fal/cli/deploy.py +18 -8
- fal/cli/doctor.py +37 -0
- fal/cli/main.py +2 -2
- fal/sdk.py +6 -2
- fal/toolkit/file/providers/fal.py +1 -0
- fal/workflows.py +1 -1
- {fal-1.0.7.dist-info → fal-1.1.0.dist-info}/METADATA +2 -1
- {fal-1.0.7.dist-info → fal-1.1.0.dist-info}/RECORD +49 -27
- {fal-1.0.7.dist-info → fal-1.1.0.dist-info}/WHEEL +1 -1
- openapi_fal_rest/api/comfy/__init__.py +0 -0
- openapi_fal_rest/api/comfy/create_workflow.py +172 -0
- openapi_fal_rest/api/comfy/delete_workflow.py +175 -0
- openapi_fal_rest/api/comfy/get_workflow.py +181 -0
- openapi_fal_rest/api/comfy/list_user_workflows.py +189 -0
- openapi_fal_rest/api/comfy/update_workflow.py +198 -0
- openapi_fal_rest/api/users/__init__.py +0 -0
- openapi_fal_rest/api/users/get_current_user.py +143 -0
- openapi_fal_rest/api/workflows/{create_or_update_workflow_workflows_post.py → create_workflow.py} +4 -4
- openapi_fal_rest/api/workflows/{get_workflows_workflows_get.py → list_user_workflows.py} +4 -4
- openapi_fal_rest/api/workflows/update_workflow.py +198 -0
- openapi_fal_rest/models/__init__.py +32 -10
- openapi_fal_rest/models/comfy_workflow_detail.py +109 -0
- openapi_fal_rest/models/comfy_workflow_item.py +88 -0
- openapi_fal_rest/models/comfy_workflow_schema.py +119 -0
- 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
- 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
- openapi_fal_rest/models/comfy_workflow_schema_fal_inputs_dev_info.py +44 -0
- openapi_fal_rest/models/{workflow_detail_contents_type_0.py → comfy_workflow_schema_prompt.py} +5 -5
- openapi_fal_rest/models/current_user.py +138 -0
- openapi_fal_rest/models/customer_details.py +8 -8
- openapi_fal_rest/models/lock_reason.py +3 -0
- openapi_fal_rest/models/page_comfy_workflow_item.py +107 -0
- openapi_fal_rest/models/team_role.py +10 -0
- openapi_fal_rest/models/typed_comfy_workflow.py +85 -0
- openapi_fal_rest/models/typed_comfy_workflow_update.py +95 -0
- openapi_fal_rest/models/typed_workflow_update.py +95 -0
- openapi_fal_rest/models/user_member.py +87 -0
- openapi_fal_rest/models/workflow_contents.py +20 -1
- openapi_fal_rest/models/workflow_contents_metadata.py +44 -0
- openapi_fal_rest/models/workflow_detail.py +18 -59
- openapi_fal_rest/models/workflow_detail_contents.py +44 -0
- openapi_fal_rest/models/workflow_item.py +19 -1
- openapi_fal_rest/api/workflows/execute_workflow_workflows_user_id_workflow_name_post.py +0 -268
- {fal-1.0.7.dist-info → fal-1.1.0.dist-info}/entry_points.txt +0 -0
- {fal-1.0.7.dist-info → fal-1.1.0.dist-info}/top_level.txt +0 -0
- /openapi_fal_rest/api/workflows/{delete_workflow_workflows_user_id_workflow_name_delete.py → delete_workflow.py} +0 -0
- /openapi_fal_rest/api/workflows/{get_workflow_workflows_user_id_workflow_name_get.py → get_workflow.py} +0 -0
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any, Dict, Optional, Union
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ... import errors
|
|
7
|
+
from ...client import Client
|
|
8
|
+
from ...models.http_validation_error import HTTPValidationError
|
|
9
|
+
from ...models.typed_workflow_update import TypedWorkflowUpdate
|
|
10
|
+
from ...models.workflow_detail import WorkflowDetail
|
|
11
|
+
from ...types import Response
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _get_kwargs(
|
|
15
|
+
user_id: str,
|
|
16
|
+
workflow_name: str,
|
|
17
|
+
*,
|
|
18
|
+
client: Client,
|
|
19
|
+
json_body: TypedWorkflowUpdate,
|
|
20
|
+
) -> Dict[str, Any]:
|
|
21
|
+
url = "{}/workflows/{user_id}/{workflow_name}".format(client.base_url, user_id=user_id, workflow_name=workflow_name)
|
|
22
|
+
|
|
23
|
+
headers: Dict[str, str] = client.get_headers()
|
|
24
|
+
cookies: Dict[str, Any] = client.get_cookies()
|
|
25
|
+
|
|
26
|
+
json_json_body = json_body.to_dict()
|
|
27
|
+
|
|
28
|
+
return {
|
|
29
|
+
"method": "patch",
|
|
30
|
+
"url": url,
|
|
31
|
+
"headers": headers,
|
|
32
|
+
"cookies": cookies,
|
|
33
|
+
"timeout": client.get_timeout(),
|
|
34
|
+
"follow_redirects": client.follow_redirects,
|
|
35
|
+
"json": json_json_body,
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def _parse_response(
|
|
40
|
+
*, client: Client, response: httpx.Response
|
|
41
|
+
) -> Optional[Union[HTTPValidationError, WorkflowDetail]]:
|
|
42
|
+
if response.status_code == HTTPStatus.CREATED:
|
|
43
|
+
response_201 = WorkflowDetail.from_dict(response.json())
|
|
44
|
+
|
|
45
|
+
return response_201
|
|
46
|
+
if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY:
|
|
47
|
+
response_422 = HTTPValidationError.from_dict(response.json())
|
|
48
|
+
|
|
49
|
+
return response_422
|
|
50
|
+
if client.raise_on_unexpected_status:
|
|
51
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
52
|
+
else:
|
|
53
|
+
return None
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
def _build_response(
|
|
57
|
+
*, client: Client, response: httpx.Response
|
|
58
|
+
) -> Response[Union[HTTPValidationError, WorkflowDetail]]:
|
|
59
|
+
return Response(
|
|
60
|
+
status_code=HTTPStatus(response.status_code),
|
|
61
|
+
content=response.content,
|
|
62
|
+
headers=response.headers,
|
|
63
|
+
parsed=_parse_response(client=client, response=response),
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
def sync_detailed(
|
|
68
|
+
user_id: str,
|
|
69
|
+
workflow_name: str,
|
|
70
|
+
*,
|
|
71
|
+
client: Client,
|
|
72
|
+
json_body: TypedWorkflowUpdate,
|
|
73
|
+
) -> Response[Union[HTTPValidationError, WorkflowDetail]]:
|
|
74
|
+
"""Update Workflow
|
|
75
|
+
|
|
76
|
+
Args:
|
|
77
|
+
user_id (str):
|
|
78
|
+
workflow_name (str):
|
|
79
|
+
json_body (TypedWorkflowUpdate):
|
|
80
|
+
|
|
81
|
+
Raises:
|
|
82
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
83
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
84
|
+
|
|
85
|
+
Returns:
|
|
86
|
+
Response[Union[HTTPValidationError, WorkflowDetail]]
|
|
87
|
+
"""
|
|
88
|
+
|
|
89
|
+
kwargs = _get_kwargs(
|
|
90
|
+
user_id=user_id,
|
|
91
|
+
workflow_name=workflow_name,
|
|
92
|
+
client=client,
|
|
93
|
+
json_body=json_body,
|
|
94
|
+
)
|
|
95
|
+
|
|
96
|
+
response = httpx.request(
|
|
97
|
+
verify=client.verify_ssl,
|
|
98
|
+
**kwargs,
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
return _build_response(client=client, response=response)
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
def sync(
|
|
105
|
+
user_id: str,
|
|
106
|
+
workflow_name: str,
|
|
107
|
+
*,
|
|
108
|
+
client: Client,
|
|
109
|
+
json_body: TypedWorkflowUpdate,
|
|
110
|
+
) -> Optional[Union[HTTPValidationError, WorkflowDetail]]:
|
|
111
|
+
"""Update Workflow
|
|
112
|
+
|
|
113
|
+
Args:
|
|
114
|
+
user_id (str):
|
|
115
|
+
workflow_name (str):
|
|
116
|
+
json_body (TypedWorkflowUpdate):
|
|
117
|
+
|
|
118
|
+
Raises:
|
|
119
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
120
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
121
|
+
|
|
122
|
+
Returns:
|
|
123
|
+
Union[HTTPValidationError, WorkflowDetail]
|
|
124
|
+
"""
|
|
125
|
+
|
|
126
|
+
return sync_detailed(
|
|
127
|
+
user_id=user_id,
|
|
128
|
+
workflow_name=workflow_name,
|
|
129
|
+
client=client,
|
|
130
|
+
json_body=json_body,
|
|
131
|
+
).parsed
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
async def asyncio_detailed(
|
|
135
|
+
user_id: str,
|
|
136
|
+
workflow_name: str,
|
|
137
|
+
*,
|
|
138
|
+
client: Client,
|
|
139
|
+
json_body: TypedWorkflowUpdate,
|
|
140
|
+
) -> Response[Union[HTTPValidationError, WorkflowDetail]]:
|
|
141
|
+
"""Update Workflow
|
|
142
|
+
|
|
143
|
+
Args:
|
|
144
|
+
user_id (str):
|
|
145
|
+
workflow_name (str):
|
|
146
|
+
json_body (TypedWorkflowUpdate):
|
|
147
|
+
|
|
148
|
+
Raises:
|
|
149
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
150
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
151
|
+
|
|
152
|
+
Returns:
|
|
153
|
+
Response[Union[HTTPValidationError, WorkflowDetail]]
|
|
154
|
+
"""
|
|
155
|
+
|
|
156
|
+
kwargs = _get_kwargs(
|
|
157
|
+
user_id=user_id,
|
|
158
|
+
workflow_name=workflow_name,
|
|
159
|
+
client=client,
|
|
160
|
+
json_body=json_body,
|
|
161
|
+
)
|
|
162
|
+
|
|
163
|
+
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
|
164
|
+
response = await _client.request(**kwargs)
|
|
165
|
+
|
|
166
|
+
return _build_response(client=client, response=response)
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
async def asyncio(
|
|
170
|
+
user_id: str,
|
|
171
|
+
workflow_name: str,
|
|
172
|
+
*,
|
|
173
|
+
client: Client,
|
|
174
|
+
json_body: TypedWorkflowUpdate,
|
|
175
|
+
) -> Optional[Union[HTTPValidationError, WorkflowDetail]]:
|
|
176
|
+
"""Update Workflow
|
|
177
|
+
|
|
178
|
+
Args:
|
|
179
|
+
user_id (str):
|
|
180
|
+
workflow_name (str):
|
|
181
|
+
json_body (TypedWorkflowUpdate):
|
|
182
|
+
|
|
183
|
+
Raises:
|
|
184
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
185
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
186
|
+
|
|
187
|
+
Returns:
|
|
188
|
+
Union[HTTPValidationError, WorkflowDetail]
|
|
189
|
+
"""
|
|
190
|
+
|
|
191
|
+
return (
|
|
192
|
+
await asyncio_detailed(
|
|
193
|
+
user_id=user_id,
|
|
194
|
+
workflow_name=workflow_name,
|
|
195
|
+
client=client,
|
|
196
|
+
json_body=json_body,
|
|
197
|
+
)
|
|
198
|
+
).parsed
|
|
@@ -2,24 +2,33 @@
|
|
|
2
2
|
|
|
3
3
|
from .app_metadata_response_app_metadata import AppMetadataResponseAppMetadata
|
|
4
4
|
from .body_upload_local_file import BodyUploadLocalFile
|
|
5
|
+
from .comfy_workflow_detail import ComfyWorkflowDetail
|
|
6
|
+
from .comfy_workflow_item import ComfyWorkflowItem
|
|
7
|
+
from .comfy_workflow_schema import ComfyWorkflowSchema
|
|
8
|
+
from .comfy_workflow_schema_extra_data import ComfyWorkflowSchemaExtraData
|
|
9
|
+
from .comfy_workflow_schema_fal_inputs import ComfyWorkflowSchemaFalInputs
|
|
10
|
+
from .comfy_workflow_schema_fal_inputs_dev_info import ComfyWorkflowSchemaFalInputsDevInfo
|
|
11
|
+
from .comfy_workflow_schema_prompt import ComfyWorkflowSchemaPrompt
|
|
12
|
+
from .current_user import CurrentUser
|
|
5
13
|
from .customer_details import CustomerDetails
|
|
6
|
-
from .execute_workflow_workflows_user_id_workflow_name_post_json_body_type_0 import (
|
|
7
|
-
ExecuteWorkflowWorkflowsUserIdWorkflowNamePostJsonBodyType0,
|
|
8
|
-
)
|
|
9
|
-
from .execute_workflow_workflows_user_id_workflow_name_post_response_200_type_0 import (
|
|
10
|
-
ExecuteWorkflowWorkflowsUserIdWorkflowNamePostResponse200Type0,
|
|
11
|
-
)
|
|
12
14
|
from .hash_check import HashCheck
|
|
13
15
|
from .http_validation_error import HTTPValidationError
|
|
14
16
|
from .lock_reason import LockReason
|
|
17
|
+
from .page_comfy_workflow_item import PageComfyWorkflowItem
|
|
15
18
|
from .page_workflow_item import PageWorkflowItem
|
|
19
|
+
from .team_role import TeamRole
|
|
20
|
+
from .typed_comfy_workflow import TypedComfyWorkflow
|
|
21
|
+
from .typed_comfy_workflow_update import TypedComfyWorkflowUpdate
|
|
16
22
|
from .typed_workflow import TypedWorkflow
|
|
23
|
+
from .typed_workflow_update import TypedWorkflowUpdate
|
|
24
|
+
from .user_member import UserMember
|
|
17
25
|
from .validation_error import ValidationError
|
|
18
26
|
from .workflow_contents import WorkflowContents
|
|
27
|
+
from .workflow_contents_metadata import WorkflowContentsMetadata
|
|
19
28
|
from .workflow_contents_nodes import WorkflowContentsNodes
|
|
20
29
|
from .workflow_contents_output import WorkflowContentsOutput
|
|
21
30
|
from .workflow_detail import WorkflowDetail
|
|
22
|
-
from .
|
|
31
|
+
from .workflow_detail_contents import WorkflowDetailContents
|
|
23
32
|
from .workflow_item import WorkflowItem
|
|
24
33
|
from .workflow_node import WorkflowNode
|
|
25
34
|
from .workflow_node_type import WorkflowNodeType
|
|
@@ -30,20 +39,33 @@ from .workflow_schema_output import WorkflowSchemaOutput
|
|
|
30
39
|
__all__ = (
|
|
31
40
|
"AppMetadataResponseAppMetadata",
|
|
32
41
|
"BodyUploadLocalFile",
|
|
42
|
+
"ComfyWorkflowDetail",
|
|
43
|
+
"ComfyWorkflowItem",
|
|
44
|
+
"ComfyWorkflowSchema",
|
|
45
|
+
"ComfyWorkflowSchemaExtraData",
|
|
46
|
+
"ComfyWorkflowSchemaFalInputs",
|
|
47
|
+
"ComfyWorkflowSchemaFalInputsDevInfo",
|
|
48
|
+
"ComfyWorkflowSchemaPrompt",
|
|
49
|
+
"CurrentUser",
|
|
33
50
|
"CustomerDetails",
|
|
34
|
-
"ExecuteWorkflowWorkflowsUserIdWorkflowNamePostJsonBodyType0",
|
|
35
|
-
"ExecuteWorkflowWorkflowsUserIdWorkflowNamePostResponse200Type0",
|
|
36
51
|
"HashCheck",
|
|
37
52
|
"HTTPValidationError",
|
|
38
53
|
"LockReason",
|
|
54
|
+
"PageComfyWorkflowItem",
|
|
39
55
|
"PageWorkflowItem",
|
|
56
|
+
"TeamRole",
|
|
57
|
+
"TypedComfyWorkflow",
|
|
58
|
+
"TypedComfyWorkflowUpdate",
|
|
40
59
|
"TypedWorkflow",
|
|
60
|
+
"TypedWorkflowUpdate",
|
|
61
|
+
"UserMember",
|
|
41
62
|
"ValidationError",
|
|
42
63
|
"WorkflowContents",
|
|
64
|
+
"WorkflowContentsMetadata",
|
|
43
65
|
"WorkflowContentsNodes",
|
|
44
66
|
"WorkflowContentsOutput",
|
|
45
67
|
"WorkflowDetail",
|
|
46
|
-
"
|
|
68
|
+
"WorkflowDetailContents",
|
|
47
69
|
"WorkflowItem",
|
|
48
70
|
"WorkflowNode",
|
|
49
71
|
"WorkflowNodeType",
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import datetime
|
|
2
|
+
from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar
|
|
3
|
+
|
|
4
|
+
import attr
|
|
5
|
+
from dateutil.parser import isoparse
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
from ..models.comfy_workflow_schema import ComfyWorkflowSchema
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="ComfyWorkflowDetail")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@attr.s(auto_attribs=True)
|
|
15
|
+
class ComfyWorkflowDetail:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
created_at (datetime.datetime):
|
|
19
|
+
user_id (str):
|
|
20
|
+
workflow (ComfyWorkflowSchema):
|
|
21
|
+
is_public (bool):
|
|
22
|
+
title (str):
|
|
23
|
+
name (str):
|
|
24
|
+
user_nickname (str):
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
created_at: datetime.datetime
|
|
28
|
+
user_id: str
|
|
29
|
+
workflow: "ComfyWorkflowSchema"
|
|
30
|
+
is_public: bool
|
|
31
|
+
title: str
|
|
32
|
+
name: str
|
|
33
|
+
user_nickname: str
|
|
34
|
+
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
|
35
|
+
|
|
36
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
37
|
+
created_at = self.created_at.isoformat()
|
|
38
|
+
|
|
39
|
+
user_id = self.user_id
|
|
40
|
+
workflow = self.workflow.to_dict()
|
|
41
|
+
|
|
42
|
+
is_public = self.is_public
|
|
43
|
+
title = self.title
|
|
44
|
+
name = self.name
|
|
45
|
+
user_nickname = self.user_nickname
|
|
46
|
+
|
|
47
|
+
field_dict: Dict[str, Any] = {}
|
|
48
|
+
field_dict.update(self.additional_properties)
|
|
49
|
+
field_dict.update(
|
|
50
|
+
{
|
|
51
|
+
"created_at": created_at,
|
|
52
|
+
"user_id": user_id,
|
|
53
|
+
"workflow": workflow,
|
|
54
|
+
"is_public": is_public,
|
|
55
|
+
"title": title,
|
|
56
|
+
"name": name,
|
|
57
|
+
"user_nickname": user_nickname,
|
|
58
|
+
}
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
return field_dict
|
|
62
|
+
|
|
63
|
+
@classmethod
|
|
64
|
+
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
65
|
+
from ..models.comfy_workflow_schema import ComfyWorkflowSchema
|
|
66
|
+
|
|
67
|
+
d = src_dict.copy()
|
|
68
|
+
created_at = isoparse(d.pop("created_at"))
|
|
69
|
+
|
|
70
|
+
user_id = d.pop("user_id")
|
|
71
|
+
|
|
72
|
+
workflow = ComfyWorkflowSchema.from_dict(d.pop("workflow"))
|
|
73
|
+
|
|
74
|
+
is_public = d.pop("is_public")
|
|
75
|
+
|
|
76
|
+
title = d.pop("title")
|
|
77
|
+
|
|
78
|
+
name = d.pop("name")
|
|
79
|
+
|
|
80
|
+
user_nickname = d.pop("user_nickname")
|
|
81
|
+
|
|
82
|
+
comfy_workflow_detail = cls(
|
|
83
|
+
created_at=created_at,
|
|
84
|
+
user_id=user_id,
|
|
85
|
+
workflow=workflow,
|
|
86
|
+
is_public=is_public,
|
|
87
|
+
title=title,
|
|
88
|
+
name=name,
|
|
89
|
+
user_nickname=user_nickname,
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
comfy_workflow_detail.additional_properties = d
|
|
93
|
+
return comfy_workflow_detail
|
|
94
|
+
|
|
95
|
+
@property
|
|
96
|
+
def additional_keys(self) -> List[str]:
|
|
97
|
+
return list(self.additional_properties.keys())
|
|
98
|
+
|
|
99
|
+
def __getitem__(self, key: str) -> Any:
|
|
100
|
+
return self.additional_properties[key]
|
|
101
|
+
|
|
102
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
103
|
+
self.additional_properties[key] = value
|
|
104
|
+
|
|
105
|
+
def __delitem__(self, key: str) -> None:
|
|
106
|
+
del self.additional_properties[key]
|
|
107
|
+
|
|
108
|
+
def __contains__(self, key: str) -> bool:
|
|
109
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import datetime
|
|
2
|
+
from typing import Any, Dict, List, Type, TypeVar
|
|
3
|
+
|
|
4
|
+
import attr
|
|
5
|
+
from dateutil.parser import isoparse
|
|
6
|
+
|
|
7
|
+
T = TypeVar("T", bound="ComfyWorkflowItem")
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@attr.s(auto_attribs=True)
|
|
11
|
+
class ComfyWorkflowItem:
|
|
12
|
+
"""
|
|
13
|
+
Attributes:
|
|
14
|
+
name (str):
|
|
15
|
+
title (str):
|
|
16
|
+
user_id (str):
|
|
17
|
+
created_at (datetime.datetime):
|
|
18
|
+
user_nickname (str):
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
name: str
|
|
22
|
+
title: str
|
|
23
|
+
user_id: str
|
|
24
|
+
created_at: datetime.datetime
|
|
25
|
+
user_nickname: str
|
|
26
|
+
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
|
27
|
+
|
|
28
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
29
|
+
name = self.name
|
|
30
|
+
title = self.title
|
|
31
|
+
user_id = self.user_id
|
|
32
|
+
created_at = self.created_at.isoformat()
|
|
33
|
+
|
|
34
|
+
user_nickname = self.user_nickname
|
|
35
|
+
|
|
36
|
+
field_dict: Dict[str, Any] = {}
|
|
37
|
+
field_dict.update(self.additional_properties)
|
|
38
|
+
field_dict.update(
|
|
39
|
+
{
|
|
40
|
+
"name": name,
|
|
41
|
+
"title": title,
|
|
42
|
+
"user_id": user_id,
|
|
43
|
+
"created_at": created_at,
|
|
44
|
+
"user_nickname": user_nickname,
|
|
45
|
+
}
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
return field_dict
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
52
|
+
d = src_dict.copy()
|
|
53
|
+
name = d.pop("name")
|
|
54
|
+
|
|
55
|
+
title = d.pop("title")
|
|
56
|
+
|
|
57
|
+
user_id = d.pop("user_id")
|
|
58
|
+
|
|
59
|
+
created_at = isoparse(d.pop("created_at"))
|
|
60
|
+
|
|
61
|
+
user_nickname = d.pop("user_nickname")
|
|
62
|
+
|
|
63
|
+
comfy_workflow_item = cls(
|
|
64
|
+
name=name,
|
|
65
|
+
title=title,
|
|
66
|
+
user_id=user_id,
|
|
67
|
+
created_at=created_at,
|
|
68
|
+
user_nickname=user_nickname,
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
comfy_workflow_item.additional_properties = d
|
|
72
|
+
return comfy_workflow_item
|
|
73
|
+
|
|
74
|
+
@property
|
|
75
|
+
def additional_keys(self) -> List[str]:
|
|
76
|
+
return list(self.additional_properties.keys())
|
|
77
|
+
|
|
78
|
+
def __getitem__(self, key: str) -> Any:
|
|
79
|
+
return self.additional_properties[key]
|
|
80
|
+
|
|
81
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
82
|
+
self.additional_properties[key] = value
|
|
83
|
+
|
|
84
|
+
def __delitem__(self, key: str) -> None:
|
|
85
|
+
del self.additional_properties[key]
|
|
86
|
+
|
|
87
|
+
def __contains__(self, key: str) -> bool:
|
|
88
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union
|
|
2
|
+
|
|
3
|
+
import attr
|
|
4
|
+
|
|
5
|
+
from ..types import UNSET, Unset
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
from ..models.comfy_workflow_schema_extra_data import ComfyWorkflowSchemaExtraData
|
|
9
|
+
from ..models.comfy_workflow_schema_fal_inputs import ComfyWorkflowSchemaFalInputs
|
|
10
|
+
from ..models.comfy_workflow_schema_fal_inputs_dev_info import ComfyWorkflowSchemaFalInputsDevInfo
|
|
11
|
+
from ..models.comfy_workflow_schema_prompt import ComfyWorkflowSchemaPrompt
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
T = TypeVar("T", bound="ComfyWorkflowSchema")
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@attr.s(auto_attribs=True)
|
|
18
|
+
class ComfyWorkflowSchema:
|
|
19
|
+
"""
|
|
20
|
+
Attributes:
|
|
21
|
+
prompt (ComfyWorkflowSchemaPrompt):
|
|
22
|
+
extra_data (Union[Unset, ComfyWorkflowSchemaExtraData]):
|
|
23
|
+
fal_inputs_dev_info (Union[Unset, ComfyWorkflowSchemaFalInputsDevInfo]):
|
|
24
|
+
fal_inputs (Union[Unset, ComfyWorkflowSchemaFalInputs]):
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
prompt: "ComfyWorkflowSchemaPrompt"
|
|
28
|
+
extra_data: Union[Unset, "ComfyWorkflowSchemaExtraData"] = UNSET
|
|
29
|
+
fal_inputs_dev_info: Union[Unset, "ComfyWorkflowSchemaFalInputsDevInfo"] = UNSET
|
|
30
|
+
fal_inputs: Union[Unset, "ComfyWorkflowSchemaFalInputs"] = UNSET
|
|
31
|
+
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
|
32
|
+
|
|
33
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
34
|
+
prompt = self.prompt.to_dict()
|
|
35
|
+
|
|
36
|
+
extra_data: Union[Unset, Dict[str, Any]] = UNSET
|
|
37
|
+
if not isinstance(self.extra_data, Unset):
|
|
38
|
+
extra_data = self.extra_data.to_dict()
|
|
39
|
+
|
|
40
|
+
fal_inputs_dev_info: Union[Unset, Dict[str, Any]] = UNSET
|
|
41
|
+
if not isinstance(self.fal_inputs_dev_info, Unset):
|
|
42
|
+
fal_inputs_dev_info = self.fal_inputs_dev_info.to_dict()
|
|
43
|
+
|
|
44
|
+
fal_inputs: Union[Unset, Dict[str, Any]] = UNSET
|
|
45
|
+
if not isinstance(self.fal_inputs, Unset):
|
|
46
|
+
fal_inputs = self.fal_inputs.to_dict()
|
|
47
|
+
|
|
48
|
+
field_dict: Dict[str, Any] = {}
|
|
49
|
+
field_dict.update(self.additional_properties)
|
|
50
|
+
field_dict.update(
|
|
51
|
+
{
|
|
52
|
+
"prompt": prompt,
|
|
53
|
+
}
|
|
54
|
+
)
|
|
55
|
+
if extra_data is not UNSET:
|
|
56
|
+
field_dict["extra_data"] = extra_data
|
|
57
|
+
if fal_inputs_dev_info is not UNSET:
|
|
58
|
+
field_dict["fal_inputs_dev_info"] = fal_inputs_dev_info
|
|
59
|
+
if fal_inputs is not UNSET:
|
|
60
|
+
field_dict["fal_inputs"] = fal_inputs
|
|
61
|
+
|
|
62
|
+
return field_dict
|
|
63
|
+
|
|
64
|
+
@classmethod
|
|
65
|
+
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
66
|
+
from ..models.comfy_workflow_schema_extra_data import ComfyWorkflowSchemaExtraData
|
|
67
|
+
from ..models.comfy_workflow_schema_fal_inputs import ComfyWorkflowSchemaFalInputs
|
|
68
|
+
from ..models.comfy_workflow_schema_fal_inputs_dev_info import ComfyWorkflowSchemaFalInputsDevInfo
|
|
69
|
+
from ..models.comfy_workflow_schema_prompt import ComfyWorkflowSchemaPrompt
|
|
70
|
+
|
|
71
|
+
d = src_dict.copy()
|
|
72
|
+
prompt = ComfyWorkflowSchemaPrompt.from_dict(d.pop("prompt"))
|
|
73
|
+
|
|
74
|
+
_extra_data = d.pop("extra_data", UNSET)
|
|
75
|
+
extra_data: Union[Unset, ComfyWorkflowSchemaExtraData]
|
|
76
|
+
if isinstance(_extra_data, Unset):
|
|
77
|
+
extra_data = UNSET
|
|
78
|
+
else:
|
|
79
|
+
extra_data = ComfyWorkflowSchemaExtraData.from_dict(_extra_data)
|
|
80
|
+
|
|
81
|
+
_fal_inputs_dev_info = d.pop("fal_inputs_dev_info", UNSET)
|
|
82
|
+
fal_inputs_dev_info: Union[Unset, ComfyWorkflowSchemaFalInputsDevInfo]
|
|
83
|
+
if isinstance(_fal_inputs_dev_info, Unset):
|
|
84
|
+
fal_inputs_dev_info = UNSET
|
|
85
|
+
else:
|
|
86
|
+
fal_inputs_dev_info = ComfyWorkflowSchemaFalInputsDevInfo.from_dict(_fal_inputs_dev_info)
|
|
87
|
+
|
|
88
|
+
_fal_inputs = d.pop("fal_inputs", UNSET)
|
|
89
|
+
fal_inputs: Union[Unset, ComfyWorkflowSchemaFalInputs]
|
|
90
|
+
if isinstance(_fal_inputs, Unset):
|
|
91
|
+
fal_inputs = UNSET
|
|
92
|
+
else:
|
|
93
|
+
fal_inputs = ComfyWorkflowSchemaFalInputs.from_dict(_fal_inputs)
|
|
94
|
+
|
|
95
|
+
comfy_workflow_schema = cls(
|
|
96
|
+
prompt=prompt,
|
|
97
|
+
extra_data=extra_data,
|
|
98
|
+
fal_inputs_dev_info=fal_inputs_dev_info,
|
|
99
|
+
fal_inputs=fal_inputs,
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
comfy_workflow_schema.additional_properties = d
|
|
103
|
+
return comfy_workflow_schema
|
|
104
|
+
|
|
105
|
+
@property
|
|
106
|
+
def additional_keys(self) -> List[str]:
|
|
107
|
+
return list(self.additional_properties.keys())
|
|
108
|
+
|
|
109
|
+
def __getitem__(self, key: str) -> Any:
|
|
110
|
+
return self.additional_properties[key]
|
|
111
|
+
|
|
112
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
113
|
+
self.additional_properties[key] = value
|
|
114
|
+
|
|
115
|
+
def __delitem__(self, key: str) -> None:
|
|
116
|
+
del self.additional_properties[key]
|
|
117
|
+
|
|
118
|
+
def __contains__(self, key: str) -> bool:
|
|
119
|
+
return key in self.additional_properties
|
|
@@ -2,11 +2,11 @@ from typing import Any, Dict, List, Type, TypeVar
|
|
|
2
2
|
|
|
3
3
|
import attr
|
|
4
4
|
|
|
5
|
-
T = TypeVar("T", bound="
|
|
5
|
+
T = TypeVar("T", bound="ComfyWorkflowSchemaExtraData")
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
@attr.s(auto_attribs=True)
|
|
9
|
-
class
|
|
9
|
+
class ComfyWorkflowSchemaExtraData:
|
|
10
10
|
""" """
|
|
11
11
|
|
|
12
12
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
|
@@ -22,10 +22,10 @@ class ExecuteWorkflowWorkflowsUserIdWorkflowNamePostJsonBodyType0:
|
|
|
22
22
|
@classmethod
|
|
23
23
|
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
24
24
|
d = src_dict.copy()
|
|
25
|
-
|
|
25
|
+
comfy_workflow_schema_extra_data = cls()
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
return
|
|
27
|
+
comfy_workflow_schema_extra_data.additional_properties = d
|
|
28
|
+
return comfy_workflow_schema_extra_data
|
|
29
29
|
|
|
30
30
|
@property
|
|
31
31
|
def additional_keys(self) -> List[str]:
|
|
@@ -2,11 +2,11 @@ from typing import Any, Dict, List, Type, TypeVar
|
|
|
2
2
|
|
|
3
3
|
import attr
|
|
4
4
|
|
|
5
|
-
T = TypeVar("T", bound="
|
|
5
|
+
T = TypeVar("T", bound="ComfyWorkflowSchemaFalInputs")
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
@attr.s(auto_attribs=True)
|
|
9
|
-
class
|
|
9
|
+
class ComfyWorkflowSchemaFalInputs:
|
|
10
10
|
""" """
|
|
11
11
|
|
|
12
12
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
|
@@ -22,10 +22,10 @@ class ExecuteWorkflowWorkflowsUserIdWorkflowNamePostResponse200Type0:
|
|
|
22
22
|
@classmethod
|
|
23
23
|
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
24
24
|
d = src_dict.copy()
|
|
25
|
-
|
|
25
|
+
comfy_workflow_schema_fal_inputs = cls()
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
return
|
|
27
|
+
comfy_workflow_schema_fal_inputs.additional_properties = d
|
|
28
|
+
return comfy_workflow_schema_fal_inputs
|
|
29
29
|
|
|
30
30
|
@property
|
|
31
31
|
def additional_keys(self) -> List[str]:
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
from typing import Any, Dict, List, Type, TypeVar
|
|
2
|
+
|
|
3
|
+
import attr
|
|
4
|
+
|
|
5
|
+
T = TypeVar("T", bound="ComfyWorkflowSchemaFalInputsDevInfo")
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@attr.s(auto_attribs=True)
|
|
9
|
+
class ComfyWorkflowSchemaFalInputsDevInfo:
|
|
10
|
+
""" """
|
|
11
|
+
|
|
12
|
+
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
|
13
|
+
|
|
14
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
15
|
+
|
|
16
|
+
field_dict: Dict[str, Any] = {}
|
|
17
|
+
field_dict.update(self.additional_properties)
|
|
18
|
+
field_dict.update({})
|
|
19
|
+
|
|
20
|
+
return field_dict
|
|
21
|
+
|
|
22
|
+
@classmethod
|
|
23
|
+
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
24
|
+
d = src_dict.copy()
|
|
25
|
+
comfy_workflow_schema_fal_inputs_dev_info = cls()
|
|
26
|
+
|
|
27
|
+
comfy_workflow_schema_fal_inputs_dev_info.additional_properties = d
|
|
28
|
+
return comfy_workflow_schema_fal_inputs_dev_info
|
|
29
|
+
|
|
30
|
+
@property
|
|
31
|
+
def additional_keys(self) -> List[str]:
|
|
32
|
+
return list(self.additional_properties.keys())
|
|
33
|
+
|
|
34
|
+
def __getitem__(self, key: str) -> Any:
|
|
35
|
+
return self.additional_properties[key]
|
|
36
|
+
|
|
37
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
38
|
+
self.additional_properties[key] = value
|
|
39
|
+
|
|
40
|
+
def __delitem__(self, key: str) -> None:
|
|
41
|
+
del self.additional_properties[key]
|
|
42
|
+
|
|
43
|
+
def __contains__(self, key: str) -> bool:
|
|
44
|
+
return key in self.additional_properties
|