fleet-python 0.2.49__tar.gz → 0.2.50__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.

Files changed (82) hide show
  1. {fleet_python-0.2.49 → fleet_python-0.2.50}/PKG-INFO +1 -1
  2. {fleet_python-0.2.49 → fleet_python-0.2.50}/examples/example_mcp_anthropic.py +2 -0
  3. fleet_python-0.2.50/examples/example_tasks.py +24 -0
  4. {fleet_python-0.2.49 → fleet_python-0.2.50}/fleet/_async/tasks.py +6 -1
  5. {fleet_python-0.2.49 → fleet_python-0.2.50}/fleet/tasks.py +6 -1
  6. {fleet_python-0.2.49 → fleet_python-0.2.50}/fleet_python.egg-info/PKG-INFO +1 -1
  7. {fleet_python-0.2.49 → fleet_python-0.2.50}/pyproject.toml +1 -1
  8. fleet_python-0.2.49/examples/example_tasks.py +0 -31
  9. {fleet_python-0.2.49 → fleet_python-0.2.50}/LICENSE +0 -0
  10. {fleet_python-0.2.49 → fleet_python-0.2.50}/README.md +0 -0
  11. {fleet_python-0.2.49 → fleet_python-0.2.50}/examples/diff_example.py +0 -0
  12. {fleet_python-0.2.49 → fleet_python-0.2.50}/examples/dsl_example.py +0 -0
  13. {fleet_python-0.2.49 → fleet_python-0.2.50}/examples/example.py +0 -0
  14. {fleet_python-0.2.49 → fleet_python-0.2.50}/examples/exampleResume.py +0 -0
  15. {fleet_python-0.2.49 → fleet_python-0.2.50}/examples/example_account.py +0 -0
  16. {fleet_python-0.2.49 → fleet_python-0.2.50}/examples/example_action_log.py +0 -0
  17. {fleet_python-0.2.49 → fleet_python-0.2.50}/examples/example_client.py +0 -0
  18. {fleet_python-0.2.49 → fleet_python-0.2.50}/examples/example_mcp_openai.py +0 -0
  19. {fleet_python-0.2.49 → fleet_python-0.2.50}/examples/example_sync.py +0 -0
  20. {fleet_python-0.2.49 → fleet_python-0.2.50}/examples/example_task.py +0 -0
  21. {fleet_python-0.2.49 → fleet_python-0.2.50}/examples/example_verifier.py +0 -0
  22. {fleet_python-0.2.49 → fleet_python-0.2.50}/examples/gemini_example.py +0 -0
  23. {fleet_python-0.2.49 → fleet_python-0.2.50}/examples/json_tasks_example.py +0 -0
  24. {fleet_python-0.2.49 → fleet_python-0.2.50}/examples/nova_act_example.py +0 -0
  25. {fleet_python-0.2.49 → fleet_python-0.2.50}/examples/openai_example.py +0 -0
  26. {fleet_python-0.2.49 → fleet_python-0.2.50}/examples/openai_simple_example.py +0 -0
  27. {fleet_python-0.2.49 → fleet_python-0.2.50}/examples/query_builder_example.py +0 -0
  28. {fleet_python-0.2.49 → fleet_python-0.2.50}/examples/quickstart.py +0 -0
  29. {fleet_python-0.2.49 → fleet_python-0.2.50}/examples/test_cdp_logging.py +0 -0
  30. {fleet_python-0.2.49 → fleet_python-0.2.50}/fleet/__init__.py +0 -0
  31. {fleet_python-0.2.49 → fleet_python-0.2.50}/fleet/_async/__init__.py +0 -0
  32. {fleet_python-0.2.49 → fleet_python-0.2.50}/fleet/_async/base.py +0 -0
  33. {fleet_python-0.2.49 → fleet_python-0.2.50}/fleet/_async/client.py +0 -0
  34. {fleet_python-0.2.49 → fleet_python-0.2.50}/fleet/_async/env/__init__.py +0 -0
  35. {fleet_python-0.2.49 → fleet_python-0.2.50}/fleet/_async/env/client.py +0 -0
  36. {fleet_python-0.2.49 → fleet_python-0.2.50}/fleet/_async/exceptions.py +0 -0
  37. {fleet_python-0.2.49 → fleet_python-0.2.50}/fleet/_async/global_client.py +0 -0
  38. {fleet_python-0.2.49 → fleet_python-0.2.50}/fleet/_async/instance/__init__.py +0 -0
  39. {fleet_python-0.2.49 → fleet_python-0.2.50}/fleet/_async/instance/base.py +0 -0
  40. {fleet_python-0.2.49 → fleet_python-0.2.50}/fleet/_async/instance/client.py +0 -0
  41. {fleet_python-0.2.49 → fleet_python-0.2.50}/fleet/_async/models.py +0 -0
  42. {fleet_python-0.2.49 → fleet_python-0.2.50}/fleet/_async/resources/__init__.py +0 -0
  43. {fleet_python-0.2.49 → fleet_python-0.2.50}/fleet/_async/resources/base.py +0 -0
  44. {fleet_python-0.2.49 → fleet_python-0.2.50}/fleet/_async/resources/browser.py +0 -0
  45. {fleet_python-0.2.49 → fleet_python-0.2.50}/fleet/_async/resources/mcp.py +0 -0
  46. {fleet_python-0.2.49 → fleet_python-0.2.50}/fleet/_async/resources/sqlite.py +0 -0
  47. {fleet_python-0.2.49 → fleet_python-0.2.50}/fleet/_async/verifiers/__init__.py +0 -0
  48. {fleet_python-0.2.49 → fleet_python-0.2.50}/fleet/_async/verifiers/bundler.py +0 -0
  49. {fleet_python-0.2.49 → fleet_python-0.2.50}/fleet/_async/verifiers/verifier.py +0 -0
  50. {fleet_python-0.2.49 → fleet_python-0.2.50}/fleet/base.py +0 -0
  51. {fleet_python-0.2.49 → fleet_python-0.2.50}/fleet/client.py +0 -0
  52. {fleet_python-0.2.49 → fleet_python-0.2.50}/fleet/config.py +0 -0
  53. {fleet_python-0.2.49 → fleet_python-0.2.50}/fleet/env/__init__.py +0 -0
  54. {fleet_python-0.2.49 → fleet_python-0.2.50}/fleet/env/client.py +0 -0
  55. {fleet_python-0.2.49 → fleet_python-0.2.50}/fleet/exceptions.py +0 -0
  56. {fleet_python-0.2.49 → fleet_python-0.2.50}/fleet/global_client.py +0 -0
  57. {fleet_python-0.2.49 → fleet_python-0.2.50}/fleet/instance/__init__.py +0 -0
  58. {fleet_python-0.2.49 → fleet_python-0.2.50}/fleet/instance/base.py +0 -0
  59. {fleet_python-0.2.49 → fleet_python-0.2.50}/fleet/instance/client.py +0 -0
  60. {fleet_python-0.2.49 → fleet_python-0.2.50}/fleet/instance/models.py +0 -0
  61. {fleet_python-0.2.49 → fleet_python-0.2.50}/fleet/models.py +0 -0
  62. {fleet_python-0.2.49 → fleet_python-0.2.50}/fleet/resources/__init__.py +0 -0
  63. {fleet_python-0.2.49 → fleet_python-0.2.50}/fleet/resources/base.py +0 -0
  64. {fleet_python-0.2.49 → fleet_python-0.2.50}/fleet/resources/browser.py +0 -0
  65. {fleet_python-0.2.49 → fleet_python-0.2.50}/fleet/resources/mcp.py +0 -0
  66. {fleet_python-0.2.49 → fleet_python-0.2.50}/fleet/resources/sqlite.py +0 -0
  67. {fleet_python-0.2.49 → fleet_python-0.2.50}/fleet/types.py +0 -0
  68. {fleet_python-0.2.49 → fleet_python-0.2.50}/fleet/verifiers/__init__.py +0 -0
  69. {fleet_python-0.2.49 → fleet_python-0.2.50}/fleet/verifiers/bundler.py +0 -0
  70. {fleet_python-0.2.49 → fleet_python-0.2.50}/fleet/verifiers/code.py +0 -0
  71. {fleet_python-0.2.49 → fleet_python-0.2.50}/fleet/verifiers/db.py +0 -0
  72. {fleet_python-0.2.49 → fleet_python-0.2.50}/fleet/verifiers/decorator.py +0 -0
  73. {fleet_python-0.2.49 → fleet_python-0.2.50}/fleet/verifiers/parse.py +0 -0
  74. {fleet_python-0.2.49 → fleet_python-0.2.50}/fleet/verifiers/sql_differ.py +0 -0
  75. {fleet_python-0.2.49 → fleet_python-0.2.50}/fleet/verifiers/verifier.py +0 -0
  76. {fleet_python-0.2.49 → fleet_python-0.2.50}/fleet_python.egg-info/SOURCES.txt +0 -0
  77. {fleet_python-0.2.49 → fleet_python-0.2.50}/fleet_python.egg-info/dependency_links.txt +0 -0
  78. {fleet_python-0.2.49 → fleet_python-0.2.50}/fleet_python.egg-info/requires.txt +0 -0
  79. {fleet_python-0.2.49 → fleet_python-0.2.50}/fleet_python.egg-info/top_level.txt +0 -0
  80. {fleet_python-0.2.49 → fleet_python-0.2.50}/scripts/fix_sync_imports.py +0 -0
  81. {fleet_python-0.2.49 → fleet_python-0.2.50}/scripts/unasync.py +0 -0
  82. {fleet_python-0.2.49 → fleet_python-0.2.50}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fleet-python
