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
@@ -0,0 +1,87 @@
1
+ from typing import Any, Dict, List, Type, TypeVar
2
+
3
+ import attr
4
+
5
+ from ..models.team_role import TeamRole
6
+
7
+ T = TypeVar("T", bound="UserMember")
8
+
9
+
10
+ @attr.s(auto_attribs=True)
11
+ class UserMember:
12
+ """
13
+ Attributes:
14
+ auth_id (str):
15
+ nickname (str):
16
+ full_name (str):
17
+ is_owner (bool):
18
+ team_role (TeamRole): An enumeration.
19
+ """
20
+
21
+ auth_id: str
22
+ nickname: str
23
+ full_name: str
24
+ is_owner: bool
25
+ team_role: TeamRole
26
+ additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
27
+
28
+ def to_dict(self) -> Dict[str, Any]:
29
+ auth_id = self.auth_id
30
+ nickname = self.nickname
31
+ full_name = self.full_name
32
+ is_owner = self.is_owner
33
+ team_role = self.team_role.value
34
+
35
+ field_dict: Dict[str, Any] = {}
36
+ field_dict.update(self.additional_properties)
37
+ field_dict.update(
38
+ {
39
+ "auth_id": auth_id,
40
+ "nickname": nickname,
41
+ "full_name": full_name,
42
+ "is_owner": is_owner,
43
+ "team_role": team_role,
44
+ }
45
+ )
46
+
47
+ return field_dict
48
+
49
+ @classmethod
50
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
51
+ d = src_dict.copy()
52
+ auth_id = d.pop("auth_id")
53
+
54
+ nickname = d.pop("nickname")
55
+
56
+ full_name = d.pop("full_name")
57
+
58
+ is_owner = d.pop("is_owner")
59
+
60
+ team_role = TeamRole(d.pop("team_role"))
61
+
62
+ user_member = cls(
63
+ auth_id=auth_id,
64
+ nickname=nickname,
65
+ full_name=full_name,
66
+ is_owner=is_owner,
67
+ team_role=team_role,
68
+ )
69
+
70
+ user_member.additional_properties = d
71
+ return user_member
72
+
73
+ @property
74
+ def additional_keys(self) -> List[str]:
75
+ return list(self.additional_properties.keys())
76
+
77
+ def __getitem__(self, key: str) -> Any:
78
+ return self.additional_properties[key]
79
+
80
+ def __setitem__(self, key: str, value: Any) -> None:
81
+ self.additional_properties[key] = value
82
+
83
+ def __delitem__(self, key: str) -> None:
84
+ del self.additional_properties[key]
85
+
86
+ def __contains__(self, key: str) -> bool:
87
+ return key in self.additional_properties
@@ -1,8 +1,11 @@
1
- from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar
1
+ from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union
2
2
 
3
3
  import attr
4
4
 
5
+ from ..types import UNSET, Unset
6
+
5
7
  if TYPE_CHECKING:
8
+ from ..models.workflow_contents_metadata import WorkflowContentsMetadata
6
9
  from ..models.workflow_contents_nodes import WorkflowContentsNodes
7
10
  from ..models.workflow_contents_output import WorkflowContentsOutput
8
11
  from ..models.workflow_schema import WorkflowSchema
@@ -20,6 +23,7 @@ class WorkflowContents:
20
23
  output (WorkflowContentsOutput):
21
24
  schema (WorkflowSchema):
22
25
  version (str):
