fleet-python 0.2.24__tar.gz → 0.2.26__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.24 → fleet_python-0.2.26}/PKG-INFO +1 -1
- {fleet_python-0.2.24 → fleet_python-0.2.26}/fleet/__init__.py +3 -2
- {fleet_python-0.2.24 → fleet_python-0.2.26}/fleet/_async/client.py +6 -1
- {fleet_python-0.2.24/fleet → fleet_python-0.2.26/fleet/_async}/models.py +6 -8
- {fleet_python-0.2.24 → fleet_python-0.2.26}/fleet/_async/verifiers/verifier.py +5 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/fleet/client.py +6 -1
- {fleet_python-0.2.24 → fleet_python-0.2.26}/fleet/config.py +1 -1
- {fleet_python-0.2.24/fleet/_async → fleet_python-0.2.26/fleet}/models.py +6 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/fleet/verifiers/verifier.py +6 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/fleet_python.egg-info/PKG-INFO +1 -1
- {fleet_python-0.2.24 → fleet_python-0.2.26}/pyproject.toml +2 -1
- {fleet_python-0.2.24 → fleet_python-0.2.26}/LICENSE +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/README.md +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/examples/diff_example.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/examples/dsl_example.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/examples/example.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/examples/example_action_log.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/examples/example_client.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/examples/example_mcp_anthropic.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/examples/example_mcp_openai.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/examples/example_sync.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/examples/example_task.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/examples/example_verifier.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/examples/gemini_example.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/examples/json_tasks_example.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/examples/nova_act_example.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/examples/openai_example.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/examples/openai_simple_example.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/examples/query_builder_example.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/examples/quickstart.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/fleet/_async/__init__.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/fleet/_async/base.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/fleet/_async/env/__init__.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/fleet/_async/env/client.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/fleet/_async/exceptions.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/fleet/_async/instance/__init__.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/fleet/_async/instance/base.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/fleet/_async/instance/client.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/fleet/_async/resources/__init__.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/fleet/_async/resources/base.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/fleet/_async/resources/browser.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/fleet/_async/resources/sqlite.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/fleet/_async/tasks.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/fleet/_async/verifiers/__init__.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/fleet/_async/verifiers/bundler.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/fleet/base.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/fleet/env/__init__.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/fleet/env/client.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/fleet/exceptions.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/fleet/instance/__init__.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/fleet/instance/base.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/fleet/instance/client.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/fleet/instance/models.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/fleet/resources/__init__.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/fleet/resources/base.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/fleet/resources/browser.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/fleet/resources/mcp.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/fleet/resources/sqlite.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/fleet/tasks.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/fleet/types.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/fleet/verifiers/__init__.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/fleet/verifiers/bundler.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/fleet/verifiers/code.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/fleet/verifiers/db.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/fleet/verifiers/decorator.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/fleet/verifiers/parse.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/fleet/verifiers/sql_differ.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/fleet_python.egg-info/SOURCES.txt +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/fleet_python.egg-info/dependency_links.txt +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/fleet_python.egg-info/requires.txt +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/fleet_python.egg-info/top_level.txt +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/scripts/fix_sync_imports.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/scripts/unasync.py +0 -0
- {fleet_python-0.2.24 → fleet_python-0.2.26}/setup.cfg +0 -0
|
@@ -24,7 +24,7 @@ from .exceptions import (
|
|
|
24
24
|
)
|
|
25
25
|
from .client import Fleet, SyncEnv
|
|
26
26
|
from ._async.client import AsyncFleet, AsyncEnv
|
|
27
|
-
from .models import InstanceResponse
|
|
27
|
+
from .models import InstanceResponse, Environment
|
|
28
28
|
from .instance.models import Resource, ResetResponse
|
|
29
29
|
|
|
30
30
|
# Import sync verifiers with explicit naming
|
|
@@ -62,7 +62,8 @@ __all__ = [
|
|
|
62
62
|
"AsyncFleet",
|
|
63
63
|
"AsyncEnv",
|
|
64
64
|
# Models
|
|
65
|
-
"
|
|
65
|
+
"InstanceResponse",
|
|
66
|
+
"SyncEnv",
|
|
66
67
|
"Resource",
|
|
67
68
|
"ResetResponse",
|
|
68
69
|
# Task models
|
|
@@ -125,6 +125,7 @@ class AsyncEnv(EnvironmentBase):
|
|
|
125
125
|
key: str,
|
|
126
126
|
function_name: str,
|
|
127
127
|
args: tuple,
|
|
128
|
+
args_array: list,
|
|
128
129
|
kwargs: dict,
|
|
129
130
|
timeout: Optional[int] = 30,
|
|
130
131
|
needs_upload: bool = True,
|
|
@@ -136,6 +137,7 @@ class AsyncEnv(EnvironmentBase):
|
|
|
136
137
|
key,
|
|
137
138
|
function_name,
|
|
138
139
|
args,
|
|
140
|
+
args_array,
|
|
139
141
|
kwargs,
|
|
140
142
|
timeout,
|
|
141
143
|
needs_upload
|
|
@@ -200,6 +202,7 @@ class AsyncFleet:
|
|
|
200
202
|
json=request.model_dump(),
|
|
201
203
|
base_url=region_base_url,
|
|
202
204
|
)
|
|
205
|
+
|
|
203
206
|
instance = AsyncEnv(client=self.client, **response.json())
|
|
204
207
|
await instance.instance.load()
|
|
205
208
|
return instance
|
|
@@ -271,7 +274,7 @@ class AsyncFleet:
|
|
|
271
274
|
|
|
272
275
|
async def account(self) -> AccountResponse:
|
|
273
276
|
"""Get account information including instance limits and usage.
|
|
274
|
-
|
|
277
|
+
|
|
275
278
|
Returns:
|
|
276
279
|
AccountResponse containing team_id, team_name, instance_limit, and instance_count
|
|
277
280
|
"""
|
|
@@ -299,6 +302,7 @@ async def _execute_verifier_remote(
|
|
|
299
302
|
key: str,
|
|
300
303
|
function_name: str,
|
|
301
304
|
args: tuple,
|
|
305
|
+
args_array: list,
|
|
302
306
|
kwargs: dict,
|
|
303
307
|
timeout: Optional[int] = 30,
|
|
304
308
|
needs_upload: bool = True,
|
|
@@ -314,6 +318,7 @@ async def _execute_verifier_remote(
|
|
|
314
318
|
"key": key,
|
|
315
319
|
"sha256": bundle_sha,
|
|
316
320
|
"args": args_kwargs_b64,
|
|
321
|
+
"args_array": args_array,
|
|
317
322
|
"function_name": function_name,
|
|
318
323
|
"timeout": timeout,
|
|
319
324
|
"region": "us-west-1", # TODO: make configurable
|
|
@@ -305,14 +305,6 @@ class TaskListResponse(BaseModel):
|
|
|
305
305
|
total: int = Field(..., title='Total')
|
|
306
306
|
|
|
307
307
|
|
|
308
|
-
class AccountResponse(BaseModel):
|
|
309
|
-
"""Response model for account information."""
|
|
310
|
-
team_id: str = Field(..., title='Team Id')
|
|
311
|
-
team_name: str = Field(..., title='Team Name')
|
|
312
|
-
instance_limit: int = Field(..., title='Instance Limit')
|
|
313
|
-
instance_count: int = Field(..., title='Instance Count')
|
|
314
|
-
|
|
315
|
-
|
|
316
308
|
class InstanceResponse(BaseModel):
|
|
317
309
|
instance_id: str = Field(..., title='Instance Id')
|
|
318
310
|
env_key: str = Field(..., title='Env Key')
|
|
@@ -327,3 +319,9 @@ class InstanceResponse(BaseModel):
|
|
|
327
319
|
env_variables: Optional[Dict[str, Any]] = Field(None, title='Env Variables')
|
|
328
320
|
urls: Optional[InstanceURLs] = Field(None, title='Urls')
|
|
329
321
|
health: Optional[bool] = Field(None, title='Health')
|
|
322
|
+
|
|
323
|
+
class AccountResponse(BaseModel):
|
|
324
|
+
team_id: str = Field(..., title='Team Id')
|
|
325
|
+
team_name: str = Field(..., title='Team Name')
|
|
326
|
+
instance_limit: int = Field(..., title='Instance Limit')
|
|
327
|
+
instance_count: int = Field(..., title='Instance Count')
|
|
@@ -129,6 +129,10 @@ class AsyncVerifierFunction:
|
|
|
129
129
|
"Please provide a synchronous version of your verifier."
|
|
130
130
|
)
|
|
131
131
|
|
|
132
|
+
args_array = list(args)
|
|
133
|
+
args_array.append({"env": env.instance_id})
|
|
134
|
+
args = tuple(args_array)
|
|
135
|
+
|
|
132
136
|
try:
|
|
133
137
|
# Check if bundle needs to be uploaded
|
|
134
138
|
bundle_sha, needs_upload = await self._check_bundle_status(env)
|
|
@@ -144,6 +148,7 @@ class AsyncVerifierFunction:
|
|
|
144
148
|
key=self.key,
|
|
145
149
|
function_name=self.func.__name__,
|
|
146
150
|
args=args,
|
|
151
|
+
args_array=args_array,
|
|
147
152
|
kwargs=kwargs,
|
|
148
153
|
needs_upload=True
|
|
149
154
|
)
|
|
@@ -125,6 +125,7 @@ class SyncEnv(EnvironmentBase):
|
|
|
125
125
|
key: str,
|
|
126
126
|
function_name: str,
|
|
127
127
|
args: tuple,
|
|
128
|
+
args_array: list,
|
|
128
129
|
kwargs: dict,
|
|
129
130
|
timeout: Optional[int] = 30,
|
|
130
131
|
needs_upload: bool = True,
|
|
@@ -136,6 +137,7 @@ class SyncEnv(EnvironmentBase):
|
|
|
136
137
|
key,
|
|
137
138
|
function_name,
|
|
138
139
|
args,
|
|
140
|
+
args_array,
|
|
139
141
|
kwargs,
|
|
140
142
|
timeout,
|
|
141
143
|
needs_upload
|
|
@@ -200,6 +202,7 @@ class Fleet:
|
|
|
200
202
|
json=request.model_dump(),
|
|
201
203
|
base_url=region_base_url,
|
|
202
204
|
)
|
|
205
|
+
|
|
203
206
|
instance = SyncEnv(client=self.client, **response.json())
|
|
204
207
|
instance.instance.load()
|
|
205
208
|
return instance
|
|
@@ -271,7 +274,7 @@ class Fleet:
|
|
|
271
274
|
|
|
272
275
|
def account(self) -> AccountResponse:
|
|
273
276
|
"""Get account information including instance limits and usage.
|
|
274
|
-
|
|
277
|
+
|
|
275
278
|
Returns:
|
|
276
279
|
AccountResponse containing team_id, team_name, instance_limit, and instance_count
|
|
277
280
|
"""
|
|
@@ -299,6 +302,7 @@ def _execute_verifier_remote(
|
|
|
299
302
|
key: str,
|
|
300
303
|
function_name: str,
|
|
301
304
|
args: tuple,
|
|
305
|
+
args_array: list,
|
|
302
306
|
kwargs: dict,
|
|
303
307
|
timeout: Optional[int] = 30,
|
|
304
308
|
needs_upload: bool = True,
|
|
@@ -314,6 +318,7 @@ def _execute_verifier_remote(
|
|
|
314
318
|
"key": key,
|
|
315
319
|
"sha256": bundle_sha,
|
|
316
320
|
"args": args_kwargs_b64,
|
|
321
|
+
"args_array": args_array,
|
|
317
322
|
"function_name": function_name,
|
|
318
323
|
"timeout": timeout,
|
|
319
324
|
"region": "us-west-1", # TODO: make configurable
|
|
@@ -319,3 +319,9 @@ class InstanceResponse(BaseModel):
|
|
|
319
319
|
env_variables: Optional[Dict[str, Any]] = Field(None, title='Env Variables')
|
|
320
320
|
urls: Optional[InstanceURLs] = Field(None, title='Urls')
|
|
321
321
|
health: Optional[bool] = Field(None, title='Health')
|
|
322
|
+
|
|
323
|
+
class AccountResponse(BaseModel):
|
|
324
|
+
team_id: str = Field(..., title='Team Id')
|
|
325
|
+
team_name: str = Field(..., title='Team Name')
|
|
326
|
+
instance_limit: int = Field(..., title='Instance Limit')
|
|
327
|
+
instance_count: int = Field(..., title='Instance Count')
|
|
@@ -11,6 +11,7 @@ import functools
|
|
|
11
11
|
import uuid
|
|
12
12
|
import logging
|
|
13
13
|
import hashlib
|
|
14
|
+
import asyncio
|
|
14
15
|
from typing import Any, Callable, Dict, Optional, List, TypeVar, Set
|
|
15
16
|
|
|
16
17
|
from .bundler import FunctionBundler
|
|
@@ -128,6 +129,10 @@ class SyncVerifierFunction:
|
|
|
128
129
|
"Please provide a synchronous version of your verifier."
|
|
129
130
|
)
|
|
130
131
|
|
|
132
|
+
args_array = list(args)
|
|
133
|
+
args_array.append({"env": env.instance_id})
|
|
134
|
+
args = tuple(args_array)
|
|
135
|
+
|
|
131
136
|
try:
|
|
132
137
|
# Check if bundle needs to be uploaded
|
|
133
138
|
bundle_sha, needs_upload = self._check_bundle_status(env)
|
|
@@ -143,6 +148,7 @@ class SyncVerifierFunction:
|
|
|
143
148
|
key=self.key,
|
|
144
149
|
function_name=self.func.__name__,
|
|
145
150
|
args=args,
|
|
151
|
+
args_array=args_array,
|
|
146
152
|
kwargs=kwargs,
|
|
147
153
|
needs_upload=True
|
|
148
154
|
)
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "fleet-python"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.26"
|
|
8
8
|
description = "Python SDK for Fleet environments"
|
|
9
9
|
authors = [
|
|
10
10
|
{name = "Fleet AI", email = "nic@fleet.so"},
|
|
@@ -99,6 +99,7 @@ testpaths = ["tests"]
|
|
|
99
99
|
"list_regions_async" = "list_regions"
|
|
100
100
|
"list_instances_async" = "list_instances"
|
|
101
101
|
"get_async" = "get"
|
|
102
|
+
"account_async" = "account"
|
|
102
103
|
"async def" = "def"
|
|
103
104
|
"from fleet.verifiers" = "from ..verifiers"
|
|
104
105
|
"await asyncio.sleep" = "time.sleep"
|
|
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
|
|
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
|