fal 0.12.2__py3-none-any.whl → 0.12.4__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 (46) hide show
  1. fal/__init__.py +11 -2
  2. fal/api.py +130 -50
  3. fal/app.py +81 -134
  4. fal/apps.py +24 -6
  5. fal/auth/__init__.py +14 -2
  6. fal/auth/auth0.py +34 -25
  7. fal/cli.py +9 -4
  8. fal/env.py +0 -4
  9. fal/flags.py +1 -0
  10. fal/logging/__init__.py +0 -2
  11. fal/logging/trace.py +8 -1
  12. fal/sdk.py +33 -6
  13. fal/toolkit/__init__.py +16 -0
  14. fal/workflows.py +481 -0
  15. {fal-0.12.2.dist-info → fal-0.12.4.dist-info}/METADATA +4 -7
  16. fal-0.12.4.dist-info/RECORD +88 -0
  17. openapi_fal_rest/__init__.py +1 -0
  18. openapi_fal_rest/api/workflows/__init__.py +0 -0
  19. openapi_fal_rest/api/workflows/create_or_update_workflow_workflows_post.py +172 -0
  20. openapi_fal_rest/api/workflows/delete_workflow_workflows_user_id_workflow_name_delete.py +175 -0
  21. openapi_fal_rest/api/workflows/execute_workflow_workflows_user_id_workflow_name_post.py +268 -0
  22. openapi_fal_rest/api/workflows/get_workflow_workflows_user_id_workflow_name_get.py +181 -0
  23. openapi_fal_rest/api/workflows/get_workflows_workflows_get.py +189 -0
  24. openapi_fal_rest/models/__init__.py +34 -0
  25. openapi_fal_rest/models/app_metadata_response_app_metadata.py +1 -0
  26. openapi_fal_rest/models/customer_details.py +15 -14
  27. openapi_fal_rest/models/execute_workflow_workflows_user_id_workflow_name_post_json_body_type_0.py +44 -0
  28. openapi_fal_rest/models/execute_workflow_workflows_user_id_workflow_name_post_response_200_type_0.py +44 -0
  29. openapi_fal_rest/models/page_workflow_item.py +107 -0
  30. openapi_fal_rest/models/typed_workflow.py +85 -0
  31. openapi_fal_rest/models/workflow_contents.py +98 -0
  32. openapi_fal_rest/models/workflow_contents_nodes.py +59 -0
  33. openapi_fal_rest/models/workflow_contents_output.py +44 -0
  34. openapi_fal_rest/models/workflow_detail.py +149 -0
  35. openapi_fal_rest/models/workflow_detail_contents_type_0.py +44 -0
  36. openapi_fal_rest/models/workflow_item.py +80 -0
  37. openapi_fal_rest/models/workflow_node.py +74 -0
  38. openapi_fal_rest/models/workflow_node_type.py +9 -0
  39. openapi_fal_rest/models/workflow_schema.py +73 -0
  40. openapi_fal_rest/models/workflow_schema_input.py +44 -0
  41. openapi_fal_rest/models/workflow_schema_output.py +44 -0
  42. openapi_fal_rest/types.py +1 -0
  43. fal/logging/datadog.py +0 -78
  44. fal-0.12.2.dist-info/RECORD +0 -67
  45. {fal-0.12.2.dist-info → fal-0.12.4.dist-info}/WHEEL +0 -0
  46. {fal-0.12.2.dist-info → fal-0.12.4.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,181 @@
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.workflow_detail import WorkflowDetail
10
+ from ...types import Response
11
+
12
+
13
+ def _get_kwargs(
14
+ user_id: str,
15
+ workflow_name: str,
16
+ *,
17
+ client: Client,
18
+ ) -> Dict[str, Any]:
19
+ url = "{}/workflows/{user_id}/{workflow_name}".format(client.base_url, user_id=user_id, workflow_name=workflow_name)
20
+
21
+ headers: Dict[str, str] = client.get_headers()
22
+ cookies: Dict[str, Any] = client.get_cookies()
23
+
24
+ return {
25
+ "method": "get",
26
+ "url": url,
27
+ "headers": headers,
28
+ "cookies": cookies,
29
+ "timeout": client.get_timeout(),
30
+ "follow_redirects": client.follow_redirects,
31
+ }
32
+
33
+
34
+ def _parse_response(
35
+ *, client: Client, response: httpx.Response
36
+ ) -> Optional[Union[HTTPValidationError, WorkflowDetail]]:
37
+ if response.status_code == HTTPStatus.OK:
38
+ response_200 = WorkflowDetail.from_dict(response.json())
39
+
40
+ return response_200
41
+ if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY:
42
+ response_422 = HTTPValidationError.from_dict(response.json())
43
+
44
+ return response_422
45
+ if client.raise_on_unexpected_status:
46
+ raise errors.UnexpectedStatus(response.status_code, response.content)
47
+ else:
48
+ return None
49
+
50
+
51
+ def _build_response(
52
+ *, client: Client, response: httpx.Response
53
+ ) -> Response[Union[HTTPValidationError, WorkflowDetail]]:
54
+ return Response(
55
+ status_code=HTTPStatus(response.status_code),
56
+ content=response.content,
57
+ headers=response.headers,
58
+ parsed=_parse_response(client=client, response=response),
59
+ )
60
+
61
+
62
+ def sync_detailed(
63
+ user_id: str,
64
+ workflow_name: str,
65
+ *,
66
+ client: Client,
67
+ ) -> Response[Union[HTTPValidationError, WorkflowDetail]]:
68
+ """Get Workflow
69
+
70
+ Args:
71
+ user_id (str):
72
+ workflow_name (str):
73
+
74
+ Raises:
75
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
76
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
77
+
78
+ Returns:
79
+ Response[Union[HTTPValidationError, WorkflowDetail]]
80
+ """
81
+
82
+ kwargs = _get_kwargs(
83
+ user_id=user_id,
84
+ workflow_name=workflow_name,
85
+ client=client,
86
+ )
87
+
88
+ response = httpx.request(
89
+ verify=client.verify_ssl,
90
+ **kwargs,
91
+ )
92
+
93
+ return _build_response(client=client, response=response)
94
+
95
+
96
+ def sync(
97
+ user_id: str,
98
+ workflow_name: str,
99
+ *,
100
+ client: Client,
101
+ ) -> Optional[Union[HTTPValidationError, WorkflowDetail]]:
102
+ """Get Workflow
103
+
104
+ Args:
105
+ user_id (str):
106
+ workflow_name (str):
107
+
108
+ Raises:
109
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
110
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
111
+
112
+ Returns:
113
+ Union[HTTPValidationError, WorkflowDetail]
114
+ """
115
+
116
+ return sync_detailed(
117
+ user_id=user_id,
118
+ workflow_name=workflow_name,
119
+ client=client,
120
+ ).parsed
121
+
122
+
123
+ async def asyncio_detailed(
124
+ user_id: str,
125
+ workflow_name: str,
126
+ *,
127
+ client: Client,
128
+ ) -> Response[Union[HTTPValidationError, WorkflowDetail]]:
129
+ """Get Workflow
130
+
131
+ Args:
132
+ user_id (str):
133
+ workflow_name (str):
134
+
135
+ Raises:
136
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
137
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
138
+
139
+ Returns:
140
+ Response[Union[HTTPValidationError, WorkflowDetail]]
141
+ """
142
+
143
+ kwargs = _get_kwargs(
144
+ user_id=user_id,
145
+ workflow_name=workflow_name,
146
+ client=client,
147
+ )
148
+
149
+ async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
150
+ response = await _client.request(**kwargs)
151
+
152
+ return _build_response(client=client, response=response)
153
+
154
+
155
+ async def asyncio(
156
+ user_id: str,
157
+ workflow_name: str,
158
+ *,
159
+ client: Client,
160
+ ) -> Optional[Union[HTTPValidationError, WorkflowDetail]]:
161
+ """Get Workflow
162
+
163
+ Args:
164
+ user_id (str):
165
+ workflow_name (str):
166
+
167
+ Raises:
168
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
169
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
170
+
171
+ Returns:
172
+ Union[HTTPValidationError, WorkflowDetail]
173
+ """
174
+
175
+ return (
176
+ await asyncio_detailed(
177
+ user_id=user_id,
178
+ workflow_name=workflow_name,
179
+ client=client,
180
+ )
181
+ ).parsed
@@ -0,0 +1,189 @@
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.page_workflow_item import PageWorkflowItem
10
+ from ...types import UNSET, Response, Unset
11
+
12
+
13
+ def _get_kwargs(
14
+ *,
15
+ client: Client,
16
+ page: Union[Unset, None, int] = 1,
17
+ size: Union[Unset, None, int] = 50,
18
+ ) -> Dict[str, Any]:
19
+ url = "{}/workflows/".format(client.base_url)
20
+
21
+ headers: Dict[str, str] = client.get_headers()
22
+ cookies: Dict[str, Any] = client.get_cookies()
23
+
24
+ params: Dict[str, Any] = {}
25
+ params["page"] = page
26
+
27
+ params["size"] = size
28
+
29
+ params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
30
+
31
+ return {
32
+ "method": "get",
33
+ "url": url,
34
+ "headers": headers,
35
+ "cookies": cookies,
36
+ "timeout": client.get_timeout(),
37
+ "follow_redirects": client.follow_redirects,
38
+ "params": params,
39
+ }
40
+
41
+
42
+ def _parse_response(
43
+ *, client: Client, response: httpx.Response
44
+ ) -> Optional[Union[HTTPValidationError, PageWorkflowItem]]:
45
+ if response.status_code == HTTPStatus.OK:
46
+ response_200 = PageWorkflowItem.from_dict(response.json())
47
+
48
+ return response_200
49
+ if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY:
50
+ response_422 = HTTPValidationError.from_dict(response.json())
51
+
52
+ return response_422
53
+ if client.raise_on_unexpected_status:
54
+ raise errors.UnexpectedStatus(response.status_code, response.content)
55
+ else:
56
+ return None
57
+
58
+
59
+ def _build_response(
60
+ *, client: Client, response: httpx.Response
61
+ ) -> Response[Union[HTTPValidationError, PageWorkflowItem]]:
62
+ return Response(
63
+ status_code=HTTPStatus(response.status_code),
64
+ content=response.content,
65
+ headers=response.headers,
66
+ parsed=_parse_response(client=client, response=response),
67
+ )
68
+
69
+
70
+ def sync_detailed(
71
+ *,
72
+ client: Client,
73
+ page: Union[Unset, None, int] = 1,
74
+ size: Union[Unset, None, int] = 50,
75
+ ) -> Response[Union[HTTPValidationError, PageWorkflowItem]]:
76
+ """Get Workflows
77
+
78
+ Args:
79
+ page (Union[Unset, None, int]): Default: 1.
80
+ size (Union[Unset, None, int]): Default: 50.
81
+
82
+ Raises:
83
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
84
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
85
+
86
+ Returns:
87
+ Response[Union[HTTPValidationError, PageWorkflowItem]]
88
+ """
89
+
90
+ kwargs = _get_kwargs(
91
+ client=client,
92
+ page=page,
93
+ size=size,
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
+ *,
106
+ client: Client,
107
+ page: Union[Unset, None, int] = 1,
108
+ size: Union[Unset, None, int] = 50,
109
+ ) -> Optional[Union[HTTPValidationError, PageWorkflowItem]]:
110
+ """Get Workflows
111
+
112
+ Args:
113
+ page (Union[Unset, None, int]): Default: 1.
114
+ size (Union[Unset, None, int]): Default: 50.
115
+
116
+ Raises:
117
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
118
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
119
+
120
+ Returns:
121
+ Union[HTTPValidationError, PageWorkflowItem]
122
+ """
123
+
124
+ return sync_detailed(
125
+ client=client,
126
+ page=page,
127
+ size=size,
128
+ ).parsed
129
+
130
+
131
+ async def asyncio_detailed(
132
+ *,
133
+ client: Client,
134
+ page: Union[Unset, None, int] = 1,
135
+ size: Union[Unset, None, int] = 50,
136
+ ) -> Response[Union[HTTPValidationError, PageWorkflowItem]]:
137
+ """Get Workflows
138
+
139
+ Args:
140
+ page (Union[Unset, None, int]): Default: 1.
141
+ size (Union[Unset, None, int]): Default: 50.
142
+
143
+ Raises:
144
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
145
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
146
+
147
+ Returns:
148
+ Response[Union[HTTPValidationError, PageWorkflowItem]]
149
+ """
150
+
151
+ kwargs = _get_kwargs(
152
+ client=client,
153
+ page=page,
154
+ size=size,
155
+ )
156
+
157
+ async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
158
+ response = await _client.request(**kwargs)
159
+
160
+ return _build_response(client=client, response=response)
161
+
162
+
163
+ async def asyncio(
164
+ *,
165
+ client: Client,
166
+ page: Union[Unset, None, int] = 1,
167
+ size: Union[Unset, None, int] = 50,
168
+ ) -> Optional[Union[HTTPValidationError, PageWorkflowItem]]:
169
+ """Get Workflows
170
+
171
+ Args:
172
+ page (Union[Unset, None, int]): Default: 1.
173
+ size (Union[Unset, None, int]): Default: 50.
174
+
175
+ Raises:
176
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
177
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
178
+
179
+ Returns:
180
+ Union[HTTPValidationError, PageWorkflowItem]
181
+ """
182
+
183
+ return (
184
+ await asyncio_detailed(
185
+ client=client,
186
+ page=page,
187
+ size=size,
188
+ )
189
+ ).parsed
@@ -3,17 +3,51 @@
3
3
  from .app_metadata_response_app_metadata import AppMetadataResponseAppMetadata
4
4
  from .body_upload_local_file import BodyUploadLocalFile
5
5
  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
+ )
6
12
  from .hash_check import HashCheck