26
+ metadata (Union[Unset, WorkflowContentsMetadata]):
23
27
  """
24
28
 
25
29
  name: str
@@ -27,6 +31,7 @@ class WorkflowContents:
27
31
  output: "WorkflowContentsOutput"
28
32
  schema: "WorkflowSchema"
29
33
  version: str
34
+ metadata: Union[Unset, "WorkflowContentsMetadata"] = UNSET
30
35
  additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
31
36
 
32
37
  def to_dict(self) -> Dict[str, Any]:
@@ -38,6 +43,9 @@ class WorkflowContents:
38
43
  schema = self.schema.to_dict()
39
44
 
40
45
  version = self.version
46
+ metadata: Union[Unset, Dict[str, Any]] = UNSET
47
+ if not isinstance(self.metadata, Unset):
48
+ metadata = self.metadata.to_dict()
41
49
 
42
50
  field_dict: Dict[str, Any] = {}
43
51
  field_dict.update(self.additional_properties)
@@ -50,11 +58,14 @@ class WorkflowContents:
50
58
  "version": version,
51
59
  }
52
60
  )
61
+ if metadata is not UNSET:
62
+ field_dict["metadata"] = metadata
53
63
 
54
64
  return field_dict
55
65
 
56
66
  @classmethod
57
67
  def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
68
+ from ..models.workflow_contents_metadata import WorkflowContentsMetadata
58
69
  from ..models.workflow_contents_nodes import WorkflowContentsNodes
59
70
  from ..models.workflow_contents_output import WorkflowContentsOutput
60
71
  from ..models.workflow_schema import WorkflowSchema
@@ -70,12 +81,20 @@ class WorkflowContents:
70
81
 
71
82
  version = d.pop("version")
72
83
 
84
+ _metadata = d.pop("metadata", UNSET)
85
+ metadata: Union[Unset, WorkflowContentsMetadata]
86
+ if isinstance(_metadata, Unset):
87
+ metadata = UNSET
88
+ else:
89
+ metadata = WorkflowContentsMetadata.from_dict(_metadata)
90
+
73
91
  workflow_contents = cls(
74
92
  name=name,
75
93
  nodes=nodes,
76
94
  output=output,
77
95
  schema=schema,
78
96
  version=version,
97
+ metadata=metadata,
79
98
  )
80
99
 
81
100
  workflow_contents.additional_properties = d
@@ -0,0 +1,44 @@
1
+ from typing import Any, Dict, List, Type, TypeVar
2
+
3
+ import attr
4
+
5
+ T = TypeVar("T", bound="WorkflowContentsMetadata")
6
+
7
+
8
+ @attr.s(auto_attribs=True)
9
+ class WorkflowContentsMetadata:
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
+ workflow_contents_metadata = cls()
26
+
27
+ workflow_contents_metadata.additional_properties = d
28
+ return workflow_contents_metadata
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
@@ -1,13 +1,11 @@
1
1
  import datetime
2
- from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast
2
+ from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar
3
3
 
4
4
  import attr
5
5
  from dateutil.parser import isoparse
6
6
 
7
- from ..types import UNSET, Unset
8
-
9
7
  if TYPE_CHECKING:
10
- from ..models.workflow_detail_contents_type_0 import WorkflowDetailContentsType0
8
+ from ..models.workflow_detail_contents import WorkflowDetailContents
11
9
 
12
10
 
13
11
  T = TypeVar("T", bound="WorkflowDetail")
@@ -19,114 +17,75 @@ class WorkflowDetail:
19
17
  Attributes:
20
18
  name (str):
21
19
  title (str):
20
+ contents (WorkflowDetailContents):
22
21
  is_public (bool):
23
22
  user_id (str):
23
+ user_nickname (str):
24
24
  created_at (datetime.datetime):
25
- contents (Union['WorkflowDetailContentsType0', List[Any], Unset, bool, float, int, str]):
26
25
  """
27
26
 
28
27
  name: str
29
28
  title: str
29
+ contents: "WorkflowDetailContents"
30
30
  is_public: bool
31
31
  user_id: str
32
+ user_nickname: str
32
33
  created_at: datetime.datetime
33
- contents: Union["WorkflowDetailContentsType0", List[Any], Unset, bool, float, int, str] = UNSET
34
34
  additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
35
35
 
36
36
  def to_dict(self) -> Dict[str, Any]:
37
- from ..models.workflow_detail_contents_type_0 import WorkflowDetailContentsType0
38
-
39
37
  name = self.name
40
38
  title = self.title
39
+ contents = self.contents.to_dict()
40
+
41
41
  is_public = self.is_public
42
42
  user_id = self.user_id
43
+ user_nickname = self.user_nickname
43
44
  created_at = self.created_at.isoformat()
44
45
 
45
- contents: Union[Dict[str, Any], List[Any], Unset, bool, float, int, str]
46
- if isinstance(self.contents, Unset):
47
- contents = UNSET
48
-
49
- elif isinstance(self.contents, WorkflowDetailContentsType0):
50
- contents = UNSET
51
- if not isinstance(self.contents, Unset):
52
- contents = self.contents.to_dict()
53
-
54
- elif isinstance(self.contents, list):
55
- contents = UNSET
56
- if not isinstance(self.contents, Unset):
57
- contents = self.contents
58
-
59
- else:
60
- contents = self.contents
61
-
62
46
  field_dict: Dict[str, Any] = {}
63
47
  field_dict.update(self.additional_properties)
64
48
  field_dict.update(
65
49
  {
66
50
  "name": name,
67
51
  "title": title,
52
+ "contents": contents,
68
53
  "is_public": is_public,
69
54
  "user_id": user_id,
55
+ "user_nickname": user_nickname,
70
56
  "created_at": created_at,
71
57
  }
72
58
  )
73
- if contents is not UNSET:
74
- field_dict["contents"] = contents
75
59
 
76
60
  return field_dict
77
61
 
78
62
  @classmethod
79
63
  def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
80
- from ..models.workflow_detail_contents_type_0 import WorkflowDetailContentsType0
64
+ from ..models.workflow_detail_contents import WorkflowDetailContents
81
65
 
82
66
  d = src_dict.copy()
83
67
  name = d.pop("name")
84
68
 
85
69
  title = d.pop("title")
86
70
 
71
+ contents = WorkflowDetailContents.from_dict(d.pop("contents"))
72
+
87
73
  is_public = d.pop("is_public")
