windmill-api 1.363.0__py3-none-any.whl → 1.364.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 windmill-api might be problematic. Click here for more details.

Files changed (25) hide show
  1. windmill_api/api/config/list_configs.py +131 -0
  2. windmill_api/api/group/export_instance_groups.py +131 -0
  3. windmill_api/api/group/overwrite_instance_groups.py +100 -0
  4. windmill_api/api/setting/list_global_settings.py +131 -0
  5. windmill_api/api/user/global_users_export.py +131 -0
  6. windmill_api/api/user/global_users_overwrite.py +100 -0
  7. windmill_api/models/config.py +81 -0
  8. windmill_api/models/config_config.py +44 -0
  9. windmill_api/models/export_instance_groups_response_200_item.py +103 -0
  10. windmill_api/models/exported_instance_group.py +103 -0
  11. windmill_api/models/exported_user.py +113 -0
  12. windmill_api/models/global_setting.py +71 -0
  13. windmill_api/models/global_setting_value.py +44 -0
  14. windmill_api/models/global_users_export_response_200_item.py +113 -0
  15. windmill_api/models/global_users_overwrite_json_body_item.py +113 -0
  16. windmill_api/models/list_configs_response_200_item.py +81 -0
  17. windmill_api/models/list_configs_response_200_item_config.py +44 -0
  18. windmill_api/models/list_global_settings_response_200_item.py +71 -0
  19. windmill_api/models/list_global_settings_response_200_item_value.py +44 -0
  20. windmill_api/models/overwrite_instance_groups_json_body_item.py +103 -0
  21. windmill_api/models/set_workspace_encryption_key_json_body.py +11 -1
  22. {windmill_api-1.363.0.dist-info → windmill_api-1.364.0.dist-info}/METADATA +1 -1
  23. {windmill_api-1.363.0.dist-info → windmill_api-1.364.0.dist-info}/RECORD +25 -5
  24. {windmill_api-1.363.0.dist-info → windmill_api-1.364.0.dist-info}/LICENSE +0 -0
  25. {windmill_api-1.363.0.dist-info → windmill_api-1.364.0.dist-info}/WHEEL +0 -0
