fleet-python 0.2.49__py3-none-any.whl → 0.2.50__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.
- examples/example_mcp_anthropic.py +2 -0
- examples/example_tasks.py +10 -17
- fleet/_async/tasks.py +6 -1
- fleet/tasks.py +6 -1
- {fleet_python-0.2.49.dist-info → fleet_python-0.2.50.dist-info}/METADATA +1 -1
- {fleet_python-0.2.49.dist-info → fleet_python-0.2.50.dist-info}/RECORD +9 -9
- {fleet_python-0.2.49.dist-info → fleet_python-0.2.50.dist-info}/WHEEL +0 -0
- {fleet_python-0.2.49.dist-info → fleet_python-0.2.50.dist-info}/licenses/LICENSE +0 -0
- {fleet_python-0.2.49.dist-info → fleet_python-0.2.50.dist-info}/top_level.txt +0 -0
|
@@ -15,6 +15,8 @@ async def main():
|
|
|
15
15
|
print("Created environment:", env.urls.app)
|
|
16
16
|
print("MCP URL:", env.mcp.url)
|
|
17
17
|
|
|
18
|
+
asyncio.sleep(5)
|
|
19
|
+
|
|
18
20
|
async with streamablehttp_client(url=env.mcp.url) as streams:
|
|
19
21
|
async with ClientSession(
|
|
20
22
|
read_stream=streams[0], write_stream=streams[1]
|
examples/example_tasks.py
CHANGED
|
@@ -5,26 +5,19 @@ load_dotenv()
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
def main():
|
|
8
|
-
|
|
8
|
+
account = fleet.env.account()
|
|
9
|
+
print(account)
|
|
9
10
|
|
|
10
|
-
tasks = fleet.load_tasks(
|
|
11
|
+
tasks = fleet.load_tasks(team_id="5ca40f9f-9899-4bee-b194-6974138a4f12")
|
|
11
12
|
print(f"Loaded {len(tasks)} tasks")
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
print(" Running verifier...")
|
|
21
|
-
try:
|
|
22
|
-
score = task.verify(env)
|
|
23
|
-
print(f" ✓ Score: {score}")
|
|
24
|
-
except Exception as e:
|
|
25
|
-
print(f" ✗ Error: {type(e).__name__}: {e}")
|
|
26
|
-
|
|
27
|
-
print("-" * 60)
|
|
14
|
+
# Save tasks to JSON file
|
|
15
|
+
import json
|
|
16
|
+
|
|
17
|
+
with open(f"{account.team_id}.json", "w") as f:
|
|
18
|
+
json.dump([task.model_dump() for task in tasks], f, indent=2)
|
|
19
|
+
|
|
20
|
+
print(f"Saved {len(tasks)} tasks to saved_tasks.json")
|
|
28
21
|
|
|
29
22
|
|
|
30
23
|
if __name__ == "__main__":
|
fleet/_async/tasks.py
CHANGED
|
@@ -5,7 +5,7 @@ from __future__ import annotations
|
|
|
5
5
|
from datetime import datetime
|
|
6
6
|
from typing import Any, Dict, Optional, List, TYPE_CHECKING
|
|
7
7
|
|
|
8
|
-
from pydantic import BaseModel, Field, validator
|
|
8
|
+
from pydantic import BaseModel, Field, validator, field_serializer
|
|
9
9
|
|
|
10
10
|
# Import the shared VerifierFunction type that works for both async and sync
|
|
11
11
|
from fleet.types import VerifierFunction
|
|
@@ -46,6 +46,11 @@ class Task(BaseModel):
|
|
|
46
46
|
"""Set created_at to current time if not provided."""
|
|
47
47
|
return v or datetime.now()
|
|
48
48
|
|
|
49
|
+
@field_serializer("created_at")
|
|
50
|
+
def serialize_created_at(self, dt: Optional[datetime], _info):
|
|
51
|
+
"""Serialize datetime to ISO format string."""
|
|
52
|
+
return dt.isoformat() if dt else None
|
|
53
|
+
|
|
49
54
|
@property
|
|
50
55
|
def env_key(self) -> str:
|
|
51
56
|
"""Get the environment key combining env_id and version."""
|
fleet/tasks.py
CHANGED
|
@@ -6,7 +6,7 @@ import asyncio
|
|
|
6
6
|
from datetime import datetime
|
|
7
7
|
from typing import Any, Dict, Optional, List, TYPE_CHECKING
|
|
8
8
|
|
|
9
|
-
from pydantic import BaseModel, Field, validator
|
|
9
|
+
from pydantic import BaseModel, Field, validator, field_serializer
|
|
10
10
|
|
|
11
11
|
# Import the shared VerifierFunction type that works for both async and sync
|
|
12
12
|
from fleet.types import VerifierFunction
|
|
@@ -47,6 +47,11 @@ class Task(BaseModel):
|
|
|
47
47
|
"""Set created_at to current time if not provided."""
|
|
48
48
|
return v or datetime.now()
|
|
49
49
|
|
|
50
|
+
@field_serializer("created_at")
|
|
51
|
+
def serialize_created_at(self, dt: Optional[datetime], _info):
|
|
52
|
+
"""Serialize datetime to ISO format string."""
|
|
53
|
+
return dt.isoformat() if dt else None
|
|
54
|
+
|
|
50
55
|
@property
|
|
51
56
|
def env_key(self) -> str:
|
|
52
57
|
"""Get the environment key combining env_id and version."""
|
|
@@ -5,11 +5,11 @@ examples/exampleResume.py,sha256=hzdL9QfYtwlje5geWS2cgWgjcnLX4UtXSAd-92F66Lw,704
|
|
|
5
5
|
examples/example_account.py,sha256=t5_Tnr7DcLYfNpEAbuBySQIqsqiQQGySuiItIghCjAM,225
|
|
6
6
|
examples/example_action_log.py,sha256=pwvLro_Fkrw4DII002bHGuWfoZ6QRvUMDD9BnMqJgLQ,622
|
|
7
7
|
examples/example_client.py,sha256=M9Mfi1FcD2LtSDVk89R_-tgG98swvDYy4qx2zVayJ-0,1025
|
|
8
|
-
examples/example_mcp_anthropic.py,sha256=
|
|
8
|
+
examples/example_mcp_anthropic.py,sha256=WzQipN6ryPYuiGcvYmaTget4Hn421ijMS6xDYWwrVyE,2619
|
|
9
9
|
examples/example_mcp_openai.py,sha256=xhqJd2-mnQs4-ZmydGrX7pPs7_X5i-YFqkO1cr3L-5g,480
|
|
10
10
|
examples/example_sync.py,sha256=EkuWmUzB1ZsBJQk6ZRflB793rKsuRHeSg5HJZHVhBB0,975
|
|
11
11
|
examples/example_task.py,sha256=dhG6STAkNsTdHs9cO1RFH9WfuvRmq5bRC211hTeFrk8,7088
|
|
12
|
-
examples/example_tasks.py,sha256=
|
|
12
|
+
examples/example_tasks.py,sha256=xTL8UWVAuolSX6swskfrAcmDrLIzn45dJ7YPWCwoEBU,514
|
|
13
13
|
examples/example_verifier.py,sha256=0vwNITIG3m4CkSPwIxNXcGx9TqrxEsCGqK2A8keKZMM,2392
|
|
14
14
|
examples/gemini_example.py,sha256=qj9WDazQTYNiRHNeUg9Tjkp33lJMwbx8gDfpFe1sDQo,16180
|
|
15
15
|
examples/json_tasks_example.py,sha256=CYPESGGtOo0fmsDdLidujTfsE4QlJHw7rOhyVqPJ_Ls,5329
|
|
@@ -26,7 +26,7 @@ fleet/config.py,sha256=uY02ZKxVoXqVDta-0IMWaYJeE1CTXF_fA9NI6QUutmU,319
|
|
|
26
26
|
fleet/exceptions.py,sha256=fUmPwWhnT8SR97lYsRq0kLHQHKtSh2eJS0VQ2caSzEI,5055
|
|
27
27
|
fleet/global_client.py,sha256=frrDAFNM2ywN0JHLtlm9qbE1dQpnQJsavJpb7xSR_bU,1072
|
|
28
28
|
fleet/models.py,sha256=d9eish0KO3t4VCNu8h8Q_6K1Xj-crYo5Fejtle0Ur28,13056
|
|
29
|
-
fleet/tasks.py,sha256=
|
|
29
|
+
fleet/tasks.py,sha256=uR94wq7SG4ymJYLq24F2iYn0el58C2Czb2oK-8rIs8s,12344
|
|
30
30
|
fleet/types.py,sha256=L4Y82xICf1tzyCLqhLYUgEoaIIS5h9T05TyFNHSWs3s,652
|
|
31
31
|
fleet/_async/__init__.py,sha256=7C_JaEHoqZ4cddsCmlJ4z-UaU6Kr2CBZSgwx5B6fqnc,6765
|
|
32
32
|
fleet/_async/base.py,sha256=oisVTQsx0M_yTmyQJc3oij63uKZ97MHz-xYFsWXxQE8,9202
|
|
@@ -34,7 +34,7 @@ fleet/_async/client.py,sha256=cFR0CcXmPtKc5HxyDnnsNXRbx-ICwegHPRbUvVQ95CE,27510
|
|
|
34
34
|
fleet/_async/exceptions.py,sha256=fUmPwWhnT8SR97lYsRq0kLHQHKtSh2eJS0VQ2caSzEI,5055
|
|
35
35
|
fleet/_async/global_client.py,sha256=4WskpLHbsDEgWW7hXMD09W-brkp4euy8w2ZJ88594rQ,1103
|
|
36
36
|
fleet/_async/models.py,sha256=GX-sRciZDenW2O7Qx9w_ftOkJyE4ph1-92WMq6lynHE,12856
|
|
37
|
-
fleet/_async/tasks.py,sha256=
|
|
37
|
+
fleet/_async/tasks.py,sha256=hrtvKlqepQOFnlJv6h5S06UWNWtn2hQlgSp3eYj5m30,12226
|
|
38
38
|
fleet/_async/env/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
39
39
|
fleet/_async/env/client.py,sha256=C5WG5Ir_McXaFPZNdkQjj0w4V7xMIcw3QyVP5g-3kVk,1237
|
|
40
40
|
fleet/_async/instance/__init__.py,sha256=PtmJq8J8bh0SOQ2V55QURz5GJfobozwtQoqhaOk3_tI,515
|
|
@@ -67,10 +67,10 @@ fleet/verifiers/decorator.py,sha256=nAP3O8szXu7md_kpwpz91hGSUNEVLYjwZQZTkQlV1DM,
|
|
|
67
67
|
fleet/verifiers/parse.py,sha256=qz9AfJrTbjlg-LU-lE8Ciqi7Yt2a8-cs17FdpjTLhMk,8550
|
|
68
68
|
fleet/verifiers/sql_differ.py,sha256=TqTLWyK3uOyLbitT6HYzYEzuSFC39wcyhgk3rcm__k8,6525
|
|
69
69
|
fleet/verifiers/verifier.py,sha256=_lcxXVm8e0xRrK2gNJy9up7pW1zOkPRY5n5lQ85S8jg,14197
|
|
70
|
-
fleet_python-0.2.
|
|
70
|
+
fleet_python-0.2.50.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
71
71
|
scripts/fix_sync_imports.py,sha256=X9fWLTpiPGkSHsjyQUDepOJkxOqw1DPj7nd8wFlFqLQ,8368
|
|
72
72
|
scripts/unasync.py,sha256=vWVQxRWX8SRZO5cmzEhpvnG_REhCWXpidIGIpWmEcvI,696
|
|
73
|
-
fleet_python-0.2.
|
|
74
|
-
fleet_python-0.2.
|
|
75
|
-
fleet_python-0.2.
|
|
76
|
-
fleet_python-0.2.
|
|
73
|
+
fleet_python-0.2.50.dist-info/METADATA,sha256=M_PLPe_XZpORLf-usjGttI8DVjdVhBuoVZbYqye52f8,3304
|
|
74
|
+
fleet_python-0.2.50.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
75
|
+
fleet_python-0.2.50.dist-info/top_level.txt,sha256=_3DSmTohvSDf3AIP_BYfGzhwO1ECFwuzg83X-wHCx3Y,23
|
|
76
|
+
fleet_python-0.2.50.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|