fleet-python 0.2.23__tar.gz → 0.2.25__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 (74) hide show
  1. {fleet_python-0.2.23 → fleet_python-0.2.25}/PKG-INFO +1 -1
  2. {fleet_python-0.2.23 → fleet_python-0.2.25}/fleet/__init__.py +3 -2
  3. {fleet_python-0.2.23 → fleet_python-0.2.25}/fleet/_async/client.py +15 -0
  4. {fleet_python-0.2.23 → fleet_python-0.2.25}/fleet/_async/env/client.py +5 -1
  5. {fleet_python-0.2.23 → fleet_python-0.2.25}/fleet/_async/models.py +6 -0
  6. {fleet_python-0.2.23 → fleet_python-0.2.25}/fleet/_async/verifiers/verifier.py +5 -0
  7. {fleet_python-0.2.23 → fleet_python-0.2.25}/fleet/client.py +15 -0
  8. {fleet_python-0.2.23 → fleet_python-0.2.25}/fleet/config.py +1 -1
  9. {fleet_python-0.2.23 → fleet_python-0.2.25}/fleet/env/__init__.py +4 -1
  10. {fleet_python-0.2.23 → fleet_python-0.2.25}/fleet/env/client.py +5 -1
  11. {fleet_python-0.2.23 → fleet_python-0.2.25}/fleet/models.py +6 -0
  12. {fleet_python-0.2.23 → fleet_python-0.2.25}/fleet/verifiers/verifier.py +5 -0
  13. {fleet_python-0.2.23 → fleet_python-0.2.25}/fleet_python.egg-info/PKG-INFO +1 -1
  14. {fleet_python-0.2.23 → fleet_python-0.2.25}/pyproject.toml +2 -1
  15. {fleet_python-0.2.23 → fleet_python-0.2.25}/LICENSE +0 -0
  16. {fleet_python-0.2.23 → fleet_python-0.2.25}/README.md +0 -0
  17. {fleet_python-0.2.23 → fleet_python-0.2.25}/examples/diff_example.py +0 -0
  18. {fleet_python-0.2.23 → fleet_python-0.2.25}/examples/dsl_example.py +0 -0
  19. {fleet_python-0.2.23 → fleet_python-0.2.25}/examples/example.py +0 -0
  20. {fleet_python-0.2.23 → fleet_python-0.2.25}/examples/example_action_log.py +0 -0
  21. {fleet_python-0.2.23 → fleet_python-0.2.25}/examples/example_client.py +0 -0
  22. {fleet_python-0.2.23 → fleet_python-0.2.25}/examples/example_mcp_anthropic.py +0 -0
  23. {fleet_python-0.2.23 → fleet_python-0.2.25}/examples/example_mcp_openai.py +0 -0
  24. {fleet_python-0.2.23 → fleet_python-0.2.25}/examples/example_sync.py +0 -0
  25. {fleet_python-0.2.23 → fleet_python-0.2.25}/examples/example_task.py +0 -0
  26. {fleet_python-0.2.23 → fleet_python-0.2.25}/examples/example_verifier.py +0 -0
  27. {fleet_python-0.2.23 → fleet_python-0.2.25}/examples/gemini_example.py +0 -0
  28. {fleet_python-0.2.23 → fleet_python-0.2.25}/examples/json_tasks_example.py +0 -0
  29. {fleet_python-0.2.23 → fleet_python-0.2.25}/examples/nova_act_example.py +0 -0
  30. {fleet_python-0.2.23 → fleet_python-0.2.25}/examples/openai_example.py +0 -0
  31. {fleet_python-0.2.23 → fleet_python-0.2.25}/examples/openai_simple_example.py +0 -0
  32. {fleet_python-0.2.23 → fleet_python-0.2.25}/examples/query_builder_example.py +0 -0
  33. {fleet_python-0.2.23 → fleet_python-0.2.25}/examples/quickstart.py +0 -0
  34. {fleet_python-0.2.23 → fleet_python-0.2.25}/fleet/_async/__init__.py +0 -0
  35. {fleet_python-0.2.23 → fleet_python-0.2.25}/fleet/_async/base.py +0 -0
  36. {fleet_python-0.2.23 → fleet_python-0.2.25}/fleet/_async/env/__init__.py +0 -0
  37. {fleet_python-0.2.23 → fleet_python-0.2.25}/fleet/_async/exceptions.py +0 -0
  38. {fleet_python-0.2.23 → fleet_python-0.2.25}/fleet/_async/instance/__init__.py +0 -0
  39. {fleet_python-0.2.23 → fleet_python-0.2.25}/fleet/_async/instance/base.py +0 -0
  40. {fleet_python-0.2.23 → fleet_python-0.2.25}/fleet/_async/instance/client.py +0 -0
  41. {fleet_python-0.2.23 → fleet_python-0.2.25}/fleet/_async/resources/__init__.py +0 -0
  42. {fleet_python-0.2.23 → fleet_python-0.2.25}/fleet/_async/resources/base.py +0 -0
  43. {fleet_python-0.2.23 → fleet_python-0.2.25}/fleet/_async/resources/browser.py +0 -0
  44. {fleet_python-0.2.23 → fleet_python-0.2.25}/fleet/_async/resources/sqlite.py +0 -0
  45. {fleet_python-0.2.23 → fleet_python-0.2.25}/fleet/_async/tasks.py +0 -0
  46. {fleet_python-0.2.23 → fleet_python-0.2.25}/fleet/_async/verifiers/__init__.py +0 -0
  47. {fleet_python-0.2.23 → fleet_python-0.2.25}/fleet/_async/verifiers/bundler.py +0 -0
  48. {fleet_python-0.2.23 → fleet_python-0.2.25}/fleet/base.py +0 -0
  49. {fleet_python-0.2.23 → fleet_python-0.2.25}/fleet/exceptions.py +0 -0
  50. {fleet_python-0.2.23 → fleet_python-0.2.25}/fleet/instance/__init__.py +0 -0
  51. {fleet_python-0.2.23 → fleet_python-0.2.25}/fleet/instance/base.py +0 -0
  52. {fleet_python-0.2.23 → fleet_python-0.2.25}/fleet/instance/client.py +0 -0
  53. {fleet_python-0.2.23 → fleet_python-0.2.25}/fleet/instance/models.py +0 -0
  54. {fleet_python-0.2.23 → fleet_python-0.2.25}/fleet/resources/__init__.py +0 -0
  55. {fleet_python-0.2.23 → fleet_python-0.2.25}/fleet/resources/base.py +0 -0
  56. {fleet_python-0.2.23 → fleet_python-0.2.25}/fleet/resources/browser.py +0 -0
  57. {fleet_python-0.2.23 → fleet_python-0.2.25}/fleet/resources/mcp.py +0 -0
  58. {fleet_python-0.2.23 → fleet_python-0.2.25}/fleet/resources/sqlite.py +0 -0
  59. {fleet_python-0.2.23 → fleet_python-0.2.25}/fleet/tasks.py +0 -0
  60. {fleet_python-0.2.23 → fleet_python-0.2.25}/fleet/types.py +0 -0
  61. {fleet_python-0.2.23 → fleet_python-0.2.25}/fleet/verifiers/__init__.py +0 -0
  62. {fleet_python-0.2.23 → fleet_python-0.2.25}/fleet/verifiers/bundler.py +0 -0
  63. {fleet_python-0.2.23 → fleet_python-0.2.25}/fleet/verifiers/code.py +0 -0
  64. {fleet_python-0.2.23 → fleet_python-0.2.25}/fleet/verifiers/db.py +0 -0
  65. {fleet_python-0.2.23 → fleet_python-0.2.25}/fleet/verifiers/decorator.py +0 -0
  66. {fleet_python-0.2.23 → fleet_python-0.2.25}/fleet/verifiers/parse.py +0 -0
  67. {fleet_python-0.2.23 → fleet_python-0.2.25}/fleet/verifiers/sql_differ.py +0 -0
  68. {fleet_python-0.2.23 → fleet_python-0.2.25}/fleet_python.egg-info/SOURCES.txt +0 -0
  69. {fleet_python-0.2.23 → fleet_python-0.2.25}/fleet_python.egg-info/dependency_links.txt +0 -0
  70. {fleet_python-0.2.23 → fleet_python-0.2.25}/fleet_python.egg-info/requires.txt +0 -0
  71. {fleet_python-0.2.23 → fleet_python-0.2.25}/fleet_python.egg-info/top_level.txt +0 -0
  72. {fleet_python-0.2.23 → fleet_python-0.2.25}/scripts/fix_sync_imports.py +0 -0
  73. {fleet_python-0.2.23 → fleet_python-0.2.25}/scripts/unasync.py +0 -0
  74. {fleet_python-0.2.23 → fleet_python-0.2.25}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fleet-python
