fleet-python 0.2.58__tar.gz → 0.2.59__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.59}/PKG-INFO +1 -1
- {fleet_python-0.2.58 → fleet_python-0.2.59}/fleet/__init__.py +4 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/fleet/_async/__init__.py +17 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/fleet/_async/client.py +23 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/fleet/_async/tasks.py +20 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/fleet/client.py +23 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/fleet/tasks.py +20 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/fleet_python.egg-info/PKG-INFO +1 -1
- {fleet_python-0.2.58 → fleet_python-0.2.59}/pyproject.toml +1 -1
- {fleet_python-0.2.58 → fleet_python-0.2.59}/LICENSE +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/README.md +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/examples/diff_example.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/examples/dsl_example.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/examples/example.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/examples/exampleResume.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/examples/example_account.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/examples/example_action_log.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/examples/example_client.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/examples/example_mcp_anthropic.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/examples/example_mcp_openai.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/examples/example_sync.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/examples/example_task.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/examples/example_tasks.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/examples/example_verifier.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/examples/export_tasks.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/examples/gemini_example.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/examples/import_tasks.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/examples/json_tasks_example.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/examples/nova_act_example.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/examples/openai_example.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/examples/openai_simple_example.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/examples/query_builder_example.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/examples/quickstart.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/examples/test_cdp_logging.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/fleet/_async/base.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/fleet/_async/env/__init__.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/fleet/_async/env/client.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/fleet/_async/exceptions.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/fleet/_async/global_client.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/fleet/_async/instance/__init__.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/fleet/_async/instance/base.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/fleet/_async/instance/client.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/fleet/_async/models.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/fleet/_async/resources/__init__.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/fleet/_async/resources/base.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/fleet/_async/resources/browser.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/fleet/_async/resources/mcp.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/fleet/_async/resources/sqlite.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/fleet/_async/verifiers/__init__.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/fleet/_async/verifiers/bundler.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/fleet/_async/verifiers/verifier.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/fleet/base.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/fleet/config.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/fleet/env/__init__.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/fleet/env/client.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/fleet/exceptions.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/fleet/global_client.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/fleet/instance/__init__.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/fleet/instance/base.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/fleet/instance/client.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/fleet/instance/models.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/fleet/models.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/fleet/resources/__init__.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/fleet/resources/base.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/fleet/resources/browser.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/fleet/resources/mcp.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/fleet/resources/sqlite.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/fleet/types.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/fleet/verifiers/__init__.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/fleet/verifiers/bundler.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/fleet/verifiers/code.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/fleet/verifiers/db.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/fleet/verifiers/decorator.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/fleet/verifiers/parse.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/fleet/verifiers/sql_differ.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/fleet/verifiers/verifier.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/fleet_python.egg-info/SOURCES.txt +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/fleet_python.egg-info/dependency_links.txt +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/fleet_python.egg-info/requires.txt +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/fleet_python.egg-info/top_level.txt +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/scripts/fix_sync_imports.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/scripts/unasync.py +0 -0
- {fleet_python-0.2.58 → fleet_python-0.2.59}/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,29 @@ 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
|
+
) -> TaskResponse:
|
|
725
|
+
"""Get a task by key and optional version.
|
|
726
|
+
|
|
727
|
+
Args:
|
|
728
|
+
task_key: The key of the task to retrieve
|
|
729
|
+
version_id: Optional version ID to filter by
|
|
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
|
+
|
|
738
|
+
response = await self.client.request(
|
|
739
|
+
"GET", f"/v1/tasks/{task_key}", params=params
|
|
740
|
+
)
|
|
741
|
+
return TaskResponse(**response.json())
|
|
742
|
+
|
|
720
743
|
async def _create_verifier_from_data(
|
|
721
744
|
self, verifier_id: str, verifier_key: str, verifier_code: str, verifier_sha: str
|
|
722
745
|
) -> "AsyncVerifierFunction":
|
|
@@ -389,6 +389,26 @@ async def update_task(
|
|
|
389
389
|
)
|
|
390
390
|
|
|
391
391
|
|
|
392
|
+
async def get_task(task_key: str, version_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
|
+
|
|
399
|
+
Returns:
|
|
400
|
+
TaskResponse containing the task details
|
|
401
|
+
|
|
402
|
+
Examples:
|
|
403
|
+
response = await fleet.get_task("my-task")
|
|
404
|
+
response = await fleet.get_task("my-task", version_id="v1")
|
|
405
|
+
"""
|
|
406
|
+
from .global_client import get_client
|
|
407
|
+
|
|
408
|
+
client = get_client()
|
|
409
|
+
return await client.get_task(task_key=task_key, version_id=version_id)
|
|
410
|
+
|
|
411
|
+
|
|
392
412
|
async def import_task(task: Task, project_key: Optional[str] = None):
|
|
393
413
|
"""Convenience function to import a single task.
|
|
394
414
|
|
|
@@ -715,6 +715,29 @@ 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
|
+
) -> TaskResponse:
|
|
723
|
+
"""Get a task by key and optional version.
|
|
724
|
+
|
|
725
|
+
Args:
|
|
726
|
+
task_key: The key of the task to retrieve
|
|
727
|
+
version_id: Optional version ID to filter by
|
|
728
|
+
|
|
729
|
+
Returns:
|
|
730
|
+
TaskResponse containing the task details
|
|
731
|
+
"""
|
|
732
|
+
params = {}
|
|
733
|
+
if version_id is not None:
|
|
734
|
+
params["version_id"] = version_id
|
|
735
|
+
|
|
736
|
+
response = self.client.request(
|
|
737
|
+
"GET", f"/v1/tasks/{task_key}", params=params
|
|
738
|
+
)
|
|
739
|
+
return TaskResponse(**response.json())
|
|
740
|
+
|
|
718
741
|
def _create_verifier_from_data(
|
|
719
742
|
self, verifier_id: str, verifier_key: str, verifier_code: str, verifier_sha: str
|
|
720
743
|
) -> "SyncVerifierFunction":
|
|
@@ -390,6 +390,26 @@ def update_task(
|
|
|
390
390
|
)
|
|
391
391
|
|
|
392
392
|
|
|
393
|
+
def get_task(task_key: str, version_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
|
+
|
|
400
|
+
Returns:
|
|
401
|
+
TaskResponse containing the task details
|
|
402
|
+
|
|
403
|
+
Examples:
|
|
404
|
+
response = fleet.get_task("my-task")
|
|
405
|
+
response = fleet.get_task("my-task", version_id="v1")
|
|
406
|
+
"""
|
|
407
|
+
from .global_client import get_client
|
|
408
|
+
|
|
409
|
+
client = get_client()
|
|
410
|
+
return client.get_task(task_key=task_key, version_id=version_id)
|
|
411
|
+
|
|
412
|
+
|
|
393
413
|
def import_task(task: Task, project_key: Optional[str] = None):
|
|
394
414
|
"""Convenience function to import a single task.
|
|
395
415
|
|
|
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
|