@@ -0,0 +1,100 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Dict, List, Optional, Union
3
+
4
+ import httpx
5
+
6
+ from ... import errors
7
+ from ...client import AuthenticatedClient, Client
8
+ from ...models.global_users_overwrite_json_body_item import GlobalUsersOverwriteJsonBodyItem
9
+ from ...types import Response
10
+
11
+
12
+ def _get_kwargs(
13
+ *,
14
+ json_body: List["GlobalUsersOverwriteJsonBodyItem"],
15
+ ) -> Dict[str, Any]:
16
+ pass
17
+
18
+ json_json_body = []
19
+ for json_body_item_data in json_body:
20
+ json_body_item = json_body_item_data.to_dict()
21
+
22
+ json_json_body.append(json_body_item)
23
+
24
+ return {
25
+ "method": "post",
26
+ "url": "/users/overwrite",
27
+ "json": json_json_body,
28
+ }
29
+
30
+
31
+ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]:
32
+ if client.raise_on_unexpected_status:
33
+ raise errors.UnexpectedStatus(response.status_code, response.content)
34
+ else:
35
+ return None
36
+
37
+
38
+ def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]:
39
+ return Response(
40
+ status_code=HTTPStatus(response.status_code),
41
+ content=response.content,
42
+ headers=response.headers,
43
+ parsed=_parse_response(client=client, response=response),
44
+ )
45
+
46
+
47
+ def sync_detailed(
48
+ *,
49
+ client: Union[AuthenticatedClient, Client],
50
+ json_body: List["GlobalUsersOverwriteJsonBodyItem"],
51
+ ) -> Response[Any]:
52
+ """global overwrite users (require super admin and EE)
53
+
54
+ Args:
55
+ json_body (List['GlobalUsersOverwriteJsonBodyItem']):
56
+
57
+ Raises:
58
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
59
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
60
+
61
+ Returns:
62
+ Response[Any]
63
+ """
64
+
65
+ kwargs = _get_kwargs(
66
+ json_body=json_body,
67
+ )
68
+
69
+ response = client.get_httpx_client().request(
70
+ **kwargs,
71
+ )
72
+
73
+ return _build_response(client=client, response=response)
74
+
75
+
76
+ async def asyncio_detailed(
77
+ *,
78
+ client: Union[AuthenticatedClient, Client],
79
+ json_body: List["GlobalUsersOverwriteJsonBodyItem"],
80
+ ) -> Response[Any]:
81
+ """global overwrite users (require super admin and EE)
82
+
83
+ Args:
84
+ json_body (List['GlobalUsersOverwriteJsonBodyItem']):
85
+
86
+ Raises:
87
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
88
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
89
+
90
+ Returns:
91
+ Response[Any]
92
+ """
93
+
94
+ kwargs = _get_kwargs(
95
+ json_body=json_body,
96
+ )
97
+
98
+ response = await client.get_async_httpx_client().request(**kwargs)
99
+
100
+ return _build_response(client=client, response=response)
@@ -0,0 +1,81 @@
1
+ from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union
2
+
3
+ from attrs import define as _attrs_define
4
+ from attrs import field as _attrs_field
5
+
6
+ from ..types import UNSET, Unset
7
+
8
+ if TYPE_CHECKING:
9
+ from ..models.config_config import ConfigConfig
10
+
11
+
12
+ T = TypeVar("T", bound="Config")
13
+
14
+
15
+ @_attrs_define
16
+ class Config:
17
+ """
18
+ Attributes:
19
+ name (str):
20
+ config (Union[Unset, ConfigConfig]):
21
+ """
22
+
23
+ name: str
24
+ config: Union[Unset, "ConfigConfig"] = UNSET
25
+ additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
26
+
27
+ def to_dict(self) -> Dict[str, Any]:
28
+ name = self.name
29
+ config: Union[Unset, Dict[str, Any]] = UNSET
30
+ if not isinstance(self.config, Unset):
31
+ config = self.config.to_dict()
32
+
33
+ field_dict: Dict[str, Any] = {}
34
+ field_dict.update(self.additional_properties)
35
+ field_dict.update(
36
+ {
37
+ "name": name,
38
+ }
39
+ )
40
+ if config is not UNSET:
41
+ field_dict["config"] = config
42
+
43
+ return field_dict
44
+
45
+ @classmethod
46
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
47
+ from ..models.config_config import ConfigConfig
48
+
49
+ d = src_dict.copy()
50
+ name = d.pop("name")
51
+
52
+ _config = d.pop("config", UNSET)
53
+ config: Union[Unset, ConfigConfig]
54
+ if isinstance(_config, Unset):
55
+ config = UNSET
56
+ else:
57
+ config = ConfigConfig.from_dict(_config)
58
+
59
+ config = cls(
60
+ name=name,
61
+ config=config,
62
+ )
63
+
64
+ config.additional_properties = d
65
+ return config
66
+
67
+ @property
68
+ def additional_keys(self) -> List[str]:
69
+ return list(self.additional_properties.keys())
70
+
71
+ def __getitem__(self, key: str) -> Any:
72
+ return self.additional_properties[key]
73
+
74
+ def __setitem__(self, key: str, value: Any) -> None:
75
+ self.additional_properties[key] = value
76
+
77
+ def __delitem__(self, key: str) -> None:
78
+ del self.additional_properties[key]
79
+
80
+ def __contains__(self, key: str) -> bool:
81
+ return key in self.additional_properties
@@ -0,0 +1,44 @@
1
+ from typing import Any, Dict, List, Type, TypeVar
2
+
3
+ from attrs import define as _attrs_define
4
+ from attrs import field as _attrs_field
5
+
6
+ T = TypeVar("T", bound="ConfigConfig")
7
+
8
+
9
+ @_attrs_define
10
+ class ConfigConfig:
11
+ """ """
12
+
13
+ additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
14
+
15
+ def to_dict(self) -> Dict[str, Any]:
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
+ config_config = cls()
26
+
27
+ config_config.additional_properties = d
28
+ return config_config
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,103 @@
1
+ from typing import Any, Dict, List, Type, TypeVar, Union, cast
2
+
3
+ from attrs import define as _attrs_define
4
+ from attrs import field as _attrs_field
5
+
6
+ from ..types import UNSET, Unset
7
+
8
+ T = TypeVar("T", bound="ExportInstanceGroupsResponse200Item")
9
+
10
+
11
+ @_attrs_define
12
+ class ExportInstanceGroupsResponse200Item:
13
+ """
14
+ Attributes:
15
+ name (str):
16
+ summary (Union[Unset, str]):
17
+ emails (Union[Unset, List[str]]):
18
+ id (Union[Unset, str]):
19
+ scim_display_name (Union[Unset, str]):
20
+ external_id (Union[Unset, str]):
21
+ """
22
+
23
+ name: str
24
+ summary: Union[Unset, str] = UNSET
25
+ emails: Union[Unset, List[str]] = UNSET
26
+ id: Union[Unset, str] = UNSET
27
+ scim_display_name: Union[Unset, str] = UNSET
28
+ external_id: Union[Unset, str] = UNSET
29
+ additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
30
+
31
+ def to_dict(self) -> Dict[str, Any]:
32
+ name = self.name
33
+ summary = self.summary
34
+ emails: Union[Unset, List[str]] = UNSET
35
+ if not isinstance(self.emails, Unset):
36
+ emails = self.emails
37
+
38
+ id = self.id
39
+ scim_display_name = self.scim_display_name
40
+ external_id = self.external_id
41
+
42
+ field_dict: Dict[str, Any] = {}
43
+ field_dict.update(self.additional_properties)
44
+ field_dict.update(
45
+ {
46
+ "name": name,
47
+ }
48
+ )
49
+ if summary is not UNSET:
50
+ field_dict["summary"] = summary
51
+ if emails is not UNSET:
52
+ field_dict["emails"] = emails
53
+ if id is not UNSET:
54
+ field_dict["id"] = id
55
+ if scim_display_name is not UNSET:
56
+ field_dict["scim_display_name"] = scim_display_name
57
+ if external_id is not UNSET:
58
+ field_dict["external_id"] = external_id
59
+
60
+ return field_dict
61
+
62
+ @classmethod
63
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
64
+ d = src_dict.copy()
65
+ name = d.pop("name")
66
+
67
+ summary = d.pop("summary", UNSET)
68
+
69
+ emails = cast(List[str], d.pop("emails", UNSET))
70
+
71
+ id = d.pop("id", UNSET)
72
+
73
+ scim_display_name = d.pop("scim_display_name", UNSET)
74
+
75
+ external_id = d.pop("external_id", UNSET)
76
+
77
+ export_instance_groups_response_200_item = cls(
78
+ name=name,
79
+ summary=summary,
80
+ emails=emails,
81
+ id=id,
82
+ scim_display_name=scim_display_name,
83
+ external_id=external_id,
84
+ )
85
+
86
+ export_instance_groups_response_200_item.additional_properties = d
87
+ return export_instance_groups_response_200_item
88
+
89
+ @property
90
+ def additional_keys(self) -> List[str]:
91
+ return list(self.additional_properties.keys())
92
+
93
+ def __getitem__(self, key: str) -> Any:
94
+ return self.additional_properties[key]
95
+
96
+ def __setitem__(self, key: str, value: Any) -> None:
97
+ self.additional_properties[key] = value
98
+
99
+ def __delitem__(self, key: str) -> None:
100
+ del self.additional_properties[key]
101
+
102
+ def __contains__(self, key: str) -> bool:
103
+ return key in self.additional_properties
@@ -0,0 +1,103 @@
1
+ from typing import Any, Dict, List, Type, TypeVar, Union, cast
2
+
3
+ from attrs import define as _attrs_define
4
+ from attrs import field as _attrs_field
5
+
6
+ from ..types import UNSET, Unset
7
+
8
+ T = TypeVar("T", bound="ExportedInstanceGroup")
9
+
10
+
11
+ @_attrs_define
12
+ class ExportedInstanceGroup:
13
+ """
14
+ Attributes:
15
+ name (str):
16
+ summary (Union[Unset, str]):
17
+ emails (Union[Unset, List[str]]):
18
+ id (Union[Unset, str]):
19
+ scim_display_name (Union[Unset, str]):
20
+ external_id (Union[Unset, str]):
21
+ """
22
+
23
+ name: str
24
+ summary: Union[Unset, str] = UNSET
25
+ emails: Union[Unset, List[str]] = UNSET
26
+ id: Union[Unset, str] = UNSET
27
+ scim_display_name: Union[Unset, str] = UNSET
28
+ external_id: Union[Unset, str] = UNSET
29
+ additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
30
+
31
+ def to_dict(self) -> Dict[str, Any]:
32
+ name = self.name
33
+ summary = self.summary
34
+ emails: Union[Unset, List[str]] = UNSET
35
+ if not isinstance(self.emails, Unset):
36
+ emails = self.emails
37
+
38
+ id = self.id
39
+ scim_display_name = self.scim_display_name
40
+ external_id = self.external_id
41
+
42
+ field_dict: Dict[str, Any] = {}
43
+ field_dict.update(self.additional_properties)
44
+ field_dict.update(
45
+ {
46
+ "name": name,
47
+ }
48
+ )
49
+ if summary is not UNSET:
50
+ field_dict["summary"] = summary
51
+ if emails is not UNSET:
52
+ field_dict["emails"] = emails
53
+ if id is not UNSET:
54
+ field_dict["id"] = id
55
+ if scim_display_name is not UNSET:
56
+ field_dict["scim_display_name"] = scim_display_name
57
+ if external_id is not UNSET:
58
+ field_dict["external_id"] = external_id
59
+
60
+ return field_dict
61
+
62
+ @classmethod
63
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
64
+ d = src_dict.copy()
65
+ name = d.pop("name")
66
+
67
+ summary = d.pop("summary", UNSET)
68
+
69
+ emails = cast(List[str], d.pop("emails", UNSET))
70
+
71
+ id = d.pop("id", UNSET)
72
+
73
+ scim_display_name = d.pop("scim_display_name", UNSET)
74
+
75
+ external_id = d.pop("external_id", UNSET)
76
+
77
+ exported_instance_group = cls(
78
+ name=name,
79
+ summary=summary,
80
+ emails=emails,
81
+ id=id,
82
+ scim_display_name=scim_display_name,
83
+ external_id=external_id,
84
+ )
85
+
86
+ exported_instance_group.additional_properties = d
87
+ return exported_instance_group
88
+
89
+ @property
90
+ def additional_keys(self) -> List[str]:
91
+ return list(self.additional_properties.keys())
92
+
93
+ def __getitem__(self, key: str) -> Any:
94
+ return self.additional_properties[key]
95
+
96
+ def __setitem__(self, key: str, value: Any) -> None:
97
+ self.additional_properties[key] = value
98
+
99
+ def __delitem__(self, key: str) -> None:
100
+ del self.additional_properties[key]
101
+
102
+ def __contains__(self, key: str) -> bool:
103
+ return key in self.additional_properties
@@ -0,0 +1,113 @@
1
+ from typing import Any, Dict, List, Type, TypeVar, Union
2
+
3
+ from attrs import define as _attrs_define
4
+ from attrs import field as _attrs_field
5
+
6
+ from ..types import UNSET, Unset
7
+
8
+ T = TypeVar("T", bound="ExportedUser")
9
+
10
+
11
+ @_attrs_define
12
+ class ExportedUser:
13
+ """
14
+ Attributes:
15
+ email (str):
16
+ super_admin (bool):
17
+ verified (bool):
18
+ first_time_user (bool):
19
+ password_hash (Union[Unset, str]):
20
+ name (Union[Unset, str]):
21
+ company (Union[Unset, str]):
22
+ username (Union[Unset, str]):
23
+ """
24
+
25
+ email: str
26
+ super_admin: bool
27
+ verified: bool
28
+ first_time_user: bool
29
+ password_hash: Union[Unset, str] = UNSET
30
+ name: Union[Unset, str] = UNSET
31
+ company: Union[Unset, str] = UNSET
32
+ username: Union[Unset, str] = UNSET
33
+ additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
34
+
35
+ def to_dict(self) -> Dict[str, Any]:
36
+ email = self.email
37
+ super_admin = self.super_admin
38
+ verified = self.verified
39
+ first_time_user = self.first_time_user
40
+ password_hash = self.password_hash
41
+ name = self.name
42
+ company = self.company
43
+ username = self.username
44
+
45
+ field_dict: Dict[str, Any] = {}
46
+ field_dict.update(self.additional_properties)
47
+ field_dict.update(
48
+ {
49
+ "email": email,
50
+ "super_admin": super_admin,
51
+ "verified": verified,
52
+ "first_time_user": first_time_user,
53
+ }
54
+ )
55
+ if password_hash is not UNSET:
56
+ field_dict["password_hash"] = password_hash
57
+ if name is not UNSET:
58
+ field_dict["name"] = name
59
+ if company is not UNSET:
60
+ field_dict["company"] = company
61
+ if username is not UNSET:
62
+ field_dict["username"] = username
63
+
64
+ return field_dict
65
+
66
+ @classmethod
67
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
68
+ d = src_dict.copy()
69
+ email = d.pop("email")
70
+
71
+ super_admin = d.pop("super_admin")
72
+
73
+ verified = d.pop("verified")
74
+
75
+ first_time_user = d.pop("first_time_user")
76
+
77
+ password_hash = d.pop("password_hash", UNSET)
78
+
79
+ name = d.pop("name", UNSET)
80
+
81
+ company = d.pop("company", UNSET)
82
+
83
+ username = d.pop("username", UNSET)
84
+
85
+ exported_user = cls(
86
+ email=email,
87
+ super_admin=super_admin,
88
+ verified=verified,
89
+ first_time_user=first_time_user,
90
+ password_hash=password_hash,
91
+ name=name,
92
+ company=company,
93
+ username=username,
94
+ )
95
+
96
+ exported_user.additional_properties = d
97
+ return exported_user
98
+
99
+ @property
100
+ def additional_keys(self) -> List[str]:
101
+ return list(self.additional_properties.keys())
102
+
103
+ def __getitem__(self, key: str) -> Any:
104
+ return self.additional_properties[key]
105
+
106
+ def __setitem__(self, key: str, value: Any) -> None:
107
+ self.additional_properties[key] = value
108
+
109
+ def __delitem__(self, key: str) -> None:
110
+ del self.additional_properties[key]
111
+
112
+ def __contains__(self, key: str) -> bool:
113
+ return key in self.additional_properties
@@ -0,0 +1,71 @@
1
+ from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar
2
+
3
+ from attrs import define as _attrs_define
4
+ from attrs import field as _attrs_field
5
+
6
+ if TYPE_CHECKING:
7
+ from ..models.global_setting_value import GlobalSettingValue
8
+
9
+
10
+ T = TypeVar("T", bound="GlobalSetting")
11
+
12
+
13
+ @_attrs_define
14
+ class GlobalSetting:
15
+ """
16
+ Attributes:
17
+ name (str):
18
+ value (GlobalSettingValue):
19
+ """
20
+
21
+ name: str
22
+ value: "GlobalSettingValue"
23
+ additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
24
+
25
+ def to_dict(self) -> Dict[str, Any]:
26
+ name = self.name
27
+ value = self.value.to_dict()
28
+
29
+ field_dict: Dict[str, Any] = {}
30
+ field_dict.update(self.additional_properties)
31
+ field_dict.update(
32
+ {
33
+ "name": name,
34
+ "value": value,
35
+ }
36
+ )
37
+
38
+ return field_dict
39
+
40
+ @classmethod
41
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
42
+ from ..models.global_setting_value import GlobalSettingValue
43
+
44
+ d = src_dict.copy()
45
+ name = d.pop("name")
46
+
47
+ value = GlobalSettingValue.from_dict(d.pop("value"))
48
+
49
+ global_setting = cls(
50
+ name=name,
51
+ value=value,
52
+ )
53
+
54
+ global_setting.additional_properties = d
55
+ return global_setting
56
+
57
+ @property
58
+ def additional_keys(self) -> List[str]:
59
+ return list(self.additional_properties.keys())
60
+
61
+ def __getitem__(self, key: str) -> Any:
62
+ return self.additional_properties[key]
63
+
64
+ def __setitem__(self, key: str, value: Any) -> None:
65
+ self.additional_properties[key] = value
66
+
67
+ def __delitem__(self, key: str) -> None:
68
+ del self.additional_properties[key]
69
+
70
+ def __contains__(self, key: str) -> bool:
71
+ return key in self.additional_properties
@@ -0,0 +1,44 @@
1
+ from typing import Any, Dict, List, Type, TypeVar
2
+
3
+ from attrs import define as _attrs_define
4
+ from attrs import field as _attrs_field
5
+
6
+ T = TypeVar("T", bound="GlobalSettingValue")
7
+
8
+
9
+ @_attrs_define
10
+ class GlobalSettingValue:
11
+ """ """
12
+
13
+ additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
14
+
15
+ def to_dict(self) -> Dict[str, Any]:
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
+ global_setting_value = cls()
26
+
27
+ global_setting_value.additional_properties = d
28
+ return global_setting_value
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