archil-openapi 0.0.1__tar.gz
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.
- archil_openapi-0.0.1/LICENSE +21 -0
- archil_openapi-0.0.1/PKG-INFO +80 -0
- archil_openapi-0.0.1/README.md +37 -0
- archil_openapi-0.0.1/pyproject.toml +47 -0
- archil_openapi-0.0.1/src/archil_openapi/__init__.py +8 -0
- archil_openapi-0.0.1/src/archil_openapi/api/__init__.py +1 -0
- archil_openapi-0.0.1/src/archil_openapi/api/activity/__init__.py +1 -0
- archil_openapi-0.0.1/src/archil_openapi/api/activity/list_activity.py +268 -0
- archil_openapi-0.0.1/src/archil_openapi/api/api_tokens/__init__.py +1 -0
- archil_openapi-0.0.1/src/archil_openapi/api/api_tokens/create_api_token.py +188 -0
- archil_openapi-0.0.1/src/archil_openapi/api/api_tokens/delete_api_token.py +177 -0
- archil_openapi-0.0.1/src/archil_openapi/api/api_tokens/list_api_tokens.py +193 -0
- archil_openapi-0.0.1/src/archil_openapi/api/disk_configuration/__init__.py +1 -0
- archil_openapi-0.0.1/src/archil_openapi/api/disk_configuration/get_allowed_i_ps.py +177 -0
- archil_openapi-0.0.1/src/archil_openapi/api/disk_configuration/list_delegations.py +189 -0
- archil_openapi-0.0.1/src/archil_openapi/api/disk_configuration/revoke_delegation.py +208 -0
- archil_openapi-0.0.1/src/archil_openapi/api/disk_configuration/set_allowed_i_ps.py +208 -0
- archil_openapi-0.0.1/src/archil_openapi/api/disk_users/__init__.py +1 -0
- archil_openapi-0.0.1/src/archil_openapi/api/disk_users/add_disk_user.py +212 -0
- archil_openapi-0.0.1/src/archil_openapi/api/disk_users/remove_disk_user.py +228 -0
- archil_openapi-0.0.1/src/archil_openapi/api/disks/__init__.py +1 -0
- archil_openapi-0.0.1/src/archil_openapi/api/disks/create_disk.py +228 -0
- archil_openapi-0.0.1/src/archil_openapi/api/disks/delete_disk.py +182 -0
- archil_openapi-0.0.1/src/archil_openapi/api/disks/exec_.py +222 -0
- archil_openapi-0.0.1/src/archil_openapi/api/disks/exec_disk.py +217 -0
- archil_openapi-0.0.1/src/archil_openapi/api/disks/get_disk.py +182 -0
- archil_openapi-0.0.1/src/archil_openapi/api/disks/grep_disk.py +292 -0
- archil_openapi-0.0.1/src/archil_openapi/api/disks/list_disks.py +208 -0
- archil_openapi-0.0.1/src/archil_openapi/api/sandboxes/__init__.py +1 -0
- archil_openapi-0.0.1/src/archil_openapi/api/sandboxes/cancel_sandbox_exec.py +196 -0
- archil_openapi-0.0.1/src/archil_openapi/api/sandboxes/create_sandbox.py +225 -0
- archil_openapi-0.0.1/src/archil_openapi/api/sandboxes/exec_in_sandbox.py +251 -0
- archil_openapi-0.0.1/src/archil_openapi/api/sandboxes/get_sandbox.py +170 -0
- archil_openapi-0.0.1/src/archil_openapi/api/sandboxes/get_sandbox_exec.py +184 -0
- archil_openapi-0.0.1/src/archil_openapi/api/sandboxes/list_sandbox_execs.py +178 -0
- archil_openapi-0.0.1/src/archil_openapi/api/sandboxes/list_sandboxes.py +183 -0
- archil_openapi-0.0.1/src/archil_openapi/api/sandboxes/pause_sandbox.py +214 -0
- archil_openapi-0.0.1/src/archil_openapi/api/sandboxes/resume_sandbox.py +231 -0
- archil_openapi-0.0.1/src/archil_openapi/api/sandboxes/start_sandbox.py +235 -0
- archil_openapi-0.0.1/src/archil_openapi/api/sandboxes/stop_sandbox.py +210 -0
- archil_openapi-0.0.1/src/archil_openapi/client.py +268 -0
- archil_openapi-0.0.1/src/archil_openapi/errors.py +16 -0
- archil_openapi-0.0.1/src/archil_openapi/models/__init__.py +181 -0
- archil_openapi-0.0.1/src/archil_openapi/models/activity_event.py +119 -0
- archil_openapi-0.0.1/src/archil_openapi/models/activity_event_details.py +47 -0
- archil_openapi-0.0.1/src/archil_openapi/models/activity_event_level.py +10 -0
- archil_openapi-0.0.1/src/archil_openapi/models/api_response_activity_list.py +93 -0
- archil_openapi-0.0.1/src/archil_openapi/models/api_response_allowed_i_ps.py +73 -0
- archil_openapi-0.0.1/src/archil_openapi/models/api_response_allowed_i_ps_data.py +59 -0
- archil_openapi-0.0.1/src/archil_openapi/models/api_response_authorized_user.py +73 -0
- archil_openapi-0.0.1/src/archil_openapi/models/api_response_create_disk.py +73 -0
- archil_openapi-0.0.1/src/archil_openapi/models/api_response_create_disk_data.py +84 -0
- archil_openapi-0.0.1/src/archil_openapi/models/api_response_delegations.py +73 -0
- archil_openapi-0.0.1/src/archil_openapi/models/api_response_delegations_data.py +73 -0
- archil_openapi-0.0.1/src/archil_openapi/models/api_response_disk.py +73 -0
- archil_openapi-0.0.1/src/archil_openapi/models/api_response_disk_list.py +95 -0
- archil_openapi-0.0.1/src/archil_openapi/models/api_response_empty.py +59 -0
- archil_openapi-0.0.1/src/archil_openapi/models/api_response_exec.py +73 -0
- archil_openapi-0.0.1/src/archil_openapi/models/api_response_exec_disk.py +73 -0
- archil_openapi-0.0.1/src/archil_openapi/models/api_response_grep_disk.py +73 -0
- archil_openapi-0.0.1/src/archil_openapi/models/api_response_message.py +73 -0
- archil_openapi-0.0.1/src/archil_openapi/models/api_response_message_data.py +59 -0
- archil_openapi-0.0.1/src/archil_openapi/models/api_response_sandbox.py +73 -0
- archil_openapi-0.0.1/src/archil_openapi/models/api_response_sandbox_exec.py +73 -0
- archil_openapi-0.0.1/src/archil_openapi/models/api_response_sandbox_exec_list.py +73 -0
- archil_openapi-0.0.1/src/archil_openapi/models/api_response_sandbox_exec_list_data.py +75 -0
- archil_openapi-0.0.1/src/archil_openapi/models/api_response_sandbox_list.py +73 -0
- archil_openapi-0.0.1/src/archil_openapi/models/api_response_sandbox_list_data.py +75 -0
- archil_openapi-0.0.1/src/archil_openapi/models/api_response_token_created.py +73 -0
- archil_openapi-0.0.1/src/archil_openapi/models/api_response_token_created_data.py +129 -0
- archil_openapi-0.0.1/src/archil_openapi/models/api_response_token_list.py +73 -0
- archil_openapi-0.0.1/src/archil_openapi/models/api_response_token_list_data.py +75 -0
- archil_openapi-0.0.1/src/archil_openapi/models/api_token_response.py +120 -0
- archil_openapi-0.0.1/src/archil_openapi/models/authorized_user.py +201 -0
- archil_openapi-0.0.1/src/archil_openapi/models/authorized_user_status.py +10 -0
- archil_openapi-0.0.1/src/archil_openapi/models/authorized_user_type.py +9 -0
- archil_openapi-0.0.1/src/archil_openapi/models/aws_sts_user.py +118 -0
- archil_openapi-0.0.1/src/archil_openapi/models/aws_sts_user_type.py +8 -0
- archil_openapi-0.0.1/src/archil_openapi/models/azure_blob_storage.py +124 -0
- archil_openapi-0.0.1/src/archil_openapi/models/azure_blob_storage_type.py +8 -0
- archil_openapi-0.0.1/src/archil_openapi/models/cloudflare_r2.py +113 -0
- archil_openapi-0.0.1/src/archil_openapi/models/cloudflare_r2_type.py +8 -0
- archil_openapi-0.0.1/src/archil_openapi/models/connected_client.py +86 -0
- archil_openapi-0.0.1/src/archil_openapi/models/create_api_token_request.py +70 -0
- archil_openapi-0.0.1/src/archil_openapi/models/create_disk_request.py +214 -0
- archil_openapi-0.0.1/src/archil_openapi/models/create_sandbox_request.py +139 -0
- archil_openapi-0.0.1/src/archil_openapi/models/create_sandbox_request_env.py +44 -0
- archil_openapi-0.0.1/src/archil_openapi/models/delegation_entry.py +96 -0
- archil_openapi-0.0.1/src/archil_openapi/models/disk_metrics.py +77 -0
- archil_openapi-0.0.1/src/archil_openapi/models/disk_response.py +287 -0
- archil_openapi-0.0.1/src/archil_openapi/models/disk_response_capabilities_item.py +8 -0
- archil_openapi-0.0.1/src/archil_openapi/models/disk_response_status.py +12 -0
- archil_openapi-0.0.1/src/archil_openapi/models/error_response.py +78 -0
- archil_openapi-0.0.1/src/archil_openapi/models/exec_disk_request.py +59 -0
- archil_openapi-0.0.1/src/archil_openapi/models/exec_disk_result.py +89 -0
- archil_openapi-0.0.1/src/archil_openapi/models/exec_mount.py +124 -0
- archil_openapi-0.0.1/src/archil_openapi/models/exec_request.py +87 -0
- archil_openapi-0.0.1/src/archil_openapi/models/exec_request_disks.py +92 -0
- archil_openapi-0.0.1/src/archil_openapi/models/exec_timing.py +80 -0
- archil_openapi-0.0.1/src/archil_openapi/models/google_cloud_storage.py +105 -0
- archil_openapi-0.0.1/src/archil_openapi/models/google_cloud_storage_type.py +8 -0
- archil_openapi-0.0.1/src/archil_openapi/models/grep_disk_request.py +118 -0
- archil_openapi-0.0.1/src/archil_openapi/models/grep_disk_result.py +145 -0
- archil_openapi-0.0.1/src/archil_openapi/models/grep_match.py +75 -0
- archil_openapi-0.0.1/src/archil_openapi/models/grep_stopped_reason.py +12 -0
- archil_openapi-0.0.1/src/archil_openapi/models/list_activity_level_item.py +10 -0
- archil_openapi-0.0.1/src/archil_openapi/models/mount_config_response.py +96 -0
- archil_openapi-0.0.1/src/archil_openapi/models/mount_response.py +177 -0
- archil_openapi-0.0.1/src/archil_openapi/models/mount_response_access_mode.py +9 -0
- archil_openapi-0.0.1/src/archil_openapi/models/mount_response_authorization_type.py +10 -0
- archil_openapi-0.0.1/src/archil_openapi/models/mount_response_connection_status.py +9 -0
- archil_openapi-0.0.1/src/archil_openapi/models/mount_response_type.py +12 -0
- archil_openapi-0.0.1/src/archil_openapi/models/remove_disk_user_user_type.py +9 -0
- archil_openapi-0.0.1/src/archil_openapi/models/revoke_delegation_request.py +67 -0
- archil_openapi-0.0.1/src/archil_openapi/models/s3.py +116 -0
- archil_openapi-0.0.1/src/archil_openapi/models/s3_compatible.py +113 -0
- archil_openapi-0.0.1/src/archil_openapi/models/s3_compatible_type.py +8 -0
- archil_openapi-0.0.1/src/archil_openapi/models/s3_type.py +8 -0
- archil_openapi-0.0.1/src/archil_openapi/models/sandbox.py +228 -0
- archil_openapi-0.0.1/src/archil_openapi/models/sandbox_endpoint.py +67 -0
- archil_openapi-0.0.1/src/archil_openapi/models/sandbox_exec.py +158 -0
- archil_openapi-0.0.1/src/archil_openapi/models/sandbox_exec_request.py +101 -0
- archil_openapi-0.0.1/src/archil_openapi/models/sandbox_exec_request_env.py +44 -0
- archil_openapi-0.0.1/src/archil_openapi/models/sandbox_exec_state.py +12 -0
- archil_openapi-0.0.1/src/archil_openapi/models/sandbox_platform.py +9 -0
- archil_openapi-0.0.1/src/archil_openapi/models/sandbox_port_mapping.py +69 -0
- archil_openapi-0.0.1/src/archil_openapi/models/sandbox_port_mapping_protocol.py +9 -0
- archil_openapi-0.0.1/src/archil_openapi/models/sandbox_state.py +15 -0
- archil_openapi-0.0.1/src/archil_openapi/models/set_allowed_i_ps_body.py +60 -0
- archil_openapi-0.0.1/src/archil_openapi/models/token_user.py +141 -0
- archil_openapi-0.0.1/src/archil_openapi/models/token_user_type.py +8 -0
- archil_openapi-0.0.1/src/archil_openapi/py.typed +0 -0
- archil_openapi-0.0.1/src/archil_openapi/types.py +54 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Archil, Inc.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: archil-openapi
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: Generated low-level Python client for the Archil control plane API
|
|
5
|
+
Keywords: archil,openapi
|
|
6
|
+
Author: Archil, Inc.
|
|
7
|
+
Author-email: Archil, Inc. <support@archil.com>
|
|
8
|
+
License: MIT License
|
|
9
|
+
|
|
10
|
+
Copyright (c) 2026 Archil, Inc.
|
|
11
|
+
|
|
12
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
13
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
14
|
+
in the Software without restriction, including without limitation the rights
|
|
15
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
16
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
17
|
+
furnished to do so, subject to the following conditions:
|
|
18
|
+
|
|
19
|
+
The above copyright notice and this permission notice shall be included in all
|
|
20
|
+
copies or substantial portions of the Software.
|
|
21
|
+
|
|
22
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
23
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
24
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
25
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
26
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
27
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
28
|
+
SOFTWARE.
|
|
29
|
+
Classifier: Programming Language :: Python :: 3
|
|
30
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
31
|
+
Classifier: Operating System :: OS Independent
|
|
32
|
+
Classifier: Typing :: Typed
|
|
33
|
+
Requires-Dist: attrs>=22.2.0
|
|
34
|
+
Requires-Dist: httpx>=0.23.0,<0.29.0
|
|
35
|
+
Requires-Dist: python-dateutil>=2.8.0,<3
|
|
36
|
+
Requires-Dist: pytest>=8 ; extra == 'dev'
|
|
37
|
+
Requires-Dist: ruff>=0.14 ; extra == 'dev'
|
|
38
|
+
Requires-Python: >=3.10
|
|
39
|
+
Project-URL: Documentation, https://docs.archil.com
|
|
40
|
+
Project-URL: Homepage, https://archil.com
|
|
41
|
+
Provides-Extra: dev
|
|
42
|
+
Description-Content-Type: text/markdown
|
|
43
|
+
|
|
44
|
+
# archil-openapi
|
|
45
|
+
|
|
46
|
+
Generated low-level Python client for the Archil control plane API.
|
|
47
|
+
|
|
48
|
+
```sh
|
|
49
|
+
pip install archil-openapi
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
```python
|
|
53
|
+
from archil_openapi import AuthenticatedClient
|
|
54
|
+
from archil_openapi.api.disks import get_disk
|
|
55
|
+
|
|
56
|
+
client = AuthenticatedClient(
|
|
57
|
+
base_url="https://api.archil.com",
|
|
58
|
+
token="key-...",
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
disk = get_disk.sync(id="dsk-...", client=client)
|
|
62
|
+
|
|
63
|
+
async def fetch_disk():
|
|
64
|
+
return await get_disk.asyncio(id="dsk-...", client=client)
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
The package is generated from `api/controlplane/openapi.yaml` in this repository.
|
|
68
|
+
Use the high-level [`archil`](https://pypi.org/project/archil/) package for the
|
|
69
|
+
recommended disk, object, workspace, and agent-tool APIs.
|
|
70
|
+
|
|
71
|
+
## Publishing
|
|
72
|
+
|
|
73
|
+
Changes to the canonical OpenAPI schema generate and test this package on every
|
|
74
|
+
pull request. After merge, `openapi-release.yml` compares the generated
|
|
75
|
+
client with the latest PyPI wheel and publishes the next patch version only
|
|
76
|
+
when the generated client changed.
|
|
77
|
+
|
|
78
|
+
PyPI trusted publishing for `archil-openapi` must use repository
|
|
79
|
+
`archil-data/archil`, workflow `openapi-release.yml`, and environment
|
|
80
|
+
`pypi`.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# archil-openapi
|
|
2
|
+
|
|
3
|
+
Generated low-level Python client for the Archil control plane API.
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
pip install archil-openapi
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
```python
|
|
10
|
+
from archil_openapi import AuthenticatedClient
|
|
11
|
+
from archil_openapi.api.disks import get_disk
|
|
12
|
+
|
|
13
|
+
client = AuthenticatedClient(
|
|
14
|
+
base_url="https://api.archil.com",
|
|
15
|
+
token="key-...",
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
disk = get_disk.sync(id="dsk-...", client=client)
|
|
19
|
+
|
|
20
|
+
async def fetch_disk():
|
|
21
|
+
return await get_disk.asyncio(id="dsk-...", client=client)
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
The package is generated from `api/controlplane/openapi.yaml` in this repository.
|
|
25
|
+
Use the high-level [`archil`](https://pypi.org/project/archil/) package for the
|
|
26
|
+
recommended disk, object, workspace, and agent-tool APIs.
|
|
27
|
+
|
|
28
|
+
## Publishing
|
|
29
|
+
|
|
30
|
+
Changes to the canonical OpenAPI schema generate and test this package on every
|
|
31
|
+
pull request. After merge, `openapi-release.yml` compares the generated
|
|
32
|
+
client with the latest PyPI wheel and publishes the next patch version only
|
|
33
|
+
when the generated client changed.
|
|
34
|
+
|
|
35
|
+
PyPI trusted publishing for `archil-openapi` must use repository
|
|
36
|
+
`archil-data/archil`, workflow `openapi-release.yml`, and environment
|
|
37
|
+
`pypi`.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "archil-openapi"
|
|
3
|
+
version = "0.0.1"
|
|
4
|
+
description = "Generated low-level Python client for the Archil control plane API"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
license = { file = "LICENSE" }
|
|
7
|
+
requires-python = ">=3.10"
|
|
8
|
+
keywords = ["archil", "openapi"]
|
|
9
|
+
authors = [{ name = "Archil, Inc.", email = "support@archil.com" }]
|
|
10
|
+
classifiers = [
|
|
11
|
+
"Programming Language :: Python :: 3",
|
|
12
|
+
"License :: OSI Approved :: MIT License",
|
|
13
|
+
"Operating System :: OS Independent",
|
|
14
|
+
"Typing :: Typed",
|
|
15
|
+
]
|
|
16
|
+
dependencies = [
|
|
17
|
+
"attrs>=22.2.0",
|
|
18
|
+
"httpx>=0.23.0,<0.29.0",
|
|
19
|
+
"python-dateutil>=2.8.0,<3",
|
|
20
|
+
]
|
|
21
|
+
|
|
22
|
+
[project.urls]
|
|
23
|
+
Homepage = "https://archil.com"
|
|
24
|
+
Documentation = "https://docs.archil.com"
|
|
25
|
+
|
|
26
|
+
[project.optional-dependencies]
|
|
27
|
+
dev = [
|
|
28
|
+
"pytest>=8",
|
|
29
|
+
"ruff>=0.14",
|
|
30
|
+
]
|
|
31
|
+
|
|
32
|
+
[tool.uv.build-backend]
|
|
33
|
+
module-name = "archil_openapi"
|
|
34
|
+
module-root = "src"
|
|
35
|
+
|
|
36
|
+
[build-system]
|
|
37
|
+
requires = ["uv_build>=0.8.0,<0.9.0"]
|
|
38
|
+
build-backend = "uv_build"
|
|
39
|
+
|
|
40
|
+
[tool.pytest.ini_options]
|
|
41
|
+
testpaths = ["tests"]
|
|
42
|
+
|
|
43
|
+
[tool.ruff]
|
|
44
|
+
line-length = 120
|
|
45
|
+
|
|
46
|
+
[tool.ruff.lint]
|
|
47
|
+
select = ["E4", "E7", "E9", "F"]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Contains methods for accessing the API"""
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Contains endpoint functions for accessing the API"""
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any, Optional, Union
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ... import errors
|
|
7
|
+
from ...client import AuthenticatedClient, Client
|
|
8
|
+
from ...models.api_response_activity_list import ApiResponseActivityList
|
|
9
|
+
from ...models.error_response import ErrorResponse
|
|
10
|
+
from ...models.list_activity_level_item import ListActivityLevelItem
|
|
11
|
+
from ...types import UNSET, Response, Unset
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _get_kwargs(
|
|
15
|
+
*,
|
|
16
|
+
limit: Union[Unset, int] = UNSET,
|
|
17
|
+
cursor: Union[Unset, str] = UNSET,
|
|
18
|
+
disk_id: Union[Unset, str] = UNSET,
|
|
19
|
+
event_type: Union[Unset, list[str]] = UNSET,
|
|
20
|
+
level: Union[Unset, list[ListActivityLevelItem]] = UNSET,
|
|
21
|
+
) -> dict[str, Any]:
|
|
22
|
+
params: dict[str, Any] = {}
|
|
23
|
+
|
|
24
|
+
params["limit"] = limit
|
|
25
|
+
|
|
26
|
+
params["cursor"] = cursor
|
|
27
|
+
|
|
28
|
+
params["diskId"] = disk_id
|
|
29
|
+
|
|
30
|
+
json_event_type: Union[Unset, list[str]] = UNSET
|
|
31
|
+
if not isinstance(event_type, Unset):
|
|
32
|
+
json_event_type = event_type
|
|
33
|
+
|
|
34
|
+
params["eventType"] = json_event_type
|
|
35
|
+
|
|
36
|
+
json_level: Union[Unset, list[str]] = UNSET
|
|
37
|
+
if not isinstance(level, Unset):
|
|
38
|
+
json_level = []
|
|
39
|
+
for level_item_data in level:
|
|
40
|
+
level_item = level_item_data.value
|
|
41
|
+
json_level.append(level_item)
|
|
42
|
+
|
|
43
|
+
params["level"] = json_level
|
|
44
|
+
|
|
45
|
+
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
46
|
+
|
|
47
|
+
_kwargs: dict[str, Any] = {
|
|
48
|
+
"method": "get",
|
|
49
|
+
"url": "/api/activity",
|
|
50
|
+
"params": params,
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return _kwargs
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
def _parse_response(
|
|
57
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
58
|
+
) -> Optional[Union[ApiResponseActivityList, ErrorResponse]]:
|
|
59
|
+
if response.status_code == 200:
|
|
60
|
+
response_200 = ApiResponseActivityList.from_dict(response.json())
|
|
61
|
+
|
|
62
|
+
return response_200
|
|
63
|
+
|
|
64
|
+
if response.status_code == 400:
|
|
65
|
+
response_400 = ErrorResponse.from_dict(response.json())
|
|
66
|
+
|
|
67
|
+
return response_400
|
|
68
|
+
|
|
69
|
+
if response.status_code == 401:
|
|
70
|
+
response_401 = ErrorResponse.from_dict(response.json())
|
|
71
|
+
|
|
72
|
+
return response_401
|
|
73
|
+
|
|
74
|
+
if response.status_code == 404:
|
|
75
|
+
response_404 = ErrorResponse.from_dict(response.json())
|
|
76
|
+
|
|
77
|
+
return response_404
|
|
78
|
+
|
|
79
|
+
if response.status_code == 500:
|
|
80
|
+
response_500 = ErrorResponse.from_dict(response.json())
|
|
81
|
+
|
|
82
|
+
return response_500
|
|
83
|
+
|
|
84
|
+
if client.raise_on_unexpected_status:
|
|
85
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
86
|
+
else:
|
|
87
|
+
return None
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
def _build_response(
|
|
91
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
92
|
+
) -> Response[Union[ApiResponseActivityList, ErrorResponse]]:
|
|
93
|
+
return Response(
|
|
94
|
+
status_code=HTTPStatus(response.status_code),
|
|
95
|
+
content=response.content,
|
|
96
|
+
headers=response.headers,
|
|
97
|
+
parsed=_parse_response(client=client, response=response),
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
def sync_detailed(
|
|
102
|
+
*,
|
|
103
|
+
client: Union[AuthenticatedClient, Client],
|
|
104
|
+
limit: Union[Unset, int] = UNSET,
|
|
105
|
+
cursor: Union[Unset, str] = UNSET,
|
|
106
|
+
disk_id: Union[Unset, str] = UNSET,
|
|
107
|
+
event_type: Union[Unset, list[str]] = UNSET,
|
|
108
|
+
level: Union[Unset, list[ListActivityLevelItem]] = UNSET,
|
|
109
|
+
) -> Response[Union[ApiResponseActivityList, ErrorResponse]]:
|
|
110
|
+
"""List activity events
|
|
111
|
+
|
|
112
|
+
Returns the authenticated account's activity events (disk lifecycle and exec events), newest first.
|
|
113
|
+
Omitting `limit` returns up to 50 events; pass the response's `nextCursor` back as `cursor` to fetch
|
|
114
|
+
the next page.
|
|
115
|
+
|
|
116
|
+
Args:
|
|
117
|
+
limit (Union[Unset, int]):
|
|
118
|
+
cursor (Union[Unset, str]):
|
|
119
|
+
disk_id (Union[Unset, str]): Example: dsk-0123456789abcdef.
|
|
120
|
+
event_type (Union[Unset, list[str]]):
|
|
121
|
+
level (Union[Unset, list[ListActivityLevelItem]]):
|
|
122
|
+
|
|
123
|
+
Raises:
|
|
124
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
125
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
126
|
+
|
|
127
|
+
Returns:
|
|
128
|
+
Response[Union[ApiResponseActivityList, ErrorResponse]]
|
|
129
|
+
"""
|
|
130
|
+
|
|
131
|
+
kwargs = _get_kwargs(
|
|
132
|
+
limit=limit,
|
|
133
|
+
cursor=cursor,
|
|
134
|
+
disk_id=disk_id,
|
|
135
|
+
event_type=event_type,
|
|
136
|
+
level=level,
|
|
137
|
+
)
|
|
138
|
+
|
|
139
|
+
response = client.get_httpx_client().request(
|
|
140
|
+
**kwargs,
|
|
141
|
+
)
|
|
142
|
+
|
|
143
|
+
return _build_response(client=client, response=response)
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
def sync(
|
|
147
|
+
*,
|
|
148
|
+
client: Union[AuthenticatedClient, Client],
|
|
149
|
+
limit: Union[Unset, int] = UNSET,
|
|
150
|
+
cursor: Union[Unset, str] = UNSET,
|
|
151
|
+
disk_id: Union[Unset, str] = UNSET,
|
|
152
|
+
event_type: Union[Unset, list[str]] = UNSET,
|
|
153
|
+
level: Union[Unset, list[ListActivityLevelItem]] = UNSET,
|
|
154
|
+
) -> Optional[Union[ApiResponseActivityList, ErrorResponse]]:
|
|
155
|
+
"""List activity events
|
|
156
|
+
|
|
157
|
+
Returns the authenticated account's activity events (disk lifecycle and exec events), newest first.
|
|
158
|
+
Omitting `limit` returns up to 50 events; pass the response's `nextCursor` back as `cursor` to fetch
|
|
159
|
+
the next page.
|
|
160
|
+
|
|
161
|
+
Args:
|
|
162
|
+
limit (Union[Unset, int]):
|
|
163
|
+
cursor (Union[Unset, str]):
|
|
164
|
+
disk_id (Union[Unset, str]): Example: dsk-0123456789abcdef.
|
|
165
|
+
event_type (Union[Unset, list[str]]):
|
|
166
|
+
level (Union[Unset, list[ListActivityLevelItem]]):
|
|
167
|
+
|
|
168
|
+
Raises:
|
|
169
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
170
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
171
|
+
|
|
172
|
+
Returns:
|
|
173
|
+
Union[ApiResponseActivityList, ErrorResponse]
|
|
174
|
+
"""
|
|
175
|
+
|
|
176
|
+
return sync_detailed(
|
|
177
|
+
client=client,
|
|
178
|
+
limit=limit,
|
|
179
|
+
cursor=cursor,
|
|
180
|
+
disk_id=disk_id,
|
|
181
|
+
event_type=event_type,
|
|
182
|
+
level=level,
|
|
183
|
+
).parsed
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
async def asyncio_detailed(
|
|
187
|
+
*,
|
|
188
|
+
client: Union[AuthenticatedClient, Client],
|
|
189
|
+
limit: Union[Unset, int] = UNSET,
|
|
190
|
+
cursor: Union[Unset, str] = UNSET,
|
|
191
|
+
disk_id: Union[Unset, str] = UNSET,
|
|
192
|
+
event_type: Union[Unset, list[str]] = UNSET,
|
|
193
|
+
level: Union[Unset, list[ListActivityLevelItem]] = UNSET,
|
|
194
|
+
) -> Response[Union[ApiResponseActivityList, ErrorResponse]]:
|
|
195
|
+
"""List activity events
|
|
196
|
+
|
|
197
|
+
Returns the authenticated account's activity events (disk lifecycle and exec events), newest first.
|
|
198
|
+
Omitting `limit` returns up to 50 events; pass the response's `nextCursor` back as `cursor` to fetch
|
|
199
|
+
the next page.
|
|
200
|
+
|
|
201
|
+
Args:
|
|
202
|
+
limit (Union[Unset, int]):
|
|
203
|
+
cursor (Union[Unset, str]):
|
|
204
|
+
disk_id (Union[Unset, str]): Example: dsk-0123456789abcdef.
|
|
205
|
+
event_type (Union[Unset, list[str]]):
|
|
206
|
+
level (Union[Unset, list[ListActivityLevelItem]]):
|
|
207
|
+
|
|
208
|
+
Raises:
|
|
209
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
210
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
211
|
+
|
|
212
|
+
Returns:
|
|
213
|
+
Response[Union[ApiResponseActivityList, ErrorResponse]]
|
|
214
|
+
"""
|
|
215
|
+
|
|
216
|
+
kwargs = _get_kwargs(
|
|
217
|
+
limit=limit,
|
|
218
|
+
cursor=cursor,
|
|
219
|
+
disk_id=disk_id,
|
|
220
|
+
event_type=event_type,
|
|
221
|
+
level=level,
|
|
222
|
+
)
|
|
223
|
+
|
|
224
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
225
|
+
|
|
226
|
+
return _build_response(client=client, response=response)
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
async def asyncio(
|
|
230
|
+
*,
|
|
231
|
+
client: Union[AuthenticatedClient, Client],
|
|
232
|
+
limit: Union[Unset, int] = UNSET,
|
|
233
|
+
cursor: Union[Unset, str] = UNSET,
|
|
234
|
+
disk_id: Union[Unset, str] = UNSET,
|
|
235
|
+
event_type: Union[Unset, list[str]] = UNSET,
|
|
236
|
+
level: Union[Unset, list[ListActivityLevelItem]] = UNSET,
|
|
237
|
+
) -> Optional[Union[ApiResponseActivityList, ErrorResponse]]:
|
|
238
|
+
"""List activity events
|
|
239
|
+
|
|
240
|
+
Returns the authenticated account's activity events (disk lifecycle and exec events), newest first.
|
|
241
|
+
Omitting `limit` returns up to 50 events; pass the response's `nextCursor` back as `cursor` to fetch
|
|
242
|
+
the next page.
|
|
243
|
+
|
|
244
|
+
Args:
|
|
245
|
+
limit (Union[Unset, int]):
|
|
246
|
+
cursor (Union[Unset, str]):
|
|
247
|
+
disk_id (Union[Unset, str]): Example: dsk-0123456789abcdef.
|
|
248
|
+
event_type (Union[Unset, list[str]]):
|
|
249
|
+
level (Union[Unset, list[ListActivityLevelItem]]):
|
|
250
|
+
|
|
251
|
+
Raises:
|
|
252
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
253
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
254
|
+
|
|
255
|
+
Returns:
|
|
256
|
+
Union[ApiResponseActivityList, ErrorResponse]
|
|
257
|
+
"""
|
|
258
|
+
|
|
259
|
+
return (
|
|
260
|
+
await asyncio_detailed(
|
|
261
|
+
client=client,
|
|
262
|
+
limit=limit,
|
|
263
|
+
cursor=cursor,
|
|
264
|
+
disk_id=disk_id,
|
|
265
|
+
event_type=event_type,
|
|
266
|
+
level=level,
|
|
267
|
+
)
|
|
268
|
+
).parsed
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Contains endpoint functions for accessing the API"""
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any, Optional, Union
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ... import errors
|
|
7
|
+
from ...client import AuthenticatedClient, Client
|
|
8
|
+
from ...models.api_response_token_created import ApiResponseTokenCreated
|
|
9
|
+
from ...models.create_api_token_request import CreateApiTokenRequest
|
|
10
|
+
from ...models.error_response import ErrorResponse
|
|
11
|
+
from ...types import Response
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _get_kwargs(
|
|
15
|
+
*,
|
|
16
|
+
body: CreateApiTokenRequest,
|
|
17
|
+
) -> dict[str, Any]:
|
|
18
|
+
headers: dict[str, Any] = {}
|
|
19
|
+
|
|
20
|
+
_kwargs: dict[str, Any] = {
|
|
21
|
+
"method": "post",
|
|
22
|
+
"url": "/api/tokens",
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
_kwargs["json"] = body.to_dict()
|
|
26
|
+
|
|
27
|
+
headers["Content-Type"] = "application/json"
|
|
28
|
+
|
|
29
|
+
_kwargs["headers"] = headers
|
|
30
|
+
return _kwargs
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def _parse_response(
|
|
34
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
35
|
+
) -> Optional[Union[ApiResponseTokenCreated, ErrorResponse]]:
|
|
36
|
+
if response.status_code == 201:
|
|
37
|
+
response_201 = ApiResponseTokenCreated.from_dict(response.json())
|
|
38
|
+
|
|
39
|
+
return response_201
|
|
40
|
+
|
|
41
|
+
if response.status_code == 400:
|
|
42
|
+
response_400 = ErrorResponse.from_dict(response.json())
|
|
43
|
+
|
|
44
|
+
return response_400
|
|
45
|
+
|
|
46
|
+
if response.status_code == 401:
|
|
47
|
+
response_401 = ErrorResponse.from_dict(response.json())
|
|
48
|
+
|
|
49
|
+
return response_401
|
|
50
|
+
|
|
51
|
+
if response.status_code == 500:
|
|
52
|
+
response_500 = ErrorResponse.from_dict(response.json())
|
|
53
|
+
|
|
54
|
+
return response_500
|
|
55
|
+
|
|
56
|
+
if client.raise_on_unexpected_status:
|
|
57
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
58
|
+
else:
|
|
59
|
+
return None
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
def _build_response(
|
|
63
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
64
|
+
) -> Response[Union[ApiResponseTokenCreated, ErrorResponse]]:
|
|
65
|
+
return Response(
|
|
66
|
+
status_code=HTTPStatus(response.status_code),
|
|
67
|
+
content=response.content,
|
|
68
|
+
headers=response.headers,
|
|
69
|
+
parsed=_parse_response(client=client, response=response),
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
def sync_detailed(
|
|
74
|
+
*,
|
|
75
|
+
client: AuthenticatedClient,
|
|
76
|
+
body: CreateApiTokenRequest,
|
|
77
|
+
) -> Response[Union[ApiResponseTokenCreated, ErrorResponse]]:
|
|
78
|
+
"""Create API token
|
|
79
|
+
|
|
80
|
+
Creates a new API token for programmatic access. The full token value
|
|
81
|
+
is only returned once at creation time.
|
|
82
|
+
|
|
83
|
+
Args:
|
|
84
|
+
body (CreateApiTokenRequest):
|
|
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[Union[ApiResponseTokenCreated, ErrorResponse]]
|
|
92
|
+
"""
|
|
93
|
+
|
|
94
|
+
kwargs = _get_kwargs(
|
|
95
|
+
body=body,
|
|
96
|
+
)
|
|
97
|
+
|
|
98
|
+
response = client.get_httpx_client().request(
|
|
99
|
+
**kwargs,
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
return _build_response(client=client, response=response)
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
def sync(
|
|
106
|
+
*,
|
|
107
|
+
client: AuthenticatedClient,
|
|
108
|
+
body: CreateApiTokenRequest,
|
|
109
|
+
) -> Optional[Union[ApiResponseTokenCreated, ErrorResponse]]:
|
|
110
|
+
"""Create API token
|
|
111
|
+
|
|
112
|
+
Creates a new API token for programmatic access. The full token value
|
|
113
|
+
is only returned once at creation time.
|
|
114
|
+
|
|
115
|
+
Args:
|
|
116
|
+
body (CreateApiTokenRequest):
|
|
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[ApiResponseTokenCreated, ErrorResponse]
|
|
124
|
+
"""
|
|
125
|
+
|
|
126
|
+
return sync_detailed(
|
|
127
|
+
client=client,
|
|
128
|
+
body=body,
|
|
129
|
+
).parsed
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
async def asyncio_detailed(
|
|
133
|
+
*,
|
|
134
|
+
client: AuthenticatedClient,
|
|
135
|
+
body: CreateApiTokenRequest,
|
|
136
|
+
) -> Response[Union[ApiResponseTokenCreated, ErrorResponse]]:
|
|
137
|
+
"""Create API token
|
|
138
|
+
|
|
139
|
+
Creates a new API token for programmatic access. The full token value
|
|
140
|
+
is only returned once at creation time.
|
|
141
|
+
|
|
142
|
+
Args:
|
|
143
|
+
body (CreateApiTokenRequest):
|
|
144
|
+
|
|
145
|
+
Raises:
|
|
146
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
147
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
148
|
+
|
|
149
|
+
Returns:
|
|
150
|
+
Response[Union[ApiResponseTokenCreated, ErrorResponse]]
|
|
151
|
+
"""
|
|
152
|
+
|
|
153
|
+
kwargs = _get_kwargs(
|
|
154
|
+
body=body,
|
|
155
|
+
)
|
|
156
|
+
|
|
157
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
158
|
+
|
|
159
|
+
return _build_response(client=client, response=response)
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
async def asyncio(
|
|
163
|
+
*,
|
|
164
|
+
client: AuthenticatedClient,
|
|
165
|
+
body: CreateApiTokenRequest,
|
|
166
|
+
) -> Optional[Union[ApiResponseTokenCreated, ErrorResponse]]:
|
|
167
|
+
"""Create API token
|
|
168
|
+
|
|
169
|
+
Creates a new API token for programmatic access. The full token value
|
|
170
|
+
is only returned once at creation time.
|
|
171
|
+
|
|
172
|
+
Args:
|
|
173
|
+
body (CreateApiTokenRequest):
|
|
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[ApiResponseTokenCreated, ErrorResponse]
|
|
181
|
+
"""
|
|
182
|
+
|
|
183
|
+
return (
|
|
184
|
+
await asyncio_detailed(
|
|
185
|
+
client=client,
|
|
186
|
+
body=body,
|
|
187
|
+
)
|
|
188
|
+
).parsed
|