fleet-python 0.2.24__py3-none-any.whl → 0.2.25__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.
- fleet/__init__.py +3 -2
- fleet/_async/client.py +6 -1
- fleet/_async/models.py +6 -0
- fleet/_async/verifiers/verifier.py +5 -0
- fleet/client.py +6 -1
- fleet/config.py +1 -1
- fleet/models.py +6 -8
- fleet/verifiers/verifier.py +5 -0
- {fleet_python-0.2.24.dist-info → fleet_python-0.2.25.dist-info}/METADATA +1 -1
- {fleet_python-0.2.24.dist-info → fleet_python-0.2.25.dist-info}/RECORD +13 -13
- {fleet_python-0.2.24.dist-info → fleet_python-0.2.25.dist-info}/WHEEL +0 -0
- {fleet_python-0.2.24.dist-info → fleet_python-0.2.25.dist-info}/licenses/LICENSE +0 -0
- {fleet_python-0.2.24.dist-info → fleet_python-0.2.25.dist-info}/top_level.txt +0 -0
fleet/__init__.py
CHANGED
|
@@ -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
|
fleet/_async/client.py
CHANGED
|
@@ -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
|
fleet/_async/models.py
CHANGED
|
@@ -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')
|
|
@@ -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
|
)
|
fleet/client.py
CHANGED
|
@@ -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
|
fleet/config.py
CHANGED
fleet/models.py
CHANGED
|
@@ -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')
|
fleet/verifiers/verifier.py
CHANGED
|
@@ -128,6 +128,10 @@ class SyncVerifierFunction:
|
|
|
128
128
|
"Please provide a synchronous version of your verifier."
|
|
129
129
|
)
|
|
130
130
|
|
|
131
|
+
args_array = list(args)
|
|
132
|
+
args_array.append({"env": env.instance_id})
|
|
133
|
+
args = tuple(args_array)
|
|
134
|
+
|
|
131
135
|
try:
|
|
132
136
|
# Check if bundle needs to be uploaded
|
|
133
137
|
bundle_sha, needs_upload = self._check_bundle_status(env)
|
|
@@ -143,6 +147,7 @@ class SyncVerifierFunction:
|
|
|
143
147
|
key=self.key,
|
|
144
148
|
function_name=self.func.__name__,
|
|
145
149
|
args=args,
|
|
150
|
+
args_array=args_array,
|
|
146
151
|
kwargs=kwargs,
|
|
147
152
|
needs_upload=True
|
|
148
153
|
)
|
|
@@ -15,19 +15,19 @@ examples/openai_example.py,sha256=I2vk_SJN9BkSRQCYRJfbtGJ-HJ2xzQj-lOjwqmLos5M,82
|
|
|
15
15
|
examples/openai_simple_example.py,sha256=I42ytIwv0INgDO39pp1MOQSqsJz2YYH8GeNNBaUtq3A,1748
|
|
16
16
|
examples/query_builder_example.py,sha256=Q3lUBETHpu1aS2FXAO79ADYqCxOjMMMZNgCcFVapiII,3918
|
|
17
17
|
examples/quickstart.py,sha256=1VT39IRRhemsJgxi0O0gprdpcw7HB4pYO97GAYagIcg,3788
|
|
18
|
-
fleet/__init__.py,sha256=
|
|
18
|
+
fleet/__init__.py,sha256=2WHAk_ZRIxDs1uxrWf-sSeokiK4f_nDVHJJ1_VUFSPA,2306
|
|
19
19
|
fleet/base.py,sha256=0yYuMN0lBkrfTTZBt5NQp5112xWgziuWEk4GuHJB1wE,9189
|
|
20
|
-
fleet/client.py,sha256=
|
|
21
|
-
fleet/config.py,sha256=
|
|
20
|
+
fleet/client.py,sha256=K7tLdwvLx-ExGtNoIDqsuROb-egaM-OxGijI19vnUqY,12069
|
|
21
|
+
fleet/config.py,sha256=rqR-y2TbZS-VYACaqrg-PUe0y0UDbR1ZNU1KGJZBwNQ,272
|
|
22
22
|
fleet/exceptions.py,sha256=fUmPwWhnT8SR97lYsRq0kLHQHKtSh2eJS0VQ2caSzEI,5055
|
|
23
|
-
fleet/models.py,sha256=
|
|
23
|
+
fleet/models.py,sha256=trtM-3A2wW4pOg6EvbKxiukU2clSNFrj4Uax7l2uiIM,11665
|
|
24
24
|
fleet/tasks.py,sha256=OScp0tHIbCmOpmCFzHATBmA7WiJMlehP3rvEfeMAoPk,1648
|
|
25
25
|
fleet/types.py,sha256=eXeI8BFmiU5hln0PVvJbUZs7BSjl6wSqAtN9zaJT6yY,652
|
|
26
26
|
fleet/_async/__init__.py,sha256=AJWCnuo7XKja4yBb8fK2wX7ntciLXQrpzdRHwjTRP6M,62
|
|
27
27
|
fleet/_async/base.py,sha256=s0rYOtXsMJeitOvpa-Oh8ciLV226p_TIPp3fplzWvV4,9209
|
|
28
|
-
fleet/_async/client.py,sha256=
|
|
28
|
+
fleet/_async/client.py,sha256=2LlMFO5cnLIwvunSixKRk3kJ-F55WufmoyutwgDYf64,12414
|
|
29
29
|
fleet/_async/exceptions.py,sha256=fUmPwWhnT8SR97lYsRq0kLHQHKtSh2eJS0VQ2caSzEI,5055
|
|
30
|
-
fleet/_async/models.py,sha256=
|
|
30
|
+
fleet/_async/models.py,sha256=trtM-3A2wW4pOg6EvbKxiukU2clSNFrj4Uax7l2uiIM,11665
|
|
31
31
|
fleet/_async/tasks.py,sha256=7ddJWkgulGW7dTPVQUUcl2L0HgsajmMQY6AUblHpG8A,1649
|
|
32
32
|
fleet/_async/env/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
33
33
|
fleet/_async/env/client.py,sha256=MR2Ju7AudGWmztTVUPPut-ys3yqD7D00D_jsxZaRybA,858
|
|
@@ -40,7 +40,7 @@ fleet/_async/resources/browser.py,sha256=oldoSiymJ1lJkADhpUG81ViOBDNyppX1jSoEwe9
|
|
|
40
40
|
fleet/_async/resources/sqlite.py,sha256=DvDLRI5dJ7_v4WkHw-Zday1M_FQUdzAqUCy9FtfOY8w,26636
|
|
41
41
|
fleet/_async/verifiers/__init__.py,sha256=Z2Ic77mw6-mhF5CmVrucmDnAGSTAtiejR_eZjTjPPA0,447
|
|
42
42
|
fleet/_async/verifiers/bundler.py,sha256=A4yR3wBOcVZYFAv87CD58QlJn6L4QXeilrasnVm8n74,26185
|
|
43
|
-
fleet/_async/verifiers/verifier.py,sha256
|
|
43
|
+
fleet/_async/verifiers/verifier.py,sha256=-BNKVKVpg_x4VoPNafEEIGZrP0u7Nh-7OKN6juCiqqs,12322
|
|
44
44
|
fleet/env/__init__.py,sha256=Wt6mO2dQnOdzdjOCvtiIP49wpSrmS7OaZ_OeHNrzqsY,595
|
|
45
45
|
fleet/env/client.py,sha256=2FzA7qfR-B7tVdCNa4uQk10g8zXV-9MNjAqx2D5vQ7c,710
|
|
46
46
|
fleet/instance/__init__.py,sha256=-Anms7Vw_FO8VBIvwnAnq4rQjwl_XNfAS-i7bypHMow,478
|
|
@@ -59,11 +59,11 @@ fleet/verifiers/db.py,sha256=tssmvJjDHuBIy8qlL_P5-UdmEFUw2DZcqLsWZ8ot3Xw,27766
|
|
|
59
59
|
fleet/verifiers/decorator.py,sha256=Q-KHhicnIYFwX7FX_VZguzNfu8ZslqNUeWxcS2CwNVY,3386
|
|
60
60
|
fleet/verifiers/parse.py,sha256=FYbzgX86dLAxoAZ3jXfu6zRPlNxgzjTkhO3yxMC0hZ4,5261
|
|
61
61
|
fleet/verifiers/sql_differ.py,sha256=dmiGCFXVMEMbAX519OjhVqgA8ZvhnvdmC1BVpL7QCF0,6490
|
|
62
|
-
fleet/verifiers/verifier.py,sha256
|
|
63
|
-
fleet_python-0.2.
|
|
62
|
+
fleet/verifiers/verifier.py,sha256=XVK6a17GnQjxjEkYgl05QKjlmqTA5sWf-eGzcM-QR7E,12249
|
|
63
|
+
fleet_python-0.2.25.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
64
64
|
scripts/fix_sync_imports.py,sha256=zangqElfqIvIc-E0S46m6R-51pTZ6gbd8oUVkvCGzJo,4768
|
|
65
65
|
scripts/unasync.py,sha256=--Fmaae47o-dZ1HYgX1c3Nvi-rMjcFymTRlJcWWnmpw,725
|
|
66
|
-
fleet_python-0.2.
|
|
67
|
-
fleet_python-0.2.
|
|
68
|
-
fleet_python-0.2.
|
|
69
|
-
fleet_python-0.2.
|
|
66
|
+
fleet_python-0.2.25.dist-info/METADATA,sha256=K9TL_OP6vnVBzED_sXSpvZDli67CXfQ5FKOotwEMkKg,3297
|
|
67
|
+
fleet_python-0.2.25.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
68
|
+
fleet_python-0.2.25.dist-info/top_level.txt,sha256=_3DSmTohvSDf3AIP_BYfGzhwO1ECFwuzg83X-wHCx3Y,23
|
|
69
|
+
fleet_python-0.2.25.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|