fleet-python 0.2.45__tar.gz → 0.2.46__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 (81) hide show
  1. {fleet_python-0.2.45 → fleet_python-0.2.46}/PKG-INFO +1 -1
  2. {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/_async/verifiers/verifier.py +6 -18
  3. {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/client.py +5 -0
  4. {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/verifiers/verifier.py +5 -18
  5. {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet_python.egg-info/PKG-INFO +1 -1
  6. {fleet_python-0.2.45 → fleet_python-0.2.46}/pyproject.toml +1 -1
  7. {fleet_python-0.2.45 → fleet_python-0.2.46}/LICENSE +0 -0
  8. {fleet_python-0.2.45 → fleet_python-0.2.46}/README.md +0 -0
  9. {fleet_python-0.2.45 → fleet_python-0.2.46}/examples/diff_example.py +0 -0
  10. {fleet_python-0.2.45 → fleet_python-0.2.46}/examples/dsl_example.py +0 -0
  11. {fleet_python-0.2.45 → fleet_python-0.2.46}/examples/example.py +0 -0
  12. {fleet_python-0.2.45 → fleet_python-0.2.46}/examples/exampleResume.py +0 -0
  13. {fleet_python-0.2.45 → fleet_python-0.2.46}/examples/example_account.py +0 -0
  14. {fleet_python-0.2.45 → fleet_python-0.2.46}/examples/example_action_log.py +0 -0
  15. {fleet_python-0.2.45 → fleet_python-0.2.46}/examples/example_client.py +0 -0
  16. {fleet_python-0.2.45 → fleet_python-0.2.46}/examples/example_mcp_anthropic.py +0 -0
  17. {fleet_python-0.2.45 → fleet_python-0.2.46}/examples/example_mcp_openai.py +0 -0
  18. {fleet_python-0.2.45 → fleet_python-0.2.46}/examples/example_sync.py +0 -0
  19. {fleet_python-0.2.45 → fleet_python-0.2.46}/examples/example_task.py +0 -0
  20. {fleet_python-0.2.45 → fleet_python-0.2.46}/examples/example_tasks.py +0 -0
  21. {fleet_python-0.2.45 → fleet_python-0.2.46}/examples/example_verifier.py +0 -0
  22. {fleet_python-0.2.45 → fleet_python-0.2.46}/examples/gemini_example.py +0 -0
  23. {fleet_python-0.2.45 → fleet_python-0.2.46}/examples/json_tasks_example.py +0 -0
  24. {fleet_python-0.2.45 → fleet_python-0.2.46}/examples/nova_act_example.py +0 -0
  25. {fleet_python-0.2.45 → fleet_python-0.2.46}/examples/openai_example.py +0 -0
  26. {fleet_python-0.2.45 → fleet_python-0.2.46}/examples/openai_simple_example.py +0 -0
  27. {fleet_python-0.2.45 → fleet_python-0.2.46}/examples/query_builder_example.py +0 -0
  28. {fleet_python-0.2.45 → fleet_python-0.2.46}/examples/quickstart.py +0 -0
  29. {fleet_python-0.2.45 → fleet_python-0.2.46}/examples/test_cdp_logging.py +0 -0
  30. {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/__init__.py +0 -0
  31. {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/_async/__init__.py +0 -0
  32. {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/_async/base.py +0 -0
  33. {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/_async/client.py +0 -0
  34. {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/_async/env/__init__.py +0 -0
  35. {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/_async/env/client.py +0 -0
  36. {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/_async/exceptions.py +0 -0
  37. {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/_async/global_client.py +0 -0
  38. {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/_async/instance/__init__.py +0 -0
  39. {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/_async/instance/base.py +0 -0
  40. {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/_async/instance/client.py +0 -0
  41. {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/_async/models.py +0 -0
  42. {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/_async/resources/__init__.py +0 -0
  43. {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/_async/resources/base.py +0 -0
  44. {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/_async/resources/browser.py +0 -0
  45. {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/_async/resources/mcp.py +0 -0
  46. {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/_async/resources/sqlite.py +0 -0
  47. {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/_async/tasks.py +0 -0
  48. {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/_async/verifiers/__init__.py +0 -0
  49. {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/_async/verifiers/bundler.py +0 -0
  50. {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/base.py +0 -0
  51. {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/config.py +0 -0
  52. {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/env/__init__.py +0 -0
  53. {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/env/client.py +0 -0
  54. {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/exceptions.py +0 -0
  55. {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/global_client.py +0 -0
  56. {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/instance/__init__.py +0 -0
  57. {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/instance/base.py +0 -0
  58. {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/instance/client.py +0 -0
  59. {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/instance/models.py +0 -0
  60. {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/models.py +0 -0
  61. {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/resources/__init__.py +0 -0
  62. {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/resources/base.py +0 -0
  63. {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/resources/browser.py +0 -0
  64. {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/resources/mcp.py +0 -0
  65. {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/resources/sqlite.py +0 -0
  66. {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/tasks.py +0 -0
  67. {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/types.py +0 -0
  68. {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/verifiers/__init__.py +0 -0
  69. {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/verifiers/bundler.py +0 -0
  70. {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/verifiers/code.py +0 -0
  71. {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/verifiers/db.py +0 -0
  72. {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/verifiers/decorator.py +0 -0
  73. {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/verifiers/parse.py +0 -0
  74. {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/verifiers/sql_differ.py +0 -0
  75. {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet_python.egg-info/SOURCES.txt +0 -0
  76. {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet_python.egg-info/dependency_links.txt +0 -0
  77. {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet_python.egg-info/requires.txt +0 -0
  78. {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet_python.egg-info/top_level.txt +0 -0
  79. {fleet_python-0.2.45 → fleet_python-0.2.46}/scripts/fix_sync_imports.py +0 -0
  80. {fleet_python-0.2.45 → fleet_python-0.2.46}/scripts/unasync.py +0 -0
  81. {fleet_python-0.2.45 → fleet_python-0.2.46}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fleet-python
3
- Version: 0.2.45
3
+ Version: 0.2.46
4
4
  Summary: Python SDK for Fleet environments
5
5
  Author-email: Fleet AI <nic@fleet.so>
6
6
  License: Apache-2.0
@@ -12,7 +12,7 @@ import uuid
12
12
  import logging
13
13
  import hashlib
14
14
  import asyncio
15
- from typing import Any, Callable, Dict, Optional, List, TypeVar, Set, Tuple
15
+ from typing import Any, Callable, Dict, Optional, List, TypeVar, Tuple
16
16
 
17
17
  from .bundler import FunctionBundler
18
18
  from ..client import AsyncEnv
@@ -21,8 +21,7 @@ logger = logging.getLogger(__name__)
21
21
 
22
22
  F = TypeVar("F", bound=Callable[..., Any])
23
23
 
24
- # Global cache to track which bundle SHAs have been uploaded to S3
25
- _uploaded_bundle_shas: Set[str] = set()
24
+ # Removed global cache - always check server for bundle status
26
25
 
27
26
 
28
27
  @functools.lru_cache(maxsize=128)
@@ -107,25 +106,16 @@ class AsyncVerifierFunction:
107
106
  logger.debug(f"Using server-side bundle {bundle_sha[:8]}...")
108
107
  return bundle_sha, False # No upload needed, server has it
109
108
 
110
- # 1. Check local process cache first
111
- if bundle_sha in _uploaded_bundle_shas:
112
- logger.debug(f"Bundle {bundle_sha[:8]}... found in local cache")
113
- return bundle_sha, False # Already uploaded, no upload needed
114
-
115
- # 2. Check if bundle exists on server (pseudocode)
116
- # TODO: Add endpoint to check if bundle SHA exists in S3
109
+ # Always check if bundle exists on server
117
110
  try:
118
111
  exists = await env.check_bundle_exists(bundle_sha)
119
112
  if exists.success:
120
- logger.info(
121
- f"Bundle {bundle_sha[:8]}... found on server, updating cache"
122
- )
123
- _uploaded_bundle_shas.add(bundle_sha)
113
+ logger.info(f"Bundle {bundle_sha[:8]}... found on server")
124
114
  return bundle_sha, False # Found on server, no upload needed
125
115
  except Exception as e:
126
116
  logger.warning(f"Failed to check bundle existence: {e}")
127
117
 
128
- # 3. Bundle not found locally or on server - upload needed
118
+ # Bundle not found on server - upload needed
129
119
  logger.info(f"Bundle {bundle_sha[:8]}... needs to be uploaded")
130
120
  return bundle_sha, True # Upload needed
131
121
 
@@ -194,9 +184,7 @@ class AsyncVerifierFunction:
194
184
  needs_upload=True,
195
185
  )
196
186
 
197
- # Mark as uploaded after successful execution
198
- _uploaded_bundle_shas.add(bundle_sha)
199
- logger.debug(f"Registered bundle {bundle_sha[:8]}... as uploaded")
187
+ logger.debug(f"Bundle {bundle_sha[:8]}... uploaded successfully")
200
188
 
201
189
  else:
202
190
  # Bundle already available - execute without upload
@@ -579,6 +579,8 @@ class Fleet:
579
579
  task = Task(**task_data)
580
580
  tasks.append(task)
581
581
 
582
+ responses = []
583
+
582
584
  for task in tasks:
583
585
  payload = TaskRequest(
584
586
  key=task.key,
@@ -592,10 +594,13 @@ class Fleet:
592
594
  response = self.client.request(
593
595
  "POST", "/v1/tasks", json=payload.model_dump()
594
596
  )
597
+ responses.append(response)
595
598
  except Exception as e:
596
599
  logger.error(f"Failed to import task {task.key}: {e}")
597
600
  continue
598
601
 
602
+ return responses
603
+
599
604
  def account(self) -> AccountResponse:
600
605
  """Get account information including instance limits and usage.
601
606
 
@@ -19,7 +19,6 @@ from typing import (
19
19
  Optional,
20
20
  List,
21
21
  TypeVar,
22
- Set,
23
22
  TYPE_CHECKING,
24
23
  Tuple,
25
24
  )
@@ -33,8 +32,7 @@ logger = logging.getLogger(__name__)
33
32
 
34
33
  F = TypeVar("F", bound=Callable[..., Any])
35
34
 
36
- # Global cache to track which bundle SHAs have been uploaded to S3
37
- _uploaded_bundle_shas: Set[str] = set()
35
+ # Removed global cache - always check server for bundle status
38
36
 
39
37
 
40
38
  @functools.lru_cache(maxsize=128)
@@ -119,25 +117,16 @@ class SyncVerifierFunction:
119
117
  logger.debug(f"Using server-side bundle {bundle_sha[:8]}...")
120
118
  return bundle_sha, False # No upload needed, server has it
121
119
 
122
- # 1. Check local process cache first
123
- if bundle_sha in _uploaded_bundle_shas:
124
- logger.debug(f"Bundle {bundle_sha[:8]}... found in local cache")
125
- return bundle_sha, False # Already uploaded, no upload needed
126
-
127
- # 2. Check if bundle exists on server (pseudocode)
128
- # TODO: Add endpoint to check if bundle SHA exists in S3
120
+ # Always check if bundle exists on server
129
121
  try:
130
122
  exists = env.check_bundle_exists(bundle_sha)
131
123
  if exists.success:
132
- logger.info(
133
- f"Bundle {bundle_sha[:8]}... found on server, updating cache"
134
- )
135
- _uploaded_bundle_shas.add(bundle_sha)
124
+ logger.info(f"Bundle {bundle_sha[:8]}... found on server")
136
125
  return bundle_sha, False # Found on server, no upload needed
137
126
  except Exception as e:
138
127
  logger.warning(f"Failed to check bundle existence: {e}")
139
128
 
140
- # 3. Bundle not found locally or on server - upload needed
129
+ # Bundle not found on server - upload needed
141
130
  logger.info(f"Bundle {bundle_sha[:8]}... needs to be uploaded")
142
131
  return bundle_sha, True # Upload needed
143
132
 
@@ -206,9 +195,7 @@ class SyncVerifierFunction:
206
195
  needs_upload=True,
207
196
  )
208
197
 
209
- # Mark as uploaded after successful execution
210
- _uploaded_bundle_shas.add(bundle_sha)
211
- logger.debug(f"Registered bundle {bundle_sha[:8]}... as uploaded")
198
+ logger.debug(f"Bundle {bundle_sha[:8]}... uploaded successfully")
212
199
 
213
200
  else:
214
201
  # Bundle already available - execute without upload
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fleet-python
3
- Version: 0.2.45
3
+ Version: 0.2.46
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.45"
7
+ version = "0.2.46"
8
8
  description = "Python SDK for Fleet environments"
9
9
  authors = [
10
10
  {name = "Fleet AI", email = "nic@fleet.so"},
File without changes
File without changes
File without changes