fleet-python 0.2.12__tar.gz → 0.2.13__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.
Potentially problematic release.
This version of fleet-python might be problematic. Click here for more details.
- {fleet_python-0.2.12 → fleet_python-0.2.13}/PKG-INFO +1 -1
- {fleet_python-0.2.12 → fleet_python-0.2.13}/examples/example.py +1 -1
- {fleet_python-0.2.12 → fleet_python-0.2.13}/examples/example_sync.py +1 -1
- {fleet_python-0.2.12 → fleet_python-0.2.13}/fleet/_async/base.py +1 -1
- {fleet_python-0.2.12 → fleet_python-0.2.13}/fleet/_async/client.py +11 -11
- {fleet_python-0.2.12 → fleet_python-0.2.13}/fleet/_async/env/client.py +1 -1
- {fleet_python-0.2.12 → fleet_python-0.2.13}/fleet/_async/instance/__init__.py +1 -1
- {fleet_python-0.2.12 → fleet_python-0.2.13}/fleet/_async/instance/base.py +5 -2
- {fleet_python-0.2.12 → fleet_python-0.2.13}/fleet/_async/instance/client.py +3 -3
- {fleet_python-0.2.12/fleet → fleet_python-0.2.13/fleet/_async}/resources/base.py +1 -1
- {fleet_python-0.2.12 → fleet_python-0.2.13}/fleet/_async/resources/browser.py +1 -1
- {fleet_python-0.2.12 → fleet_python-0.2.13}/fleet/_async/resources/sqlite.py +2 -2
- {fleet_python-0.2.12 → fleet_python-0.2.13}/fleet/client.py +10 -10
- {fleet_python-0.2.12/fleet/_async → fleet_python-0.2.13/fleet}/config.py +1 -0
- {fleet_python-0.2.12 → fleet_python-0.2.13}/fleet/instance/base.py +5 -2
- {fleet_python-0.2.12 → fleet_python-0.2.13}/fleet/instance/client.py +2 -2
- {fleet_python-0.2.12 → fleet_python-0.2.13}/fleet_python.egg-info/PKG-INFO +1 -1
- {fleet_python-0.2.12 → fleet_python-0.2.13}/fleet_python.egg-info/SOURCES.txt +0 -3
- {fleet_python-0.2.12 → fleet_python-0.2.13}/pyproject.toml +1 -1
- {fleet_python-0.2.12 → fleet_python-0.2.13}/scripts/fix_sync_imports.py +30 -12
- fleet_python-0.2.12/fleet/config.py +0 -8
- fleet_python-0.2.12/fleet/instance/models.py +0 -141
- fleet_python-0.2.12/fleet/models.py +0 -109
- {fleet_python-0.2.12 → fleet_python-0.2.13}/LICENSE +0 -0
- {fleet_python-0.2.12 → fleet_python-0.2.13}/README.md +0 -0
- {fleet_python-0.2.12 → fleet_python-0.2.13}/examples/dsl_example.py +0 -0
- {fleet_python-0.2.12 → fleet_python-0.2.13}/examples/example_client.py +0 -0
- {fleet_python-0.2.12 → fleet_python-0.2.13}/examples/gemini_example.py +0 -0
- {fleet_python-0.2.12 → fleet_python-0.2.13}/examples/json_tasks_example.py +0 -0
- {fleet_python-0.2.12 → fleet_python-0.2.13}/examples/nova_act_example.py +0 -0
- {fleet_python-0.2.12 → fleet_python-0.2.13}/examples/openai_example.py +0 -0
- {fleet_python-0.2.12 → fleet_python-0.2.13}/examples/openai_simple_example.py +0 -0
- {fleet_python-0.2.12 → fleet_python-0.2.13}/examples/quickstart.py +0 -0
- {fleet_python-0.2.12 → fleet_python-0.2.13}/fleet/__init__.py +0 -0
- {fleet_python-0.2.12 → fleet_python-0.2.13}/fleet/_async/__init__.py +0 -0
- {fleet_python-0.2.12 → fleet_python-0.2.13}/fleet/_async/env/__init__.py +0 -0
- {fleet_python-0.2.12 → fleet_python-0.2.13}/fleet/_async/exceptions.py +0 -0
- {fleet_python-0.2.12 → fleet_python-0.2.13}/fleet/_async/playwright.py +0 -0
- {fleet_python-0.2.12 → fleet_python-0.2.13}/fleet/_async/resources/__init__.py +0 -0
- {fleet_python-0.2.12 → fleet_python-0.2.13}/fleet/base.py +0 -0
- {fleet_python-0.2.12 → fleet_python-0.2.13}/fleet/env/__init__.py +0 -0
- {fleet_python-0.2.12 → fleet_python-0.2.13}/fleet/env/client.py +0 -0
- {fleet_python-0.2.12 → fleet_python-0.2.13}/fleet/exceptions.py +0 -0
- {fleet_python-0.2.12 → fleet_python-0.2.13}/fleet/instance/__init__.py +0 -0
- {fleet_python-0.2.12/fleet/_async → fleet_python-0.2.13/fleet}/instance/models.py +0 -0
- {fleet_python-0.2.12/fleet/_async → fleet_python-0.2.13/fleet}/models.py +0 -0
- {fleet_python-0.2.12 → fleet_python-0.2.13}/fleet/playwright.py +0 -0
- {fleet_python-0.2.12 → fleet_python-0.2.13}/fleet/resources/__init__.py +0 -0
- {fleet_python-0.2.12/fleet/_async → fleet_python-0.2.13/fleet}/resources/base.py +0 -0
- {fleet_python-0.2.12 → fleet_python-0.2.13}/fleet/resources/browser.py +0 -0
- {fleet_python-0.2.12 → fleet_python-0.2.13}/fleet/resources/sqlite.py +0 -0
- {fleet_python-0.2.12 → fleet_python-0.2.13}/fleet/verifiers/__init__.py +0 -0
- {fleet_python-0.2.12 → fleet_python-0.2.13}/fleet/verifiers/code.py +0 -0
- {fleet_python-0.2.12 → fleet_python-0.2.13}/fleet/verifiers/db.py +0 -0
- {fleet_python-0.2.12 → fleet_python-0.2.13}/fleet/verifiers/sql_differ.py +0 -0
- {fleet_python-0.2.12 → fleet_python-0.2.13}/fleet_python.egg-info/dependency_links.txt +0 -0
- {fleet_python-0.2.12 → fleet_python-0.2.13}/fleet_python.egg-info/requires.txt +0 -0
- {fleet_python-0.2.12 → fleet_python-0.2.13}/fleet_python.egg-info/top_level.txt +0 -0
- {fleet_python-0.2.12 → fleet_python-0.2.13}/scripts/unasync.py +0 -0
- {fleet_python-0.2.12 → fleet_python-0.2.13}/setup.cfg +0 -0
|
@@ -16,7 +16,7 @@ async def main():
|
|
|
16
16
|
print("Environments:", len(environments))
|
|
17
17
|
|
|
18
18
|
# Create a new instance
|
|
19
|
-
env = await flt.env.make_async("hubspot
|
|
19
|
+
env = await flt.env.make_async("hubspot")
|
|
20
20
|
print(f"New Instance: {env.instance_id} ({env.region})")
|
|
21
21
|
|
|
22
22
|
response = await env.reset(seed=42)
|
|
@@ -20,7 +20,7 @@ import logging
|
|
|
20
20
|
from typing import Optional, List
|
|
21
21
|
|
|
22
22
|
from .base import EnvironmentBase, AsyncWrapper
|
|
23
|
-
from
|
|
23
|
+
from ..models import InstanceRequest, InstanceRecord, Environment as EnvironmentModel
|
|
24
24
|
|
|
25
25
|
from .instance import (
|
|
26
26
|
AsyncInstanceClient,
|
|
@@ -29,7 +29,7 @@ from .instance import (
|
|
|
29
29
|
ValidatorType,
|
|
30
30
|
ExecuteFunctionResponse,
|
|
31
31
|
)
|
|
32
|
-
from
|
|
32
|
+
from ..config import DEFAULT_MAX_RETRIES, DEFAULT_TIMEOUT, REGION_BASE_URL
|
|
33
33
|
from .instance.base import default_httpx_client
|
|
34
34
|
from .resources.base import Resource
|
|
35
35
|
from .resources.sqlite import AsyncSQLiteResource
|
|
@@ -38,6 +38,11 @@ from .resources.browser import AsyncBrowserResource
|
|
|
38
38
|
logger = logging.getLogger(__name__)
|
|
39
39
|
|
|
40
40
|
|
|
41
|
+
async def _delete_instance(client: AsyncWrapper, instance_id: str) -> InstanceRecord:
|
|
42
|
+
response = await client.request("DELETE", f"/v1/env/instances/{instance_id}")
|
|
43
|
+
return InstanceRecord(**response.json())
|
|
44
|
+
|
|
45
|
+
|
|
41
46
|
class AsyncEnvironment(EnvironmentBase):
|
|
42
47
|
def __init__(self, client: AsyncWrapper, **kwargs):
|
|
43
48
|
super().__init__(**kwargs)
|
|
@@ -70,10 +75,7 @@ class AsyncEnvironment(EnvironmentBase):
|
|
|
70
75
|
return await self.instance.resources()
|
|
71
76
|
|
|
72
77
|
async def close(self) -> InstanceRecord:
|
|
73
|
-
|
|
74
|
-
"DELETE", f"/v1/env/instances/{self.instance_id}"
|
|
75
|
-
)
|
|
76
|
-
return InstanceRecord(**response.json())
|
|
78
|
+
return await _delete_instance(self._client, self.instance_id)
|
|
77
79
|
|
|
78
80
|
async def verify(self, validator: ValidatorType) -> ExecuteFunctionResponse:
|
|
79
81
|
return await self.instance.verify(validator)
|
|
@@ -91,8 +93,9 @@ class AsyncFleet:
|
|
|
91
93
|
base_url: Optional[str] = None,
|
|
92
94
|
httpx_client: Optional[httpx.AsyncClient] = None,
|
|
93
95
|
max_retries: int = DEFAULT_MAX_RETRIES,
|
|
96
|
+
timeout: float = DEFAULT_TIMEOUT,
|
|
94
97
|
):
|
|
95
|
-
self._httpx_client = httpx_client or default_httpx_client(max_retries)
|
|
98
|
+
self._httpx_client = httpx_client or default_httpx_client(max_retries, timeout)
|
|
96
99
|
self.client = AsyncWrapper(
|
|
97
100
|
api_key=api_key,
|
|
98
101
|
base_url=base_url,
|
|
@@ -156,7 +159,4 @@ class AsyncFleet:
|
|
|
156
159
|
return instance
|
|
157
160
|
|
|
158
161
|
async def delete(self, instance_id: str) -> InstanceRecord:
|
|
159
|
-
|
|
160
|
-
"DELETE", f"/v1/env/instances/{instance_id}"
|
|
161
|
-
)
|
|
162
|
-
return InstanceRecord(**response.json())
|
|
162
|
+
return await _delete_instance(self.client, instance_id)
|
|
@@ -3,7 +3,10 @@ import httpx_retries
|
|
|
3
3
|
from typing import Dict, Any, Optional
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
def default_httpx_client(max_retries: int) -> httpx.AsyncClient:
|
|
6
|
+
def default_httpx_client(max_retries: int, timeout: float) -> httpx.AsyncClient:
|
|
7
|
+
if max_retries <= 0:
|
|
8
|
+
return httpx.AsyncClient(timeout=timeout)
|
|
9
|
+
|
|
7
10
|
policy = httpx_retries.Retry(
|
|
8
11
|
total=max_retries,
|
|
9
12
|
status_forcelist=[
|
|
@@ -21,7 +24,7 @@ def default_httpx_client(max_retries: int) -> httpx.AsyncClient:
|
|
|
21
24
|
transport=httpx.AsyncHTTPTransport(retries=2), retry=policy
|
|
22
25
|
)
|
|
23
26
|
return httpx.AsyncClient(
|
|
24
|
-
timeout=
|
|
27
|
+
timeout=timeout,
|
|
25
28
|
transport=retry,
|
|
26
29
|
)
|
|
27
30
|
|
|
@@ -14,10 +14,10 @@ from ..resources.base import Resource
|
|
|
14
14
|
from fleet.verifiers import DatabaseSnapshot
|
|
15
15
|
|
|
16
16
|
from ..exceptions import FleetEnvironmentError
|
|
17
|
-
from
|
|
17
|
+
from ...config import DEFAULT_MAX_RETRIES, DEFAULT_TIMEOUT
|
|
18
18
|
|
|
19
19
|
from .base import AsyncWrapper, default_httpx_client
|
|
20
|
-
from .models import (
|
|
20
|
+
from ...instance.models import (
|
|
21
21
|
ResetRequest,
|
|
22
22
|
ResetResponse,
|
|
23
23
|
Resource as ResourceModel,
|
|
@@ -51,7 +51,7 @@ class AsyncInstanceClient:
|
|
|
51
51
|
self.base_url = url
|
|
52
52
|
self.client = AsyncWrapper(
|
|
53
53
|
url=self.base_url,
|
|
54
|
-
httpx_client=httpx_client or default_httpx_client(DEFAULT_MAX_RETRIES),
|
|
54
|
+
httpx_client=httpx_client or default_httpx_client(DEFAULT_MAX_RETRIES, DEFAULT_TIMEOUT),
|
|
55
55
|
)
|
|
56
56
|
self._resources: Optional[List[ResourceModel]] = None
|
|
57
57
|
self._resources_state: Dict[str, Dict[str, Resource]] = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from typing import Any, List, Optional
|
|
2
|
-
from
|
|
3
|
-
from
|
|
2
|
+
from ...instance.models import Resource as ResourceModel
|
|
3
|
+
from ...instance.models import DescribeResponse, QueryRequest, QueryResponse
|
|
4
4
|
from .base import Resource
|
|
5
5
|
|
|
6
6
|
from typing import TYPE_CHECKING
|
|
@@ -29,7 +29,7 @@ from .instance import (
|
|
|
29
29
|
ValidatorType,
|
|
30
30
|
ExecuteFunctionResponse,
|
|
31
31
|
)
|
|
32
|
-
from .config import DEFAULT_MAX_RETRIES, REGION_BASE_URL
|
|
32
|
+
from .config import DEFAULT_MAX_RETRIES, DEFAULT_TIMEOUT, REGION_BASE_URL
|
|
33
33
|
from .instance.base import default_httpx_client
|
|
34
34
|
from .resources.base import Resource
|
|
35
35
|
from .resources.sqlite import SQLiteResource
|
|
@@ -38,6 +38,11 @@ from .resources.browser import BrowserResource
|
|
|
38
38
|
logger = logging.getLogger(__name__)
|
|
39
39
|
|
|
40
40
|
|
|
41
|
+
def _delete_instance(client: SyncWrapper, instance_id: str) -> InstanceRecord:
|
|
42
|
+
response = client.request("DELETE", f"/v1/env/instances/{instance_id}")
|
|
43
|
+
return InstanceRecord(**response.json())
|
|
44
|
+
|
|
45
|
+
|
|
41
46
|
class Environment(EnvironmentBase):
|
|
42
47
|
def __init__(self, client: SyncWrapper, **kwargs):
|
|
43
48
|
super().__init__(**kwargs)
|
|
@@ -70,10 +75,7 @@ class Environment(EnvironmentBase):
|
|
|
70
75
|
return self.instance.resources()
|
|
71
76
|
|
|
72
77
|
def close(self) -> InstanceRecord:
|
|
73
|
-
|
|
74
|
-
"DELETE", f"/v1/env/instances/{self.instance_id}"
|
|
75
|
-
)
|
|
76
|
-
return InstanceRecord(**response.json())
|
|
78
|
+
return _delete_instance(self._client, self.instance_id)
|
|
77
79
|
|
|
78
80
|
def verify(self, validator: ValidatorType) -> ExecuteFunctionResponse:
|
|
79
81
|
return self.instance.verify(validator)
|
|
@@ -91,8 +93,9 @@ class Fleet:
|
|
|
91
93
|
base_url: Optional[str] = None,
|
|
92
94
|
httpx_client: Optional[httpx.Client] = None,
|
|
93
95
|
max_retries: int = DEFAULT_MAX_RETRIES,
|
|
96
|
+
timeout: float = DEFAULT_TIMEOUT,
|
|
94
97
|
):
|
|
95
|
-
self._httpx_client = httpx_client or default_httpx_client(max_retries)
|
|
98
|
+
self._httpx_client = httpx_client or default_httpx_client(max_retries, timeout)
|
|
96
99
|
self.client = SyncWrapper(
|
|
97
100
|
api_key=api_key,
|
|
98
101
|
base_url=base_url,
|
|
@@ -156,7 +159,4 @@ class Fleet:
|
|
|
156
159
|
return instance
|
|
157
160
|
|
|
158
161
|
def delete(self, instance_id: str) -> InstanceRecord:
|
|
159
|
-
|
|
160
|
-
"DELETE", f"/v1/env/instances/{instance_id}"
|
|
161
|
-
)
|
|
162
|
-
return InstanceRecord(**response.json())
|
|
162
|
+
return _delete_instance(self.client, instance_id)
|
|
@@ -3,7 +3,10 @@ import httpx_retries
|
|
|
3
3
|
from typing import Dict, Any, Optional
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
def default_httpx_client(max_retries: int) -> httpx.Client:
|
|
6
|
+
def default_httpx_client(max_retries: int, timeout: float) -> httpx.Client:
|
|
7
|
+
if max_retries <= 0:
|
|
8
|
+
return httpx.Client(timeout=timeout)
|
|
9
|
+
|
|
7
10
|
policy = httpx_retries.Retry(
|
|
8
11
|
total=max_retries,
|
|
9
12
|
status_forcelist=[
|
|
@@ -21,7 +24,7 @@ def default_httpx_client(max_retries: int) -> httpx.Client:
|
|
|
21
24
|
transport=httpx.HTTPTransport(retries=2), retry=policy
|
|
22
25
|
)
|
|
23
26
|
return httpx.Client(
|
|
24
|
-
timeout=
|
|
27
|
+
timeout=timeout,
|
|
25
28
|
transport=retry,
|
|
26
29
|
)
|
|
27
30
|
|
|
@@ -14,7 +14,7 @@ from ..resources.base import Resource
|
|
|
14
14
|
from ..verifiers import DatabaseSnapshot
|
|
15
15
|
|
|
16
16
|
from ..exceptions import FleetEnvironmentError
|
|
17
|
-
from ..config import DEFAULT_MAX_RETRIES
|
|
17
|
+
from ..config import DEFAULT_MAX_RETRIES, DEFAULT_TIMEOUT
|
|
18
18
|
|
|
19
19
|
from .base import SyncWrapper, default_httpx_client
|
|
20
20
|
from .models import (
|
|
@@ -51,7 +51,7 @@ class InstanceClient:
|
|
|
51
51
|
self.base_url = url
|
|
52
52
|
self.client = SyncWrapper(
|
|
53
53
|
url=self.base_url,
|
|
54
|
-
httpx_client=httpx_client or default_httpx_client(DEFAULT_MAX_RETRIES),
|
|
54
|
+
httpx_client=httpx_client or default_httpx_client(DEFAULT_MAX_RETRIES, DEFAULT_TIMEOUT),
|
|
55
55
|
)
|
|
56
56
|
self._resources: Optional[List[ResourceModel]] = None
|
|
57
57
|
self._resources_state: Dict[str, Dict[str, Resource]] = {
|
|
@@ -21,16 +21,13 @@ fleet/playwright.py
|
|
|
21
21
|
fleet/_async/__init__.py
|
|
22
22
|
fleet/_async/base.py
|
|
23
23
|
fleet/_async/client.py
|
|
24
|
-
fleet/_async/config.py
|
|
25
24
|
fleet/_async/exceptions.py
|
|
26
|
-
fleet/_async/models.py
|
|
27
25
|
fleet/_async/playwright.py
|
|
28
26
|
fleet/_async/env/__init__.py
|
|
29
27
|
fleet/_async/env/client.py
|
|
30
28
|
fleet/_async/instance/__init__.py
|
|
31
29
|
fleet/_async/instance/base.py
|
|
32
30
|
fleet/_async/instance/client.py
|
|
33
|
-
fleet/_async/instance/models.py
|
|
34
31
|
fleet/_async/resources/__init__.py
|
|
35
32
|
fleet/_async/resources/base.py
|
|
36
33
|
fleet/_async/resources/browser.py
|
|
@@ -28,6 +28,28 @@ def fix_file(filepath: Path) -> bool:
|
|
|
28
28
|
# Fix httpx transport classes
|
|
29
29
|
content = content.replace('httpx.SyncHTTPTransport', 'httpx.HTTPTransport')
|
|
30
30
|
|
|
31
|
+
# Fix imports based on file location
|
|
32
|
+
# Since async code now imports from sync models/config, we need to fix the generated sync imports
|
|
33
|
+
rel_path = filepath.relative_to(Path(__file__).parent.parent / "fleet")
|
|
34
|
+
|
|
35
|
+
# Fix imports for files in different subdirectories
|
|
36
|
+
if "fleet/instance" in str(filepath):
|
|
37
|
+
# Files in fleet/instance/ should use .. for fleet level imports
|
|
38
|
+
content = content.replace('from ...config import', 'from ..config import')
|
|
39
|
+
content = content.replace('from ...instance.models import', 'from .models import')
|
|
40
|
+
elif "fleet/env" in str(filepath):
|
|
41
|
+
# Files in fleet/env/ should use .. for fleet level imports
|
|
42
|
+
content = content.replace('from ...models import', 'from ..models import')
|
|
43
|
+
elif "fleet/resources" in str(filepath):
|
|
44
|
+
# Files in fleet/resources/ should use .. for fleet level imports
|
|
45
|
+
content = content.replace('from ...instance.models import', 'from ..instance.models import')
|
|
46
|
+
|
|
47
|
+
# Fix imports in top-level fleet files
|
|
48
|
+
if rel_path.parts[0] in ['base.py', 'client.py'] and len(rel_path.parts) == 1:
|
|
49
|
+
# Top-level files should use . for fleet level imports
|
|
50
|
+
content = content.replace('from ..models import', 'from .models import')
|
|
51
|
+
content = content.replace('from ..config import', 'from .config import')
|
|
52
|
+
|
|
31
53
|
# Fix playwright imports for sync version
|
|
32
54
|
if 'playwright' in str(filepath):
|
|
33
55
|
# Fix the import statement
|
|
@@ -54,20 +76,16 @@ def main():
|
|
|
54
76
|
"""Fix all sync files."""
|
|
55
77
|
sync_dir = Path(__file__).parent.parent / "fleet"
|
|
56
78
|
|
|
57
|
-
#
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
sync_dir / "playwright.py",
|
|
62
|
-
# Add other files here as needed
|
|
63
|
-
]
|
|
64
|
-
|
|
65
|
-
for filepath in files_to_fix:
|
|
66
|
-
if filepath.exists():
|
|
79
|
+
# Process all Python files in the fleet directory (excluding _async)
|
|
80
|
+
fixed_count = 0
|
|
81
|
+
for filepath in sync_dir.rglob("*.py"):
|
|
82
|
+
if "_async" not in str(filepath):
|
|
67
83
|
if fix_file(filepath):
|
|
68
84
|
print(f"Fixed {filepath}")
|
|
69
|
-
|
|
70
|
-
|
|
85
|
+
fixed_count += 1
|
|
86
|
+
|
|
87
|
+
if fixed_count == 0:
|
|
88
|
+
print("No files needed fixing")
|
|
71
89
|
|
|
72
90
|
if __name__ == "__main__":
|
|
73
91
|
main()
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
# generated by datamodel-codegen:
|
|
2
|
-
# filename: openapi (2).json
|
|
3
|
-
# timestamp: 2025-07-09T20:11:31+00:00
|
|
4
|
-
|
|
5
|
-
from __future__ import annotations
|
|
6
|
-
|
|
7
|
-
from enum import Enum
|
|
8
|
-
from typing import Any, Dict, List, Optional, Union
|
|
9
|
-
|
|
10
|
-
from pydantic import BaseModel, Field
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
class CDPDescribeResponse(BaseModel):
|
|
14
|
-
success: bool = Field(..., title="Success")
|
|
15
|
-
cdp_page_url: str = Field(..., title="Url")
|
|
16
|
-
cdp_browser_url: str = Field(..., title="Browser Url")
|
|
17
|
-
cdp_devtools_url: str = Field(..., title="Devtools Url")
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
class ChromeStartRequest(BaseModel):
|
|
21
|
-
resolution: Optional[str] = Field("1920x1080", title="Resolution")
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
class ChromeStartResponse(BaseModel):
|
|
25
|
-
success: bool = Field(..., title="Success")
|
|
26
|
-
message: str = Field(..., title="Message")
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
class ChromeStatusResponse(BaseModel):
|
|
30
|
-
running: bool = Field(..., title="Running")
|
|
31
|
-
message: str = Field(..., title="Message")
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
class CreateSnapshotsResponse(BaseModel):
|
|
35
|
-
success: bool = Field(..., title="Success")
|
|
36
|
-
initial_snapshot_path: Optional[str] = Field(None, title="Initial Snapshot Path")
|
|
37
|
-
final_snapshot_path: Optional[str] = Field(None, title="Final Snapshot Path")
|
|
38
|
-
message: str = Field(..., title="Message")
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
class HealthResponse(BaseModel):
|
|
42
|
-
status: str = Field(..., title="Status")
|
|
43
|
-
timestamp: str = Field(..., title="Timestamp")
|
|
44
|
-
service: str = Field(..., title="Service")
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
class LogActionRequest(BaseModel):
|
|
48
|
-
action_type: str = Field(..., title="Action Type")
|
|
49
|
-
sql: Optional[str] = Field(None, title="Sql")
|
|
50
|
-
args: Optional[str] = Field(None, title="Args")
|
|
51
|
-
path: Optional[str] = Field(None, title="Path")
|
|
52
|
-
raw_payload: Optional[str] = Field(None, title="Raw Payload")
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
class LogActionResponse(BaseModel):
|
|
56
|
-
success: bool = Field(..., title="Success")
|
|
57
|
-
message: str = Field(..., title="Message")
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
class QueryRequest(BaseModel):
|
|
61
|
-
query: str = Field(..., title="Query")
|
|
62
|
-
args: Optional[List] = Field(None, title="Args")
|
|
63
|
-
read_only: Optional[bool] = Field(True, title="Read Only")
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
class QueryResponse(BaseModel):
|
|
67
|
-
success: bool = Field(..., title="Success")
|
|
68
|
-
columns: Optional[List[str]] = Field(None, title="Columns")
|
|
69
|
-
rows: Optional[List[List]] = Field(None, title="Rows")
|
|
70
|
-
rows_affected: Optional[int] = Field(None, title="Rows Affected")
|
|
71
|
-
last_insert_id: Optional[int] = Field(None, title="Last Insert Id")
|
|
72
|
-
error: Optional[str] = Field(None, title="Error")
|
|
73
|
-
message: str = Field(..., title="Message")
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
class ResetRequest(BaseModel):
|
|
77
|
-
timestamp: Optional[int] = Field(None, title="Timestamp")
|
|
78
|
-
seed: Optional[int] = Field(None, title="Seed")
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
class ResetResponse(BaseModel):
|
|
82
|
-
success: bool = Field(..., title="Success")
|
|
83
|
-
message: str = Field(..., title="Message")
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
class ResourceMode(Enum):
|
|
87
|
-
ro = "ro"
|
|
88
|
-
rw = "rw"
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
class ResourceType(Enum):
|
|
92
|
-
db = "sqlite"
|
|
93
|
-
cdp = "cdp"
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
class TableSchema(BaseModel):
|
|
97
|
-
name: str = Field(..., title="Name")
|
|
98
|
-
sql: str = Field(..., title="Sql")
|
|
99
|
-
columns: List[Dict[str, Any]] = Field(..., title="Columns")
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
class TimestampResponse(BaseModel):
|
|
103
|
-
timestamp: str = Field(..., title="Timestamp")
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
class ValidationError(BaseModel):
|
|
107
|
-
loc: List[Union[str, int]] = Field(..., title="Location")
|
|
108
|
-
msg: str = Field(..., title="Message")
|
|
109
|
-
type: str = Field(..., title="Error Type")
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
class DescribeResponse(BaseModel):
|
|
113
|
-
success: bool = Field(..., title="Success")
|
|
114
|
-
resource_name: str = Field(..., title="Resource Name")
|
|
115
|
-
tables: Optional[List[TableSchema]] = Field(None, title="Tables")
|
|
116
|
-
error: Optional[str] = Field(None, title="Error")
|
|
117
|
-
message: str = Field(..., title="Message")
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
class HTTPValidationError(BaseModel):
|
|
121
|
-
detail: Optional[List[ValidationError]] = Field(None, title="Detail")
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
class Resource(BaseModel):
|
|
125
|
-
name: str = Field(..., title="Name")
|
|
126
|
-
type: ResourceType
|
|
127
|
-
mode: ResourceMode
|
|
128
|
-
label: Optional[str] = Field(None, title="Label")
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
class ExecuteFunctionRequest(BaseModel):
|
|
132
|
-
function_code: str
|
|
133
|
-
function_name: str
|
|
134
|
-
text_solution: Optional[str] = None
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
class ExecuteFunctionResponse(BaseModel):
|
|
138
|
-
success: bool
|
|
139
|
-
result: Optional[Any] = None
|
|
140
|
-
error: Optional[str] = None
|
|
141
|
-
message: str
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
# generated by datamodel-codegen:
|
|
2
|
-
# filename: openapi.json
|
|
3
|
-
# timestamp: 2025-07-08T18:21:47+00:00
|
|
4
|
-
|
|
5
|
-
from __future__ import annotations
|
|
6
|
-
|
|
7
|
-
from enum import Enum
|
|
8
|
-
from typing import Dict, List, Optional, Union
|
|
9
|
-
|
|
10
|
-
from pydantic import BaseModel, Field
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
class Environment(BaseModel):
|
|
14
|
-
env_key: str = Field(..., title="Env Key")
|
|
15
|
-
name: str = Field(..., title="Name")
|
|
16
|
-
description: Optional[str] = Field(..., title="Description")
|
|
17
|
-
default_version: Optional[str] = Field(..., title="Default Version")
|
|
18
|
-
versions: Dict[str, str] = Field(..., title="Versions")
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
class Instance(BaseModel):
|
|
22
|
-
instance_id: str = Field(..., title="Instance Id")
|
|
23
|
-
env_key: str = Field(..., title="Env Key")
|
|
24
|
-
version: str = Field(..., title="Version")
|
|
25
|
-
status: str = Field(..., title="Status")
|
|
26
|
-
subdomain: str = Field(..., title="Subdomain")
|
|
27
|
-
created_at: str = Field(..., title="Created At")
|
|
28
|
-
updated_at: str = Field(..., title="Updated At")
|
|
29
|
-
terminated_at: Optional[str] = Field(None, title="Terminated At")
|
|
30
|
-
team_id: str = Field(..., title="Team Id")
|
|
31
|
-
region: str = Field(..., title="Region")
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
class InstanceRequest(BaseModel):
|
|
35
|
-
env_key: str = Field(..., title="Env Key")
|
|
36
|
-
version: Optional[str] = Field(None, title="Version")
|
|
37
|
-
region: Optional[str] = Field("us-east-2", title="Region")
|
|
38
|
-
seed: Optional[int] = Field(None, title="Seed")
|
|
39
|
-
timestamp: Optional[int] = Field(None, title="Timestamp")
|
|
40
|
-
p_error: Optional[float] = Field(None, title="P Error")
|
|
41
|
-
avg_latency: Optional[float] = Field(None, title="Avg Latency")
|
|
42
|
-
run_id: Optional[str] = Field(None, title="Run Id")
|
|
43
|
-
task_id: Optional[str] = Field(None, title="Task Id")
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
class InstanceStatus(Enum):
|
|
47
|
-
pending = "pending"
|
|
48
|
-
running = "running"
|
|
49
|
-
stopped = "stopped"
|
|
50
|
-
error = "error"
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
class ManagerURLs(BaseModel):
|
|
54
|
-
api: str = Field(..., title="Api")
|
|
55
|
-
docs: str = Field(..., title="Docs")
|
|
56
|
-
reset: str = Field(..., title="Reset")
|
|
57
|
-
diff: str = Field(..., title="Diff")
|
|
58
|
-
snapshot: str = Field(..., title="Snapshot")
|
|
59
|
-
execute_verifier_function: str = Field(..., title="Execute Verifier Function")
|
|
60
|
-
execute_verifier_function_with_upload: str = Field(
|
|
61
|
-
..., title="Execute Verifier Function With Upload"
|
|
62
|
-
)
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
class ValidationError(BaseModel):
|
|
66
|
-
loc: List[Union[str, int]] = Field(..., title="Location")
|
|
67
|
-
msg: str = Field(..., title="Message")
|
|
68
|
-
type: str = Field(..., title="Error Type")
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
class HTTPValidationError(BaseModel):
|
|
72
|
-
detail: Optional[List[ValidationError]] = Field(None, title="Detail")
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
class InstanceURLs(BaseModel):
|
|
76
|
-
root: str = Field(..., title="Root")
|
|
77
|
-
app: str = Field(..., title="App")
|
|
78
|
-
api: Optional[str] = Field(None, title="Api")
|
|
79
|
-
health: Optional[str] = Field(None, title="Health")
|
|
80
|
-
api_docs: Optional[str] = Field(None, title="Api Docs")
|
|
81
|
-
manager: ManagerURLs
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
class InstanceResponse(BaseModel):
|
|
85
|
-
instance_id: str = Field(..., title="Instance Id")
|
|
86
|
-
env_key: str = Field(..., title="Env Key")
|
|
87
|
-
version: str = Field(..., title="Version")
|
|
88
|
-
status: str = Field(..., title="Status")
|
|
89
|
-
subdomain: str = Field(..., title="Subdomain")
|
|
90
|
-
created_at: str = Field(..., title="Created At")
|
|
91
|
-
updated_at: str = Field(..., title="Updated At")
|
|
92
|
-
terminated_at: Optional[str] = Field(None, title="Terminated At")
|
|
93
|
-
team_id: str = Field(..., title="Team Id")
|
|
94
|
-
region: str = Field(..., title="Region")
|
|
95
|
-
urls: InstanceURLs
|
|
96
|
-
health: Optional[bool] = Field(None, title="Health")
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
class InstanceRecord(BaseModel):
|
|
100
|
-
instance_id: str
|
|
101
|
-
env_key: str
|
|
102
|
-
version: str
|
|
103
|
-
status: str
|
|
104
|
-
subdomain: str
|
|
105
|
-
created_at: str
|
|
106
|
-
updated_at: str
|
|
107
|
-
terminated_at: Optional[str] = None
|
|
108
|
-
team_id: str
|
|
109
|
-
region: str
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|