88
74
 
89
75
  user_id = d.pop("user_id")
90
76
 
91
- created_at = isoparse(d.pop("created_at"))
77
+ user_nickname = d.pop("user_nickname")
92
78
 
93
- def _parse_contents(
94
- data: object,
95
- ) -> Union["WorkflowDetailContentsType0", List[Any], Unset, bool, float, int, str]:
96
- if isinstance(data, Unset):
97
- return data
98
- try:
99
- if not isinstance(data, dict):
100
- raise TypeError()
101
- _contents_type_0 = data
102
- contents_type_0: Union[Unset, WorkflowDetailContentsType0]
103
- if isinstance(_contents_type_0, Unset):
104
- contents_type_0 = UNSET
105
- else:
106
- contents_type_0 = WorkflowDetailContentsType0.from_dict(_contents_type_0)
107
-
108
- return contents_type_0
109
- except: # noqa: E722
110
- pass
111
- try:
112
- if not isinstance(data, list):
113
- raise TypeError()
114
- contents_type_1 = cast(List[Any], data)
115
-
116
- return contents_type_1
117
- except: # noqa: E722
118
- pass
119
- return cast(Union["WorkflowDetailContentsType0", List[Any], Unset, bool, float, int, str], data)
120
-
121
- contents = _parse_contents(d.pop("contents", UNSET))
79
+ created_at = isoparse(d.pop("created_at"))
122
80
 
123
81
  workflow_detail = cls(
124
82
  name=name,
125
83
  title=title,
84
+ contents=contents,
126
85
  is_public=is_public,
127
86
  user_id=user_id,
87
+ user_nickname=user_nickname,
128
88
  created_at=created_at,
129
- contents=contents,
130
89
  )
131
90
 
132
91
  workflow_detail.additional_properties = d
@@ -0,0 +1,44 @@
1
+ from typing import Any, Dict, List, Type, TypeVar
2
+
3
+ import attr
4
+
5
+ T = TypeVar("T", bound="WorkflowDetailContents")
6
+
7
+
8
+ @attr.s(auto_attribs=True)
9
+ class WorkflowDetailContents:
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
+ workflow_detail_contents = cls()
26
+
27
+ workflow_detail_contents.additional_properties = d
28
+ return workflow_detail_contents
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
@@ -1,9 +1,11 @@
1
1
  import datetime
2
- from typing import Any, Dict, List, Type, TypeVar
2
+ from typing import Any, Dict, List, Type, TypeVar, Union
3
3
 
4
4
  import attr
5
5
  from dateutil.parser import isoparse
6
6
 
7
+ from ..types import UNSET, Unset
8
+
7
9
  T = TypeVar("T", bound="WorkflowItem")
8
10
 
9
11
 
@@ -14,21 +16,28 @@ class WorkflowItem:
14
16
  name (str):
15
17
  title (str):
16
18
  user_id (str):
19
+ user_nickname (str):
17
20
  created_at (datetime.datetime):
21
+ thumbnail_url (Union[Unset, str]):
18
22
  """
19
23
 
20
24
  name: str
21
25
  title: str
22
26
  user_id: str
27
+ user_nickname: str
23
28
  created_at: datetime.datetime
29
+ thumbnail_url: Union[Unset, str] = UNSET
24
30
  additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
25
31
 
26
32
  def to_dict(self) -> Dict[str, Any]:
27
33
  name = self.name
28
34
  title = self.title
29
35
  user_id = self.user_id
36
+ user_nickname = self.user_nickname
30
37
  created_at = self.created_at.isoformat()
31
38
 
39
+ thumbnail_url = self.thumbnail_url
40
+
32
41
  field_dict: Dict[str, Any] = {}
33
42
  field_dict.update(self.additional_properties)
34
43
  field_dict.update(
@@ -36,9 +45,12 @@ class WorkflowItem:
36
45
  "name": name,
37
46
  "title": title,
38
47
  "user_id": user_id,
48
+ "user_nickname": user_nickname,
39
49
  "created_at": created_at,
40
50
  }
41
51
  )
52
+ if thumbnail_url is not UNSET:
53
+ field_dict["thumbnail_url"] = thumbnail_url
42
54
 
43
55
  return field_dict
44
56
 
@@ -51,13 +63,19 @@ class WorkflowItem:
51
63
 
52
64
  user_id = d.pop("user_id")
53
65
 
66
+ user_nickname = d.pop("user_nickname")
67
+
54
68
  created_at = isoparse(d.pop("created_at"))
55
69
 
70
+ thumbnail_url = d.pop("thumbnail_url", UNSET)
71
+
56
72
  workflow_item = cls(
57
73
  name=name,
58
74
  title=title,
59
75
  user_id=user_id,
76
+ user_nickname=user_nickname,
60
77
  created_at=created_at,
78
+ thumbnail_url=thumbnail_url,
61
79
  )
62
80
 
63
81
  workflow_item.additional_properties = d