fleet-python 0.2.58__tar.gz → 0.2.60__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.58 → fleet_python-0.2.60}/PKG-INFO +1 -1
- {fleet_python-0.2.58 → fleet_python-0.2.60}/fleet/__init__.py +4 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/fleet/_async/__init__.py +17 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/fleet/_async/client.py +27 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/fleet/_async/tasks.py +22 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/fleet/client.py +27 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/fleet/tasks.py +22 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/fleet_python.egg-info/PKG-INFO +1 -1
- {fleet_python-0.2.58 → fleet_python-0.2.60}/pyproject.toml +2 -2
- {fleet_python-0.2.58 → fleet_python-0.2.60}/LICENSE +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/README.md +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/examples/diff_example.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/examples/dsl_example.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/examples/example.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/examples/exampleResume.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/examples/example_account.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/examples/example_action_log.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/examples/example_client.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/examples/example_mcp_anthropic.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/examples/example_mcp_openai.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/examples/example_sync.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/examples/example_task.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/examples/example_tasks.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/examples/example_verifier.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/examples/export_tasks.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/examples/gemini_example.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/examples/import_tasks.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/examples/json_tasks_example.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/examples/nova_act_example.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/examples/openai_example.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/examples/openai_simple_example.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/examples/query_builder_example.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/examples/quickstart.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/examples/test_cdp_logging.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/fleet/_async/base.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/fleet/_async/env/__init__.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/fleet/_async/env/client.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/fleet/_async/exceptions.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/fleet/_async/global_client.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/fleet/_async/instance/__init__.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/fleet/_async/instance/base.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/fleet/_async/instance/client.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/fleet/_async/models.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/fleet/_async/resources/__init__.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/fleet/_async/resources/base.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/fleet/_async/resources/browser.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/fleet/_async/resources/mcp.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/fleet/_async/resources/sqlite.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/fleet/_async/verifiers/__init__.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/fleet/_async/verifiers/bundler.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/fleet/_async/verifiers/verifier.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/fleet/base.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/fleet/config.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/fleet/env/__init__.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/fleet/env/client.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/fleet/exceptions.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/fleet/global_client.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/fleet/instance/__init__.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/fleet/instance/base.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/fleet/instance/client.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/fleet/instance/models.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/fleet/models.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/fleet/resources/__init__.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/fleet/resources/base.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/fleet/resources/browser.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/fleet/resources/mcp.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/fleet/resources/sqlite.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/fleet/types.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/fleet/verifiers/__init__.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/fleet/verifiers/bundler.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/fleet/verifiers/code.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/fleet/verifiers/db.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/fleet/verifiers/decorator.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/fleet/verifiers/parse.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/fleet/verifiers/sql_differ.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/fleet/verifiers/verifier.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/fleet_python.egg-info/SOURCES.txt +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/fleet_python.egg-info/dependency_links.txt +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/fleet_python.egg-info/requires.txt +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/fleet_python.egg-info/top_level.txt +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/scripts/fix_sync_imports.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/scripts/unasync.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.60}/setup.cfg +0 -0
|
@@ -53,6 +53,7 @@ from ._async.tasks import (
|
|
|
53
53
|
load_tasks_from_file as load_tasks_from_file_async,
|
|
54
54
|
import_task as import_task_async,
|
|
55
55
|
import_tasks as import_tasks_async,
|
|
56
|
+
get_task as get_task_async,
|
|
56
57
|
)
|
|
57
58
|
|
|
58
59
|
# Import sync task functions
|
|
@@ -61,6 +62,7 @@ from .tasks import (
|
|
|
61
62
|
load_tasks_from_file,
|
|
62
63
|
import_task,
|
|
63
64
|
import_tasks,
|
|
65
|
+
get_task,
|
|
64
66
|
)
|
|
65
67
|
|
|
66
68
|
# Import shared types
|
|
@@ -117,6 +119,8 @@ __all__ = [
|
|
|
117
119
|
"import_task_async",
|
|
118
120
|
"import_tasks",
|
|
119
121
|
"import_tasks_async",
|
|
122
|
+
"get_task",
|
|
123
|
+
"get_task_async",
|
|
120
124
|
# Version
|
|
121
125
|
"__version__",
|
|
122
126
|
]
|
|
@@ -89,6 +89,7 @@ __all__ = [
|
|
|
89
89
|
"import_task",
|
|
90
90
|
"import_tasks",
|
|
91
91
|
"account",
|
|
92
|
+
"get_task",
|
|
92
93
|
# Version
|
|
93
94
|
"__version__",
|
|
94
95
|
]
|
|
@@ -228,6 +229,22 @@ async def account() -> AccountResponse:
|
|
|
228
229
|
return await _async_global_client.get_client().account()
|
|
229
230
|
|
|
230
231
|
|
|
232
|
+
async def get_task(task_key: str, version_id: Optional[str] = None):
|
|
233
|
+
"""Get a task by key and optional version.
|
|
234
|
+
|
|
235
|
+
Args:
|
|
236
|
+
task_key: The key of the task to retrieve
|
|
237
|
+
version_id: Optional version ID to filter by
|
|
238
|
+
|
|
239
|
+
Example:
|
|
240
|
+
task = await fleet.get_task("my-task")
|
|
241
|
+
task = await fleet.get_task("my-task", version_id="v1")
|
|
242
|
+
"""
|
|
243
|
+
return await _async_global_client.get_client().get_task(
|
|
244
|
+
task_key=task_key, version_id=version_id
|
|
245
|
+
)
|
|
246
|
+
|
|
247
|
+
|
|
231
248
|
def configure(
|
|
232
249
|
api_key: Optional[str] = None,
|
|
233
250
|
base_url: Optional[str] = None,
|
|
@@ -717,6 +717,33 @@ class AsyncFleet:
|
|
|
717
717
|
)
|
|
718
718
|
return TaskResponse(**response.json())
|
|
719
719
|
|
|
720
|
+
async def get_task(
|
|
721
|
+
self,
|
|
722
|
+
task_key: str,
|
|
723
|
+
version_id: Optional[str] = None,
|
|
724
|
+
team_id: Optional[str] = None,
|
|
725
|
+
) -> TaskResponse:
|
|
726
|
+
"""Get a task by key and optional version.
|
|
727
|
+
|
|
728
|
+
Args:
|
|
729
|
+
task_key: The key of the task to retrieve
|
|
730
|
+
version_id: Optional version ID to filter by
|
|
731
|
+
team_id: Optional team_id to filter by (admin only)
|
|
732
|
+
|
|
733
|
+
Returns:
|
|
734
|
+
TaskResponse containing the task details
|
|
735
|
+
"""
|
|
736
|
+
params = {}
|
|
737
|
+
if version_id is not None:
|
|
738
|
+
params["version_id"] = version_id
|
|
739
|
+
if team_id is not None:
|
|
740
|
+
params["team_id"] = team_id
|
|
741
|
+
|
|
742
|
+
response = await self.client.request(
|
|
743
|
+
"GET", f"/v1/tasks/{task_key}", params=params
|
|
744
|
+
)
|
|
745
|
+
return TaskResponse(**response.json())
|
|
746
|
+
|
|
720
747
|
async def _create_verifier_from_data(
|
|
721
748
|
self, verifier_id: str, verifier_key: str, verifier_code: str, verifier_sha: str
|
|
722
749
|
) -> "AsyncVerifierFunction":
|
|
@@ -389,6 +389,28 @@ async def update_task(
|
|
|
389
389
|
)
|
|
390
390
|
|
|
391
391
|
|
|
392
|
+
async def get_task(task_key: str, version_id: Optional[str] = None, team_id: Optional[str] = None):
|
|
393
|
+
"""Convenience function to get a task by key and optional version.
|
|
394
|
+
|
|
395
|
+
Args:
|
|
396
|
+
task_key: The key of the task to retrieve
|
|
397
|
+
version_id: Optional version ID to filter by
|
|
398
|
+
team_id: Optional team_id to filter by (admin only)
|
|
399
|
+
|
|
400
|
+
Returns:
|
|
401
|
+
TaskResponse containing the task details
|
|
402
|
+
|
|
403
|
+
Examples:
|
|
404
|
+
response = await fleet.get_task("my-task")
|
|
405
|
+
response = await fleet.get_task("my-task", version_id="v1")
|
|
406
|
+
response = await fleet.get_task("my-task", team_id="team-123")
|
|
407
|
+
"""
|
|
408
|
+
from .global_client import get_client
|
|
409
|
+
|
|
410
|
+
client = get_client()
|
|
411
|
+
return await client.get_task(task_key=task_key, version_id=version_id, team_id=team_id)
|
|
412
|
+
|
|
413
|
+
|
|
392
414
|
async def import_task(task: Task, project_key: Optional[str] = None):
|
|
393
415
|
"""Convenience function to import a single task.
|
|
394
416
|
|
|
@@ -715,6 +715,33 @@ class Fleet:
|
|
|
715
715
|
)
|
|
716
716
|
return TaskResponse(**response.json())
|
|
717
717
|
|
|
718
|
+
def get_task(
|
|
719
|
+
self,
|
|
720
|
+
task_key: str,
|
|
721
|
+
version_id: Optional[str] = None,
|
|
722
|
+
team_id: Optional[str] = None,
|
|
723
|
+
) -> TaskResponse:
|
|
724
|
+
"""Get a task by key and optional version.
|
|
725
|
+
|
|
726
|
+
Args:
|
|
727
|
+
task_key: The key of the task to retrieve
|
|
728
|
+
version_id: Optional version ID to filter by
|
|
729
|
+
team_id: Optional team_id to filter by (admin only)
|
|
730
|
+
|
|
731
|
+
Returns:
|
|
732
|
+
TaskResponse containing the task details
|
|
733
|
+
"""
|
|
734
|
+
params = {}
|
|
735
|
+
if version_id is not None:
|
|
736
|
+
params["version_id"] = version_id
|
|
737
|
+
if team_id is not None:
|
|
738
|
+
params["team_id"] = team_id
|
|
739
|
+
|
|
740
|
+
response = self.client.request(
|
|
741
|
+
"GET", f"/v1/tasks/{task_key}", params=params
|
|
742
|
+
)
|
|
743
|
+
return TaskResponse(**response.json())
|
|
744
|
+
|
|
718
745
|
def _create_verifier_from_data(
|
|
719
746
|
self, verifier_id: str, verifier_key: str, verifier_code: str, verifier_sha: str
|
|
720
747
|
) -> "SyncVerifierFunction":
|
|
@@ -390,6 +390,28 @@ def update_task(
|
|
|
390
390
|
)
|
|
391
391
|
|
|
392
392
|
|
|
393
|
+
def get_task(task_key: str, version_id: Optional[str] = None, team_id: Optional[str] = None):
|
|
394
|
+
"""Convenience function to get a task by key and optional version.
|
|
395
|
+
|
|
396
|
+
Args:
|
|
397
|
+
task_key: The key of the task to retrieve
|
|
398
|
+
version_id: Optional version ID to filter by
|
|
399
|
+
team_id: Optional team_id to filter by (admin only)
|
|
400
|
+
|
|
401
|
+
Returns:
|
|
402
|
+
TaskResponse containing the task details
|
|
403
|
+
|
|
404
|
+
Examples:
|
|
405
|
+
response = fleet.get_task("my-task")
|
|
406
|
+
response = fleet.get_task("my-task", version_id="v1")
|
|
407
|
+
response = fleet.get_task("my-task", team_id="team-123")
|
|
408
|
+
"""
|
|
409
|
+
from .global_client import get_client
|
|
410
|
+
|
|
411
|
+
client = get_client()
|
|
412
|
+
return client.get_task(task_key=task_key, version_id=version_id, team_id=team_id)
|
|
413
|
+
|
|
414
|
+
|
|
393
415
|
def import_task(task: Task, project_key: Optional[str] = None):
|
|
394
416
|
"""Convenience function to import a single task.
|
|
395
417
|
|
|
@@ -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.60"
|
|
8
8
|
description = "Python SDK for Fleet environments"
|
|
9
9
|
authors = [
|
|
10
10
|
{name = "Fleet AI", email = "nic@fleet.so"},
|
|
@@ -113,4 +113,4 @@ testpaths = ["tests"]
|
|
|
113
113
|
"httpx.AsyncClient" = "httpx.Client"
|
|
114
114
|
"httpx.AsyncHTTPTransport" = "httpx.HTTPTransport"
|
|
115
115
|
"httpx.SyncHTTPTransport" = "httpx.HTTPTransport"
|
|
116
|
-
"aiohttp" = "httpx"
|
|
116
|
+
"aiohttp" = "httpx"
|
|
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
|
|
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
|