fleet-python 0.2.11__py3-none-any.whl → 0.2.13__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 fleet-python might be problematic. Click here for more details.

@@ -25,6 +25,31 @@ def fix_file(filepath: Path) -> bool:
25
25
  # Fix any remaining AsyncFleetPlaywrightWrapper references in docstrings
26
26
  content = content.replace('AsyncFleetPlaywrightWrapper', 'FleetPlaywrightWrapper')
27
27
 
28
+ # Fix httpx transport classes
29
+ content = content.replace('httpx.SyncHTTPTransport', 'httpx.HTTPTransport')
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
+
28
53
  # Fix playwright imports for sync version
29
54
  if 'playwright' in str(filepath):
30
55
  # Fix the import statement
@@ -51,19 +76,16 @@ def main():
51
76
  """Fix all sync files."""
52
77
  sync_dir = Path(__file__).parent.parent / "fleet"
53
78
 
54
- # Files to fix
55
- files_to_fix = [
56
- sync_dir / "instance" / "client.py",
57
- sync_dir / "playwright.py",
58
- # Add other files here as needed
59
- ]
60
-
61
- for filepath in files_to_fix:
62
- 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):
63
83
  if fix_file(filepath):
64
84
  print(f"Fixed {filepath}")
65
- else:
66
- print(f"No changes needed for {filepath}")
85
+ fixed_count += 1
86
+
87
+ if fixed_count == 0:
88
+ print("No files needed fixing")
67
89
 
68
90
  if __name__ == "__main__":
69
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
fleet/_async/models.py DELETED
@@ -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