3
- Version: 0.2.49
3
+ Version: 0.2.50
4
4
  Summary: Python SDK for Fleet environments
5
5
  Author-email: Fleet AI <nic@fleet.so>
6
6
  License: Apache-2.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]
@@ -0,0 +1,24 @@
1
+ import fleet
2
+ from dotenv import load_dotenv
3
+
4
+ load_dotenv()
5
+
6
+
7
+ def main():
8
+ account = fleet.env.account()
9
+ print(account)
10
+
11
+ tasks = fleet.load_tasks(team_id="5ca40f9f-9899-4bee-b194-6974138a4f12")
12
+ print(f"Loaded {len(tasks)} tasks")
13
+
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")
21
+
22
+
23
+ if __name__ == "__main__":
24
+ main()
@@ -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."""
@@ -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."""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fleet-python
3
- Version: 0.2.49
3
+ Version: 0.2.50
4
4
  Summary: Python SDK for Fleet environments
5
5
  Author-email: Fleet AI <nic@fleet.so>
6
6
  License: Apache-2.0
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "fleet-python"
7
- version = "0.2.49"
7
+ version = "0.2.50"
8
8
  description = "Python SDK for Fleet environments"
9
9
  authors = [
10
10
  {name = "Fleet AI", email = "nic@fleet.so"},
@@ -1,31 +0,0 @@
1
- import fleet
2
- from dotenv import load_dotenv
3
-
4
- load_dotenv()
5
-
6
-
7
- def main():
8
- env = fleet.env.make("fira")
9
-
10
- tasks = fleet.load_tasks(env_key="fira")
11
- print(f"Loaded {len(tasks)} tasks")
12
-
13
- for i, task in enumerate(tasks):
14
- print(f"\nTask {i + 1}:")
15
- print(f" Key: {task.key}")
16
- print(f" Prompt: {task.prompt[:80]}...")
17
- print(f" Verifier: {task.verifier_func[:80]}...")
18
-
19
- print(f" Verifier: {task.verifier.key}")
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)
28
-
29
-
30
- if __name__ == "__main__":
31
- main()
File without changes
File without changes
File without changes