3
- Version: 0.2.23
3
+ Version: 0.2.25
4
4
  Summary: Python SDK for Fleet environments
5
5
  Author-email: Fleet AI <nic@fleet.so>
6
6
  License: Apache-2.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
- "InstanceRecord",
65
+ "InstanceResponse",
66
+ "SyncEnv",
66
67
  "Resource",
67
68
  "ResetResponse",
68
69
  # Task models
@@ -29,6 +29,7 @@ from ..models import (
29
29
  VerifiersCheckResponse,
30
30
  VerifiersExecuteResponse,
31
31
  TaskListResponse,
32
+ AccountResponse,
32
33
  )
33
34
  from .tasks import Task
34
35
 
@@ -124,6 +125,7 @@ class AsyncEnv(EnvironmentBase):
124
125
  key: str,
125
126
  function_name: str,
126
127
  args: tuple,
128
+ args_array: list,
127
129
  kwargs: dict,
128
130
  timeout: Optional[int] = 30,
129
131
  needs_upload: bool = True,
@@ -135,6 +137,7 @@ class AsyncEnv(EnvironmentBase):
135
137
  key,
136
138
  function_name,
137
139
  args,
140
+ args_array,
138
141
  kwargs,
139
142
  timeout,
140
143
  needs_upload
@@ -199,6 +202,7 @@ class AsyncFleet:
199
202
  json=request.model_dump(),