7
13
  from .http_validation_error import HTTPValidationError
8
14
  from .lock_reason import LockReason
15
+ from .page_workflow_item import PageWorkflowItem
16
+ from .typed_workflow import TypedWorkflow
9
17
  from .validation_error import ValidationError
18
+ from .workflow_contents import WorkflowContents
19
+ from .workflow_contents_nodes import WorkflowContentsNodes
20
+ from .workflow_contents_output import WorkflowContentsOutput
21
+ from .workflow_detail import WorkflowDetail
22
+ from .workflow_detail_contents_type_0 import WorkflowDetailContentsType0
23
+ from .workflow_item import WorkflowItem
24
+ from .workflow_node import WorkflowNode
25
+ from .workflow_node_type import WorkflowNodeType
26
+ from .workflow_schema import WorkflowSchema
27
+ from .workflow_schema_input import WorkflowSchemaInput
28
+ from .workflow_schema_output import WorkflowSchemaOutput
10
29
 
11
30
  __all__ = (
12
31
  "AppMetadataResponseAppMetadata",
13
32
  "BodyUploadLocalFile",
14
33
  "CustomerDetails",
34
+ "ExecuteWorkflowWorkflowsUserIdWorkflowNamePostJsonBodyType0",
35
+ "ExecuteWorkflowWorkflowsUserIdWorkflowNamePostResponse200Type0",
15
36
  "HashCheck",
16
37
  "HTTPValidationError",
17
38
  "LockReason",
39
+ "PageWorkflowItem",
40
+ "TypedWorkflow",
18
41
  "ValidationError",
42
+ "WorkflowContents",
43
+ "WorkflowContentsNodes",
44
+ "WorkflowContentsOutput",
45
+ "WorkflowDetail",
46
+ "WorkflowDetailContentsType0",
47
+ "WorkflowItem",
48
+ "WorkflowNode",
49
+ "WorkflowNodeType",
50
+ "WorkflowSchema",
51
+ "WorkflowSchemaInput",
52
+ "WorkflowSchemaOutput",
19
53
  )
