blaxel 0.1.9rc37__py3-none-any.whl → 0.1.10rc38__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.
Files changed (49) hide show
  1. blaxel/authentication/__init__.py +11 -2
  2. blaxel/authentication/devicemode.py +1 -0
  3. blaxel/common/autoload.py +1 -0
  4. blaxel/common/internal.py +5 -5
  5. blaxel/sandbox/base.py +68 -0
  6. blaxel/sandbox/client/__init__.py +8 -0
  7. blaxel/sandbox/client/api/__init__.py +1 -0
  8. blaxel/sandbox/client/api/filesystem/__init__.py +0 -0
  9. blaxel/sandbox/client/api/filesystem/delete_filesystem_path.py +184 -0
  10. blaxel/sandbox/client/api/filesystem/get_filesystem_path.py +184 -0
  11. blaxel/sandbox/client/api/filesystem/put_filesystem_path.py +189 -0
  12. blaxel/sandbox/client/api/network/__init__.py +0 -0
  13. blaxel/sandbox/client/api/network/delete_network_process_pid_monitor.py +169 -0
  14. blaxel/sandbox/client/api/network/get_network_process_pid_ports.py +169 -0
  15. blaxel/sandbox/client/api/network/post_network_process_pid_monitor.py +195 -0
  16. blaxel/sandbox/client/api/process/__init__.py +0 -0
  17. blaxel/sandbox/client/api/process/delete_process_identifier.py +163 -0
  18. blaxel/sandbox/client/api/process/delete_process_identifier_kill.py +189 -0
  19. blaxel/sandbox/client/api/process/get_process.py +135 -0
  20. blaxel/sandbox/client/api/process/get_process_identifier.py +159 -0
  21. blaxel/sandbox/client/api/process/get_process_identifier_logs.py +167 -0
  22. blaxel/sandbox/client/api/process/post_process.py +176 -0
  23. blaxel/sandbox/client/client.py +162 -0
  24. blaxel/sandbox/client/errors.py +16 -0
  25. blaxel/sandbox/client/models/__init__.py +35 -0
  26. blaxel/sandbox/client/models/delete_network_process_pid_monitor_response_200.py +45 -0
  27. blaxel/sandbox/client/models/directory.py +110 -0
  28. blaxel/sandbox/client/models/error_response.py +60 -0
  29. blaxel/sandbox/client/models/file.py +105 -0
  30. blaxel/sandbox/client/models/file_request.py +78 -0
  31. blaxel/sandbox/client/models/file_with_content.py +114 -0
  32. blaxel/sandbox/client/models/get_network_process_pid_ports_response_200.py +45 -0
  33. blaxel/sandbox/client/models/get_process_identifier_logs_response_200.py +45 -0
  34. blaxel/sandbox/client/models/port_monitor_request.py +60 -0
  35. blaxel/sandbox/client/models/post_network_process_pid_monitor_response_200.py +45 -0
  36. blaxel/sandbox/client/models/process_kill_request.py +60 -0
  37. blaxel/sandbox/client/models/process_request.py +118 -0
  38. blaxel/sandbox/client/models/process_response.py +123 -0
  39. blaxel/sandbox/client/models/success_response.py +69 -0
  40. blaxel/sandbox/client/py.typed +1 -0
  41. blaxel/sandbox/client/types.py +46 -0
  42. blaxel/sandbox/filesystem.py +102 -0
  43. blaxel/sandbox/process.py +57 -0
  44. blaxel/sandbox/sandbox.py +92 -0
  45. blaxel/tools/__init__.py +1 -1
  46. {blaxel-0.1.9rc37.dist-info → blaxel-0.1.10rc38.dist-info}/METADATA +1 -1
  47. {blaxel-0.1.9rc37.dist-info → blaxel-0.1.10rc38.dist-info}/RECORD +49 -9
  48. {blaxel-0.1.9rc37.dist-info → blaxel-0.1.10rc38.dist-info}/WHEEL +0 -0
  49. {blaxel-0.1.9rc37.dist-info → blaxel-0.1.10rc38.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,35 @@
1
+ """Contains all the data models used in inputs/outputs"""
2
+
3
+ from .delete_network_process_pid_monitor_response_200 import (
4
+ DeleteNetworkProcessPidMonitorResponse200,
5
+ )
6
+ from .directory import Directory
7
+ from .error_response import ErrorResponse
8
+ from .file import File
9
+ from .file_request import FileRequest
10
+ from .file_with_content import FileWithContent
11
+ from .get_network_process_pid_ports_response_200 import GetNetworkProcessPidPortsResponse200
12
+ from .get_process_identifier_logs_response_200 import GetProcessIdentifierLogsResponse200
13
+ from .port_monitor_request import PortMonitorRequest
14
+ from .post_network_process_pid_monitor_response_200 import PostNetworkProcessPidMonitorResponse200
15
+ from .process_kill_request import ProcessKillRequest
16
+ from .process_request import ProcessRequest
17
+ from .process_response import ProcessResponse
18
+ from .success_response import SuccessResponse
19
+
20
+ __all__ = (
21
+ "DeleteNetworkProcessPidMonitorResponse200",
22
+ "Directory",
23
+ "ErrorResponse",
24
+ "File",
25
+ "FileRequest",
26
+ "FileWithContent",
27
+ "GetNetworkProcessPidPortsResponse200",
28
+ "GetProcessIdentifierLogsResponse200",
29
+ "PortMonitorRequest",
30
+ "PostNetworkProcessPidMonitorResponse200",
31
+ "ProcessKillRequest",
32
+ "ProcessRequest",
33
+ "ProcessResponse",
34
+ "SuccessResponse",
35
+ )
@@ -0,0 +1,45 @@
1
+ from typing import Any, TypeVar
2
+
3
+ from attrs import define as _attrs_define
4
+ from attrs import field as _attrs_field
5
+
6
+ T = TypeVar("T", bound="DeleteNetworkProcessPidMonitorResponse200")
7
+
8
+
9
+ @_attrs_define
10
+ class DeleteNetworkProcessPidMonitorResponse200:
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
+
19
+ return field_dict
20
+
21
+ @classmethod
22
+ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
23
+ if not src_dict:
24
+ return None
25
+ d = src_dict.copy()
26
+ delete_network_process_pid_monitor_response_200 = cls()
27
+
28
+ delete_network_process_pid_monitor_response_200.additional_properties = d
29
+ return delete_network_process_pid_monitor_response_200
30
+
31
+ @property
32
+ def additional_keys(self) -> list[str]:
33
+ return list(self.additional_properties.keys())
34
+
35
+ def __getitem__(self, key: str) -> Any:
36
+ return self.additional_properties[key]
37
+
38
+ def __setitem__(self, key: str, value: Any) -> None:
39
+ self.additional_properties[key] = value
40
+
41
+ def __delitem__(self, key: str) -> None:
42
+ del self.additional_properties[key]
43
+
44
+ def __contains__(self, key: str) -> bool:
45
+ return key in self.additional_properties
@@ -0,0 +1,110 @@
1
+ from typing import TYPE_CHECKING, Any, 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.file import File
10
+
11
+
12
+ T = TypeVar("T", bound="Directory")
13
+
14
+
15
+ @_attrs_define
16
+ class Directory:
17
+ """
18
+ Attributes:
19
+ files (Union[Unset, list['File']]):
20
+ path (Union[Unset, str]):
21
+ subdirectories (Union[Unset, list['Directory']]): @name Subdirectories
22
+ """
23
+
24
+ files: Union[Unset, list["File"]] = UNSET
25
+ path: Union[Unset, str] = UNSET
26
+ subdirectories: Union[Unset, list["Directory"]] = UNSET
27
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
28
+
29
+ def to_dict(self) -> dict[str, Any]:
30
+ files: Union[Unset, list[dict[str, Any]]] = UNSET
31
+ if not isinstance(self.files, Unset):
32
+ files = []
33
+ for files_item_data in self.files:
34
+ if type(files_item_data) == dict:
35
+ files_item = files_item_data
36
+ else:
37
+ files_item = files_item_data.to_dict()
38
+ files.append(files_item)
39
+
40
+ path = self.path
41
+
42
+ subdirectories: Union[Unset, list[dict[str, Any]]] = UNSET
43
+ if not isinstance(self.subdirectories, Unset):
44
+ subdirectories = []
45
+ for subdirectories_item_data in self.subdirectories:
46
+ if type(subdirectories_item_data) == dict:
47
+ subdirectories_item = subdirectories_item_data
48
+ else:
49
+ subdirectories_item = subdirectories_item_data.to_dict()
50
+ subdirectories.append(subdirectories_item)
51
+
52
+ field_dict: dict[str, Any] = {}
53
+ field_dict.update(self.additional_properties)
54
+ field_dict.update({})
55
+ if files is not UNSET:
56
+ field_dict["files"] = files
57
+ if path is not UNSET:
58
+ field_dict["path"] = path
59
+ if subdirectories is not UNSET:
60
+ field_dict["subdirectories"] = subdirectories
61
+
62
+ return field_dict
63
+
64
+ @classmethod
65
+ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
66
+ from ..models.file import File
67
+
68
+ if not src_dict:
69
+ return None
70
+ d = src_dict.copy()
71
+ files = []
72
+ _files = d.pop("files", UNSET)
73
+ for files_item_data in _files or []:
74
+ files_item = File.from_dict(files_item_data)
75
+
76
+ files.append(files_item)
77
+
78
+ path = d.pop("path", UNSET)
79
+
80
+ subdirectories = []
81
+ _subdirectories = d.pop("subdirectories", UNSET)
82
+ for subdirectories_item_data in _subdirectories or []:
83
+ subdirectories_item = Directory.from_dict(subdirectories_item_data)
84
+
85
+ subdirectories.append(subdirectories_item)
86
+
87
+ directory = cls(
88
+ files=files,
89
+ path=path,
90
+ subdirectories=subdirectories,
91
+ )
92
+
93
+ directory.additional_properties = d
94
+ return directory
95
+
96
+ @property
97
+ def additional_keys(self) -> list[str]:
98
+ return list(self.additional_properties.keys())
99
+
100
+ def __getitem__(self, key: str) -> Any:
101
+ return self.additional_properties[key]
102
+
103
+ def __setitem__(self, key: str, value: Any) -> None:
104
+ self.additional_properties[key] = value
105
+
106
+ def __delitem__(self, key: str) -> None:
107
+ del self.additional_properties[key]
108
+
109
+ def __contains__(self, key: str) -> bool:
110
+ return key in self.additional_properties
@@ -0,0 +1,60 @@
1
+ from typing import Any, 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="ErrorResponse")
9
+
10
+
11
+ @_attrs_define
12
+ class ErrorResponse:
13
+ """
14
+ Attributes:
15
+ error (Union[Unset, str]): Example: Error message.
16
+ """
17
+
18
+ error: Union[Unset, str] = UNSET
19
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
20
+
21
+ def to_dict(self) -> dict[str, Any]:
22
+ error = self.error
23
+
24
+ field_dict: dict[str, Any] = {}
25
+ field_dict.update(self.additional_properties)
26
+ field_dict.update({})
27
+ if error is not UNSET:
28
+ field_dict["error"] = error
29
+
30
+ return field_dict
31
+
32
+ @classmethod
33
+ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
34
+ if not src_dict:
35
+ return None
36
+ d = src_dict.copy()
37
+ error = d.pop("error", UNSET)
38
+
39
+ error_response = cls(
40
+ error=error,
41
+ )
42
+
43
+ error_response.additional_properties = d
44
+ return error_response
45
+
46
+ @property
47
+ def additional_keys(self) -> list[str]:
48
+ return list(self.additional_properties.keys())
49
+
50
+ def __getitem__(self, key: str) -> Any:
51
+ return self.additional_properties[key]
52
+
53
+ def __setitem__(self, key: str, value: Any) -> None:
54
+ self.additional_properties[key] = value
55
+
56
+ def __delitem__(self, key: str) -> None:
57
+ del self.additional_properties[key]
58
+
59
+ def __contains__(self, key: str) -> bool:
60
+ return key in self.additional_properties
@@ -0,0 +1,105 @@
1
+ from typing import Any, 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="File")
9
+
10
+
11
+ @_attrs_define
12
+ class File:
13
+ """
14
+ Attributes:
15
+ group (Union[Unset, str]):
16
+ last_modified (Union[Unset, str]):
17
+ owner (Union[Unset, str]):
18
+ path (Union[Unset, str]):
19
+ permissions (Union[Unset, str]): swagger:strfmt string
20
+ size (Union[Unset, int]):
21
+ """
22
+
23
+ group: Union[Unset, str] = UNSET
24
+ last_modified: Union[Unset, str] = UNSET
25
+ owner: Union[Unset, str] = UNSET
26
+ path: Union[Unset, str] = UNSET
27
+ permissions: Union[Unset, str] = UNSET
28
+ size: Union[Unset, int] = UNSET
29
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
30
+
31
+ def to_dict(self) -> dict[str, Any]:
32
+ group = self.group
33
+
34
+ last_modified = self.last_modified
35
+
36
+ owner = self.owner
37
+
38
+ path = self.path
39
+
40
+ permissions = self.permissions
41
+
42
+ size = self.size
43
+
44
+ field_dict: dict[str, Any] = {}
45
+ field_dict.update(self.additional_properties)
46
+ field_dict.update({})
47
+ if group is not UNSET:
48
+ field_dict["group"] = group
49
+ if last_modified is not UNSET:
50
+ field_dict["lastModified"] = last_modified
51
+ if owner is not UNSET:
52
+ field_dict["owner"] = owner
53
+ if path is not UNSET:
54
+ field_dict["path"] = path
55
+ if permissions is not UNSET:
56
+ field_dict["permissions"] = permissions
57
+ if size is not UNSET:
58
+ field_dict["size"] = size
59
+
60
+ return field_dict
61
+
62
+ @classmethod
63
+ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
64
+ if not src_dict:
65
+ return None
66
+ d = src_dict.copy()
67
+ group = d.pop("group", UNSET)
68
+
69
+ last_modified = d.pop("lastModified", UNSET)
70
+
71
+ owner = d.pop("owner", UNSET)
72
+
73
+ path = d.pop("path", UNSET)
74
+
75
+ permissions = d.pop("permissions", UNSET)
76
+
77
+ size = d.pop("size", UNSET)
78
+
79
+ file = cls(
80
+ group=group,
81
+ last_modified=last_modified,
82
+ owner=owner,
83
+ path=path,
84
+ permissions=permissions,
85
+ size=size,
86
+ )
87
+
88
+ file.additional_properties = d
89
+ return file
90
+
91
+ @property
92
+ def additional_keys(self) -> list[str]:
93
+ return list(self.additional_properties.keys())
94
+
95
+ def __getitem__(self, key: str) -> Any:
96
+ return self.additional_properties[key]
97
+
98
+ def __setitem__(self, key: str, value: Any) -> None:
99
+ self.additional_properties[key] = value
100
+
101
+ def __delitem__(self, key: str) -> None:
102
+ del self.additional_properties[key]
103
+
104
+ def __contains__(self, key: str) -> bool:
105
+ return key in self.additional_properties
@@ -0,0 +1,78 @@
1
+ from typing import Any, 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="FileRequest")
9
+
10
+
11
+ @_attrs_define
12
+ class FileRequest:
13
+ """
14
+ Attributes:
15
+ content (Union[Unset, str]): Example: file contents here.
16
+ is_directory (Union[Unset, bool]):
17
+ permissions (Union[Unset, str]): Example: 0644.
18
+ """
19
+
20
+ content: Union[Unset, str] = UNSET
21
+ is_directory: Union[Unset, bool] = UNSET
22
+ permissions: Union[Unset, str] = UNSET
23
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
24
+
25
+ def to_dict(self) -> dict[str, Any]:
26
+ content = self.content
27
+
28
+ is_directory = self.is_directory
29
+
30
+ permissions = self.permissions
31
+
32
+ field_dict: dict[str, Any] = {}
33
+ field_dict.update(self.additional_properties)
34
+ field_dict.update({})
35
+ if content is not UNSET:
36
+ field_dict["content"] = content
37
+ if is_directory is not UNSET:
38
+ field_dict["isDirectory"] = is_directory
39
+ if permissions is not UNSET:
40
+ field_dict["permissions"] = permissions
41
+
42
+ return field_dict
43
+
44
+ @classmethod
45
+ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
46
+ if not src_dict:
47
+ return None
48
+ d = src_dict.copy()
49
+ content = d.pop("content", UNSET)
50
+
51
+ is_directory = d.pop("isDirectory", UNSET)
52
+
53
+ permissions = d.pop("permissions", UNSET)
54
+
55
+ file_request = cls(
56
+ content=content,
57
+ is_directory=is_directory,
58
+ permissions=permissions,
59
+ )
60
+
61
+ file_request.additional_properties = d
62
+ return file_request
63
+
64
+ @property
65
+ def additional_keys(self) -> list[str]:
66
+ return list(self.additional_properties.keys())
67
+
68
+ def __getitem__(self, key: str) -> Any:
69
+ return self.additional_properties[key]
70
+
71
+ def __setitem__(self, key: str, value: Any) -> None:
72
+ self.additional_properties[key] = value
73
+
74
+ def __delitem__(self, key: str) -> None:
75
+ del self.additional_properties[key]
76
+
77
+ def __contains__(self, key: str) -> bool:
78
+ return key in self.additional_properties
@@ -0,0 +1,114 @@
1
+ from typing import Any, 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="FileWithContent")
9
+
10
+
11
+ @_attrs_define
12
+ class FileWithContent:
13
+ """
14
+ Attributes:
15
+ content (Union[Unset, str]):
16
+ group (Union[Unset, str]):
17
+ last_modified (Union[Unset, str]):
18
+ owner (Union[Unset, str]):
19
+ path (Union[Unset, str]):
20
+ permissions (Union[Unset, str]): swagger:strfmt string
21
+ size (Union[Unset, int]):
22
+ """
23
+
24
+ content: Union[Unset, str] = UNSET
25
+ group: Union[Unset, str] = UNSET
26
+ last_modified: Union[Unset, str] = UNSET
27
+ owner: Union[Unset, str] = UNSET
28
+ path: Union[Unset, str] = UNSET
29
+ permissions: Union[Unset, str] = UNSET
30
+ size: Union[Unset, int] = UNSET
31
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
32
+
33
+ def to_dict(self) -> dict[str, Any]:
34
+ content = self.content
35
+
36
+ group = self.group
37
+
38
+ last_modified = self.last_modified
39
+
40
+ owner = self.owner
41
+
42
+ path = self.path
43
+
44
+ permissions = self.permissions
45
+
46
+ size = self.size
47
+
48
+ field_dict: dict[str, Any] = {}
49
+ field_dict.update(self.additional_properties)
50
+ field_dict.update({})
51
+ if content is not UNSET:
52
+ field_dict["content"] = content
53
+ if group is not UNSET:
54
+ field_dict["group"] = group
55
+ if last_modified is not UNSET:
56
+ field_dict["lastModified"] = last_modified
57
+ if owner is not UNSET:
58
+ field_dict["owner"] = owner
59
+ if path is not UNSET:
60
+ field_dict["path"] = path
61
+ if permissions is not UNSET:
62
+ field_dict["permissions"] = permissions
63
+ if size is not UNSET:
64
+ field_dict["size"] = size
65
+
66
+ return field_dict
67
+
68
+ @classmethod
69
+ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
70
+ if not src_dict:
71
+ return None
72
+ d = src_dict.copy()
73
+ content = d.pop("content", UNSET)
74
+
75
+ group = d.pop("group", UNSET)
76
+
77
+ last_modified = d.pop("lastModified", UNSET)
78
+
79
+ owner = d.pop("owner", UNSET)
80
+
81
+ path = d.pop("path", UNSET)
82
+
83
+ permissions = d.pop("permissions", UNSET)
84
+
85
+ size = d.pop("size", UNSET)
86
+
87
+ file_with_content = cls(
88
+ content=content,
89
+ group=group,
90
+ last_modified=last_modified,
91
+ owner=owner,
92
+ path=path,
93
+ permissions=permissions,
94
+ size=size,
95
+ )
96
+
97
+ file_with_content.additional_properties = d
98
+ return file_with_content
99
+
100
+ @property
101
+ def additional_keys(self) -> list[str]:
102
+ return list(self.additional_properties.keys())
103
+
104
+ def __getitem__(self, key: str) -> Any:
105
+ return self.additional_properties[key]
106
+
107
+ def __setitem__(self, key: str, value: Any) -> None:
108
+ self.additional_properties[key] = value
109
+
110
+ def __delitem__(self, key: str) -> None:
111
+ del self.additional_properties[key]
112
+
113
+ def __contains__(self, key: str) -> bool:
114
+ return key in self.additional_properties
@@ -0,0 +1,45 @@
1
+ from typing import Any, TypeVar
2
+
3
+ from attrs import define as _attrs_define
4
+ from attrs import field as _attrs_field
5
+
6
+ T = TypeVar("T", bound="GetNetworkProcessPidPortsResponse200")
7
+
8
+
9
+ @_attrs_define
10
+ class GetNetworkProcessPidPortsResponse200:
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
+
19
+ return field_dict
20
+
21
+ @classmethod
22
+ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
23
+ if not src_dict:
24
+ return None
25
+ d = src_dict.copy()
26
+ get_network_process_pid_ports_response_200 = cls()
27
+
28
+ get_network_process_pid_ports_response_200.additional_properties = d
29
+ return get_network_process_pid_ports_response_200
30
+
31
+ @property
32
+ def additional_keys(self) -> list[str]:
33
+ return list(self.additional_properties.keys())
34
+
35
+ def __getitem__(self, key: str) -> Any:
36
+ return self.additional_properties[key]
37
+
38
+ def __setitem__(self, key: str, value: Any) -> None:
39
+ self.additional_properties[key] = value
40
+
41
+ def __delitem__(self, key: str) -> None:
42
+ del self.additional_properties[key]
43
+
44
+ def __contains__(self, key: str) -> bool:
45
+ return key in self.additional_properties
@@ -0,0 +1,45 @@
1
+ from typing import Any, TypeVar
2
+
3
+ from attrs import define as _attrs_define
4
+ from attrs import field as _attrs_field
5
+
6
+ T = TypeVar("T", bound="GetProcessIdentifierLogsResponse200")
7
+
8
+
9
+ @_attrs_define
10
+ class GetProcessIdentifierLogsResponse200:
11
+ """ """
12
+
13
+ additional_properties: dict[str, str] = _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
+
19
+ return field_dict
20
+
21
+ @classmethod
22
+ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
23
+ if not src_dict:
24
+ return None
25
+ d = src_dict.copy()
26
+ get_process_identifier_logs_response_200 = cls()
27
+
28
+ get_process_identifier_logs_response_200.additional_properties = d
29
+ return get_process_identifier_logs_response_200
30
+
31
+ @property
32
+ def additional_keys(self) -> list[str]:
33
+ return list(self.additional_properties.keys())
34
+
35
+ def __getitem__(self, key: str) -> str:
36
+ return self.additional_properties[key]
37
+
38
+ def __setitem__(self, key: str, value: str) -> None:
39
+ self.additional_properties[key] = value
40
+
41
+ def __delitem__(self, key: str) -> None:
42
+ del self.additional_properties[key]
43
+
44
+ def __contains__(self, key: str) -> bool:
45
+ return key in self.additional_properties
@@ -0,0 +1,60 @@
1
+ from typing import Any, 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="PortMonitorRequest")
9
+
10
+
11
+ @_attrs_define
12
+ class PortMonitorRequest:
13
+ """
14
+ Attributes:
15
+ callback (Union[Unset, str]): URL to call when a new port is detected Example: http://localhost:3000/callback.
16
+ """
17
+
18
+ callback: Union[Unset, str] = UNSET
19
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
20
+
21
+ def to_dict(self) -> dict[str, Any]:
22
+ callback = self.callback
23
+
24
+ field_dict: dict[str, Any] = {}
25
+ field_dict.update(self.additional_properties)
26
+ field_dict.update({})
27
+ if callback is not UNSET:
28
+ field_dict["callback"] = callback
29
+
30
+ return field_dict
31
+
32
+ @classmethod
33
+ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
34
+ if not src_dict:
35
+ return None
36
+ d = src_dict.copy()
37
+ callback = d.pop("callback", UNSET)
38
+
39
+ port_monitor_request = cls(
40
+ callback=callback,
41
+ )
42
+
43
+ port_monitor_request.additional_properties = d
44
+ return port_monitor_request
45
+
46
+ @property
47
+ def additional_keys(self) -> list[str]:
48
+ return list(self.additional_properties.keys())
49
+
50
+ def __getitem__(self, key: str) -> Any:
51
+ return self.additional_properties[key]
52
+
53
+ def __setitem__(self, key: str, value: Any) -> None:
54
+ self.additional_properties[key] = value
55
+
56
+ def __delitem__(self, key: str) -> None:
57
+ del self.additional_properties[key]
58
+
59
+ def __contains__(self, key: str) -> bool:
60
+ return key in self.additional_properties