200
203
  base_url=region_base_url,
201
204
  )
205
+
202
206
  instance = AsyncEnv(client=self.client, **response.json())
203
207
  await instance.instance.load()
204
208
  return instance
@@ -268,6 +272,15 @@ class AsyncFleet:
268
272
 
269
273
  return tasks
270
274
 
275
+ async def account(self) -> AccountResponse:
276
+ """Get account information including instance limits and usage.
277
+
278
+ Returns:
279
+ AccountResponse containing team_id, team_name, instance_limit, and instance_count
280
+ """
281
+ response = await self.client.request("GET", "/v1/account")
282
+ return AccountResponse(**response.json())
283
+
271
284
 
272
285
  # Shared
273
286
  async def _delete_instance(client: AsyncWrapper, instance_id: str) -> InstanceResponse:
@@ -289,6 +302,7 @@ async def _execute_verifier_remote(
289
302
  key: str,
290
303
  function_name: str,
291
304
  args: tuple,
305
+ args_array: list,
292
306
  kwargs: dict,
293
307
  timeout: Optional[int] = 30,
294
308
  needs_upload: bool = True,
@@ -304,6 +318,7 @@ async def _execute_verifier_remote(
304
318
  "key": key,
305
319
  "sha256": bundle_sha,
306
320
  "args": args_kwargs_b64,
321
+ "args_array": args_array,
307
322
  "function_name": function_name,
308
323
  "timeout": timeout,
309
324
  "region": "us-west-1", # TODO: make configurable
@@ -1,5 +1,5 @@
1
1
  from ..client import AsyncFleet, AsyncEnv
2
- from ...models import Environment as EnvironmentModel
2
+ from ...models import Environment as EnvironmentModel, AccountResponse
3
3
  from typing import List, Optional
4
4
 
5
5
 
@@ -23,3 +23,7 @@ async def list_instances_async(
23
23
 
24
24
  async def get_async(instance_id: str) -> AsyncEnv:
25
25
  return await AsyncFleet().instance(instance_id)
26
+
27
+
28
+ async def account_async() -> AccountResponse:
29
+ return await AsyncFleet().account()
@@ -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
  )
@@ -29,6 +29,7 @@ from .models import (
29
29
  VerifiersCheckResponse,
30
30
  VerifiersExecuteResponse,
31
31
  TaskListResponse,
32
+ AccountResponse,
32
33
  )
33
34
  from .tasks import Task
34
35
 
@@ -124,6 +125,7 @@ class SyncEnv(EnvironmentBase):
124
125
  key: str,
125
126
  function_name: str,
126
127
  args: tuple,
128
+ args_array: list,
127
129
  kwargs: dict,
128
130
  timeout: Optional[int] = 30,
129
131
  needs_upload: bool = True,
@@ -135,6 +137,7 @@ class SyncEnv(EnvironmentBase):
135
137
  key,
136
138
  function_name,
137
139
  args,
140
+ args_array,
138
141
  kwargs,
139
142
  timeout,
140
143
  needs_upload
@@ -199,6 +202,7 @@ class Fleet:
199
202
  json=request.model_dump(),
200
203
  base_url=region_base_url,
201
204
  )
205
+
202
206
  instance = SyncEnv(client=self.client, **response.json())
203
207
  instance.instance.load()
204
208
  return instance
@@ -268,6 +272,15 @@ class Fleet:
268
272
 
269
273
  return tasks
270
274
 
275
+ def account(self) -> AccountResponse:
276
+ """Get account information including instance limits and usage.
277
+
278
+ Returns:
279
+ AccountResponse containing team_id, team_name, instance_limit, and instance_count
280
+ """
281
+ response = self.client.request("GET", "/v1/account")
282
+ return AccountResponse(**response.json())
283
+
271
284
 
272
285
  # Shared
273
286
  def _delete_instance(client: SyncWrapper, instance_id: str) -> InstanceResponse:
@@ -289,6 +302,7 @@ def _execute_verifier_remote(
289
302
  key: str,
290
303
  function_name: str,
291
304
  args: tuple,
305
+ args_array: list,
292
306
  kwargs: dict,
293
307
  timeout: Optional[int] = 30,
294
308
  needs_upload: bool = True,
@@ -304,6 +318,7 @@ def _execute_verifier_remote(
304
318
  "key": key,
305
319
  "sha256": bundle_sha,
306
320
  "args": args_kwargs_b64,
321
+ "args_array": args_array,
307
322
  "function_name": function_name,
308
323
  "timeout": timeout,
309
324
  "region": "us-west-1", # TODO: make configurable
@@ -1,5 +1,5 @@
1
1
  DEFAULT_MAX_RETRIES = 5
2
- DEFAULT_TIMEOUT = 300.0
2
+ DEFAULT_TIMEOUT = 60.0
3
3
 
4
4
  GLOBAL_BASE_URL = "https://orchestrator.fleetai.com"
5
5
  REGION_BASE_URL = {
@@ -1,6 +1,6 @@
1
1
  """Fleet env module - convenience functions for environment management."""
2
2
 
3
- from .client import make, list_envs, list_regions, get, list_instances
3
+ from .client import make, list_envs, list_regions, get, list_instances, account
4
4
 
5
5
  # Import async versions from _async
6
6
  from .._async.env.client import (
@@ -9,6 +9,7 @@ from .._async.env.client import (
9
9
  list_regions_async,
10
10
  get_async,
11
11
  list_instances_async,
12
+ account_async,
12
13
  )
13
14
 
14
15
  __all__ = [
@@ -22,4 +23,6 @@ __all__ = [
22
23
  "list_regions_async",
23
24
  "list_instances_async",
24
25
  "get_async",
26
+ "account",
27
+ "account_async",
25
28
  ]
@@ -1,5 +1,5 @@
1
1
  from ..client import Fleet, SyncEnv
2
- from ..models import Environment as EnvironmentModel
2
+ from ..models import Environment as EnvironmentModel, AccountResponse
3
3
  from typing import List, Optional
4
4
 
5
5
 
@@ -23,3 +23,7 @@ def list_instances(
23
23
 
24
24
  def get(instance_id: str) -> SyncEnv:
25
25
  return Fleet().instance(instance_id)
26
+
27
+
28
+ def account() -> AccountResponse:
29
+ return Fleet().account()
@@ -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')
@@ -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
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fleet-python
3
- Version: 0.2.23
3
+ Version: 0.2.25
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.23"
7
+ version = "0.2.25"
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