@@ -12,6 +12,7 @@ class AppMetadataResponseAppMetadata:
12
12
  additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
13
13
 
14
14
  def to_dict(self) -> Dict[str, Any]:
15
+
15
16
  field_dict: Dict[str, Any] = {}
16
17
  field_dict.update(self.additional_properties)
17
18
  field_dict.update({})
@@ -15,32 +15,33 @@ class CustomerDetails:
15
15
  user_id (str):
16
16
  soft_monthly_budget (Union[Unset, int]):
17
17
  hard_monthly_budget (Union[Unset, int]):
18
+ lock_reason (Union[Unset, None, LockReason]): An enumeration.
18
19
  current_balance (Union[Unset, int]):
19
20
  is_paying (Union[Unset, bool]):
20
21
  is_locked (Union[Unset, bool]):
21
- lock_reason (Union[Unset, None, LockReason]): An enumeration.
22
22
  """
23
23
 
24
24
  user_id: str
25
25
  soft_monthly_budget: Union[Unset, int] = UNSET
26
26
  hard_monthly_budget: Union[Unset, int] = UNSET
27
+ lock_reason: Union[Unset, None, LockReason] = UNSET
27
28
  current_balance: Union[Unset, int] = 0
28
29
  is_paying: Union[Unset, bool] = False
29
30
  is_locked: Union[Unset, bool] = False
30
- lock_reason: Union[Unset, None, LockReason] = UNSET
31
31
  additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
32
32
 
33
33
  def to_dict(self) -> Dict[str, Any]:
34
34
  user_id = self.user_id
35
35
  soft_monthly_budget = self.soft_monthly_budget
36
36
  hard_monthly_budget = self.hard_monthly_budget
37
- current_balance = self.current_balance
38
- is_paying = self.is_paying
39
- is_locked = self.is_locked
40
37
  lock_reason: Union[Unset, None, str] = UNSET
41
38
  if not isinstance(self.lock_reason, Unset):
42
39
  lock_reason = self.lock_reason.value if self.lock_reason else None
43
40
 
41
+ current_balance = self.current_balance
42
+ is_paying = self.is_paying
43
+ is_locked = self.is_locked
44
+
44
45
  field_dict: Dict[str, Any] = {}
45
46
  field_dict.update(self.additional_properties)
46
47
  field_dict.update(
@@ -52,14 +53,14 @@ class CustomerDetails:
52
53
  field_dict["soft_monthly_budget"] = soft_monthly_budget
53
54
  if hard_monthly_budget is not UNSET:
54
55
  field_dict["hard_monthly_budget"] = hard_monthly_budget
56
+ if lock_reason is not UNSET:
57
+ field_dict["lock_reason"] = lock_reason
55
58
  if current_balance is not UNSET:
56
59
  field_dict["current_balance"] = current_balance
57
60
  if is_paying is not UNSET:
58
61
  field_dict["is_paying"] = is_paying
59
62
  if is_locked is not UNSET:
60
63
  field_dict["is_locked"] = is_locked
61
- if lock_reason is not UNSET:
62
- field_dict["lock_reason"] = lock_reason
63
64
 
64
65
  return field_dict
65
66
 
@@ -72,12 +73,6 @@ class CustomerDetails:
72
73
 
73
74
  hard_monthly_budget = d.pop("hard_monthly_budget", UNSET)
74
75
 
75
- current_balance = d.pop("current_balance", UNSET)
76
-
77
- is_paying = d.pop("is_paying", UNSET)
78
-
79
- is_locked = d.pop("is_locked", UNSET)
80
-
81
76
  _lock_reason = d.pop("lock_reason", UNSET)
82
77
  lock_reason: Union[Unset, None, LockReason]
83
78
  if _lock_reason is None:
@@ -87,14 +82,20 @@ class CustomerDetails:
87
82
  else:
88
83
  lock_reason = LockReason(_lock_reason)
89
84
 
85
+ current_balance = d.pop("current_balance", UNSET)
86
+
87
+ is_paying = d.pop("is_paying", UNSET)
88
+
89
+ is_locked = d.pop("is_locked", UNSET)
90
+
90
91
  customer_details = cls(
91
92
  user_id=user_id,
92
93
  soft_monthly_budget=soft_monthly_budget,
93
94
  hard_monthly_budget=hard_monthly_budget,
95
+ lock_reason=lock_reason,
94
96
  current_balance=current_balance,
95
97
  is_paying=is_paying,
96
98
  is_locked=is_locked,
97
- lock_reason=lock_reason,
98
99
  )
99
100
 
100
101
  customer_details.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="ExecuteWorkflowWorkflowsUserIdWorkflowNamePostJsonBodyType0")
6
+
7
+
8
+ @attr.s(auto_attribs=True)
9
+ class ExecuteWorkflowWorkflowsUserIdWorkflowNamePostJsonBodyType0:
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
+ execute_workflow_workflows_user_id_workflow_name_post_json_body_type_0 = cls()
26
+
27
+ execute_workflow_workflows_user_id_workflow_name_post_json_body_type_0.additional_properties = d
28
+ return execute_workflow_workflows_user_id_workflow_name_post_json_body_type_0
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
@@ -0,0 +1,44 @@
1
+ from typing import Any, Dict, List, Type, TypeVar
2
+
3
+ import attr
4
+
5
+ T = TypeVar("T", bound="ExecuteWorkflowWorkflowsUserIdWorkflowNamePostResponse200Type0")
6
+
7
+
8
+ @attr.s(auto_attribs=True)
9
+ class ExecuteWorkflowWorkflowsUserIdWorkflowNamePostResponse200Type0:
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
+ execute_workflow_workflows_user_id_workflow_name_post_response_200_type_0 = cls()
26
+
27
+ execute_workflow_workflows_user_id_workflow_name_post_response_200_type_0.additional_properties = d
28
+ return execute_workflow_workflows_user_id_workflow_name_post_response_200_type_0
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