fleet-python 0.2.77__tar.gz → 0.2.78__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.
Files changed (92) hide show
  1. {fleet_python-0.2.77/fleet_python.egg-info → fleet_python-0.2.78}/PKG-INFO +1 -1
  2. {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/_async/resources/sqlite.py +44 -0
  3. {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/resources/sqlite.py +44 -0
  4. {fleet_python-0.2.77 → fleet_python-0.2.78/fleet_python.egg-info}/PKG-INFO +1 -1
  5. {fleet_python-0.2.77 → fleet_python-0.2.78}/pyproject.toml +1 -1
  6. {fleet_python-0.2.77 → fleet_python-0.2.78}/LICENSE +0 -0
  7. {fleet_python-0.2.77 → fleet_python-0.2.78}/README.md +0 -0
  8. {fleet_python-0.2.77 → fleet_python-0.2.78}/examples/diff_example.py +0 -0
  9. {fleet_python-0.2.77 → fleet_python-0.2.78}/examples/dsl_example.py +0 -0
  10. {fleet_python-0.2.77 → fleet_python-0.2.78}/examples/example.py +0 -0
  11. {fleet_python-0.2.77 → fleet_python-0.2.78}/examples/exampleResume.py +0 -0
  12. {fleet_python-0.2.77 → fleet_python-0.2.78}/examples/example_account.py +0 -0
  13. {fleet_python-0.2.77 → fleet_python-0.2.78}/examples/example_action_log.py +0 -0
  14. {fleet_python-0.2.77 → fleet_python-0.2.78}/examples/example_client.py +0 -0
  15. {fleet_python-0.2.77 → fleet_python-0.2.78}/examples/example_mcp_anthropic.py +0 -0
  16. {fleet_python-0.2.77 → fleet_python-0.2.78}/examples/example_mcp_openai.py +0 -0
  17. {fleet_python-0.2.77 → fleet_python-0.2.78}/examples/example_sync.py +0 -0
  18. {fleet_python-0.2.77 → fleet_python-0.2.78}/examples/example_task.py +0 -0
  19. {fleet_python-0.2.77 → fleet_python-0.2.78}/examples/example_tasks.py +0 -0
  20. {fleet_python-0.2.77 → fleet_python-0.2.78}/examples/example_verifier.py +0 -0
  21. {fleet_python-0.2.77 → fleet_python-0.2.78}/examples/export_tasks.py +0 -0
  22. {fleet_python-0.2.77 → fleet_python-0.2.78}/examples/fetch_tasks.py +0 -0
  23. {fleet_python-0.2.77 → fleet_python-0.2.78}/examples/gemini_example.py +0 -0
  24. {fleet_python-0.2.77 → fleet_python-0.2.78}/examples/import_tasks.py +0 -0
  25. {fleet_python-0.2.77 → fleet_python-0.2.78}/examples/iterate_verifiers.py +0 -0
  26. {fleet_python-0.2.77 → fleet_python-0.2.78}/examples/json_tasks_example.py +0 -0
  27. {fleet_python-0.2.77 → fleet_python-0.2.78}/examples/nova_act_example.py +0 -0
  28. {fleet_python-0.2.77 → fleet_python-0.2.78}/examples/openai_example.py +0 -0
  29. {fleet_python-0.2.77 → fleet_python-0.2.78}/examples/openai_simple_example.py +0 -0
  30. {fleet_python-0.2.77 → fleet_python-0.2.78}/examples/query_builder_example.py +0 -0
  31. {fleet_python-0.2.77 → fleet_python-0.2.78}/examples/quickstart.py +0 -0
  32. {fleet_python-0.2.77 → fleet_python-0.2.78}/examples/test_cdp_logging.py +0 -0
  33. {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/__init__.py +0 -0
  34. {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/_async/__init__.py +0 -0
  35. {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/_async/base.py +0 -0
  36. {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/_async/client.py +0 -0
  37. {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/_async/env/__init__.py +0 -0
  38. {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/_async/env/client.py +0 -0
  39. {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/_async/exceptions.py +0 -0
  40. {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/_async/global_client.py +0 -0
  41. {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/_async/instance/__init__.py +0 -0
  42. {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/_async/instance/base.py +0 -0
  43. {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/_async/instance/client.py +0 -0
  44. {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/_async/models.py +0 -0
  45. {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/_async/resources/__init__.py +0 -0
  46. {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/_async/resources/base.py +0 -0
  47. {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/_async/resources/browser.py +0 -0
  48. {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/_async/resources/mcp.py +0 -0
  49. {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/_async/tasks.py +0 -0
  50. {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/_async/verifiers/__init__.py +0 -0
  51. {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/_async/verifiers/bundler.py +0 -0
  52. {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/_async/verifiers/verifier.py +0 -0
  53. {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/base.py +0 -0
  54. {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/client.py +0 -0
  55. {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/config.py +0 -0
  56. {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/env/__init__.py +0 -0
  57. {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/env/client.py +0 -0
  58. {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/exceptions.py +0 -0
  59. {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/global_client.py +0 -0
  60. {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/instance/__init__.py +0 -0
  61. {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/instance/base.py +0 -0
  62. {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/instance/client.py +0 -0
  63. {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/instance/models.py +0 -0
  64. {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/models.py +0 -0
  65. {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/resources/__init__.py +0 -0
  66. {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/resources/base.py +0 -0
  67. {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/resources/browser.py +0 -0
  68. {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/resources/mcp.py +0 -0
  69. {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/tasks.py +0 -0
  70. {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/types.py +0 -0
  71. {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/verifiers/__init__.py +0 -0
  72. {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/verifiers/bundler.py +0 -0
  73. {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/verifiers/code.py +0 -0
  74. {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/verifiers/db.py +0 -0
  75. {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/verifiers/decorator.py +0 -0
  76. {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/verifiers/parse.py +0 -0
  77. {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/verifiers/sql_differ.py +0 -0
  78. {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/verifiers/verifier.py +0 -0
  79. {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet_python.egg-info/SOURCES.txt +0 -0
  80. {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet_python.egg-info/dependency_links.txt +0 -0
  81. {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet_python.egg-info/requires.txt +0 -0
  82. {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet_python.egg-info/top_level.txt +0 -0
  83. {fleet_python-0.2.77 → fleet_python-0.2.78}/scripts/fix_sync_imports.py +0 -0
  84. {fleet_python-0.2.77 → fleet_python-0.2.78}/scripts/unasync.py +0 -0
  85. {fleet_python-0.2.77 → fleet_python-0.2.78}/setup.cfg +0 -0
  86. {fleet_python-0.2.77 → fleet_python-0.2.78}/tests/__init__.py +0 -0
  87. {fleet_python-0.2.77 → fleet_python-0.2.78}/tests/test_app_method.py +0 -0
  88. {fleet_python-0.2.77 → fleet_python-0.2.78}/tests/test_expect_only.py +0 -0
  89. {fleet_python-0.2.77 → fleet_python-0.2.78}/tests/test_instance_dispatch.py +0 -0
  90. {fleet_python-0.2.77 → fleet_python-0.2.78}/tests/test_sqlite_resource_dual_mode.py +0 -0
  91. {fleet_python-0.2.77 → fleet_python-0.2.78}/tests/test_sqlite_shared_memory_behavior.py +0 -0
  92. {fleet_python-0.2.77 → fleet_python-0.2.78}/tests/test_verifier_from_string.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fleet-python
3
- Version: 0.2.77
3
+ Version: 0.2.78
4
4
  Summary: Python SDK for Fleet environments
5
5
  Author-email: Fleet AI <nic@fleet.so>
6
6
  License: Apache-2.0
@@ -1427,6 +1427,50 @@ class AsyncSnapshotDiff:
1427
1427
  diff, allowed_changes
1428
1428
  )
1429
1429
 
1430
+ async def _ensure_all_fetched(self):
1431
+ """Fetch ALL data from ALL tables upfront (non-lazy loading).
1432
+
1433
+ This is the old approach before lazy loading was introduced.
1434
+ Used by expect_only_v1 for simpler, non-optimized diffing.
1435
+ """
1436
+ # Get all tables from before snapshot
1437
+ tables_response = await self.before.resource.query(
1438
+ "SELECT name FROM sqlite_master WHERE type='table' AND name NOT LIKE 'sqlite_%'"
1439
+ )
1440
+
1441
+ if tables_response.rows:
1442
+ before_tables = [row[0] for row in tables_response.rows]
1443
+ for table in before_tables:
1444
+ await self.before._ensure_table_data(table)
1445
+
1446
+ # Also fetch from after snapshot
1447
+ tables_response = await self.after.resource.query(
1448
+ "SELECT name FROM sqlite_master WHERE type='table' AND name NOT LIKE 'sqlite_%'"
1449
+ )
1450
+
1451
+ if tables_response.rows:
1452
+ after_tables = [row[0] for row in tables_response.rows]
1453
+ for table in after_tables:
1454
+ await self.after._ensure_table_data(table)
1455
+
1456
+ async def expect_only_v1(self, allowed_changes: List[Dict[str, Any]]):
1457
+ """Ensure only specified changes occurred using the original (non-optimized) approach.
1458
+
1459
+ This is the original expect_only logic before lazy loading and targeted query
1460
+ optimizations were introduced. It fetches all data upfront and does a full diff.
1461
+
1462
+ Use this when you want the simpler, more predictable behavior of the original
1463
+ implementation without any query optimizations.
1464
+ """
1465
+ # Fetch all data upfront (old approach)
1466
+ await self._ensure_all_fetched()
1467
+
1468
+ # Collect full diff
1469
+ diff = await self._collect()
1470
+
1471
+ # Validate using the original validation logic
1472
+ return await self._validate_diff_against_allowed_changes(diff, allowed_changes)
1473
+
1430
1474
 
1431
1475
  class AsyncQueryBuilder:
1432
1476
  """Async query builder that translates DSL to SQL and executes through the API."""
@@ -1447,6 +1447,50 @@ class SyncSnapshotDiff:
1447
1447
  diff = self._collect()
1448
1448
  return self._validate_diff_against_allowed_changes_v2(diff, allowed_changes)
1449
1449
 
1450
+ def _ensure_all_fetched(self):
1451
+ """Fetch ALL data from ALL tables upfront (non-lazy loading).
1452
+
1453
+ This is the old approach before lazy loading was introduced.
1454
+ Used by expect_only_v1 for simpler, non-optimized diffing.
1455
+ """
1456
+ # Get all tables
1457
+ tables_response = self.before.resource.query(
1458
+ "SELECT name FROM sqlite_master WHERE type='table' AND name NOT LIKE 'sqlite_%'"
1459
+ )
1460
+
1461
+ if tables_response.rows:
1462
+ before_tables = [row[0] for row in tables_response.rows]
1463
+ for table in before_tables:
1464
+ self.before._ensure_table_data(table)
1465
+
1466
+ # Also fetch from after snapshot
1467
+ tables_response = self.after.resource.query(
1468
+ "SELECT name FROM sqlite_master WHERE type='table' AND name NOT LIKE 'sqlite_%'"
1469
+ )
1470
+
1471
+ if tables_response.rows:
1472
+ after_tables = [row[0] for row in tables_response.rows]
1473
+ for table in after_tables:
1474
+ self.after._ensure_table_data(table)
1475
+
1476
+ def expect_only_v1(self, allowed_changes: List[Dict[str, Any]]):
1477
+ """Ensure only specified changes occurred using the original (non-optimized) approach.
1478
+
1479
+ This is the original expect_only logic before lazy loading and targeted query
1480
+ optimizations were introduced. It fetches all data upfront and does a full diff.
1481
+
1482
+ Use this when you want the simpler, more predictable behavior of the original
1483
+ implementation without any query optimizations.
1484
+ """
1485
+ # Fetch all data upfront (old approach)
1486
+ self._ensure_all_fetched()
1487
+
1488
+ # Collect full diff
1489
+ diff = self._collect()
1490
+
1491
+ # Validate using the original validation logic
1492
+ return self._validate_diff_against_allowed_changes(diff, allowed_changes)
1493
+
1450
1494
 
1451
1495
  class SyncQueryBuilder:
1452
1496
  """Async query builder that translates DSL to SQL and executes through the API."""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fleet-python
3
- Version: 0.2.77
3
+ Version: 0.2.78
4
4
  Summary: Python SDK for Fleet environments
5
5
  Author-email: Fleet AI <nic@fleet.so>
6
6
  License: Apache-2.0
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
5
5
  [project]
6
6
  name = "fleet-python"
7
7
 
8
- version = "0.2.77"
8
+ version = "0.2.78"
9
9
  description = "Python SDK for Fleet environments"
10
10
  authors = [
11
11
  {name = "Fleet AI", email = "nic@fleet.so"},
File without changes
File without changes
File without changes