dbos 1.15.0a7__py3-none-any.whl → 1.15.0a9__py3-none-any.whl

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.
dbos/_dbos.py CHANGED
@@ -16,6 +16,7 @@ from typing import (
16
16
  AsyncGenerator,
17
17
  Callable,
18
18
  Coroutine,
19
+ Dict,
19
20
  Generator,
20
21
  Generic,
21
22
  List,
@@ -974,6 +975,33 @@ class DBOS:
974
975
  lambda: DBOS.get_event(workflow_id, key, timeout_seconds)
975
976
  )
976
977
 
978
+ @classmethod
979
+ def get_all_events(cls, workflow_id: str) -> Dict[str, Any]:
980
+ """
981
+ Get all events currently present for a workflow ID.
982
+ Args:
983
+ workflow_id: The workflow ID for which to get events
984
+ Returns:
985
+ A dictionary mapping event keys to their deserialized values
986
+ """
987
+
988
+ def fn() -> Dict[str, Any]:
989
+ return _get_dbos_instance()._sys_db.get_all_events(workflow_id)
990
+
991
+ return _get_dbos_instance()._sys_db.call_function_as_step(fn, "DBOS.get_events")
992
+
993
+ @classmethod
994
+ async def get_all_events_async(cls, workflow_id: str) -> Dict[str, Any]:
995
+ """
996
+ Get all events currently present for a workflow ID.
997
+ Args:
998
+ workflow_id: The workflow ID for which to get events
999
+ Returns:
1000
+ A dictionary mapping event keys to their deserialized values
1001
+ """
1002
+ await cls._configure_asyncio_thread_pool()
1003
+ return await asyncio.to_thread(cls.get_all_events, workflow_id)
1004
+
977
1005
  @classmethod
978
1006
  def _execute_workflow_id(cls, workflow_id: str) -> WorkflowHandle[Any]:
979
1007
  """Execute a workflow by ID (for recovery)."""
@@ -1225,7 +1253,7 @@ class DBOS:
1225
1253
  async def list_workflow_steps_async(cls, workflow_id: str) -> List[StepInfo]:
1226
1254
  await cls._configure_asyncio_thread_pool()
1227
1255
  return await asyncio.to_thread(cls.list_workflow_steps, workflow_id)
1228
-
1256
+
1229
1257
  @classproperty
1230
1258
  def application_version(cls) -> str:
1231
1259
  return GlobalParams.app_version
dbos/_sys_db.py CHANGED
@@ -1567,6 +1567,32 @@ class SystemDatabase(ABC):
1567
1567
  }
1568
1568
  self._record_operation_result_txn(output, conn=c)
1569
1569
 
1570
+ def get_all_events(self, workflow_id: str) -> Dict[str, Any]:
1571
+ """
1572
+ Get all events currently present for a workflow ID.
1573
+
1574
+ Args:
1575
+ workflow_id: The workflow UUID to get events for
1576
+
1577
+ Returns:
1578
+ A dictionary mapping event keys to their deserialized values
1579
+ """
1580
+ with self.engine.begin() as c:
1581
+ rows = c.execute(
1582
+ sa.select(
1583
+ SystemSchema.workflow_events.c.key,
1584
+ SystemSchema.workflow_events.c.value,
1585
+ ).where(SystemSchema.workflow_events.c.workflow_uuid == workflow_id)
1586
+ ).fetchall()
1587
+
1588
+ events: Dict[str, Any] = {}
1589
+ for row in rows:
1590
+ key = row[0]
1591
+ value = _serialization.deserialize(row[1])
1592
+ events[key] = value
1593
+
1594
+ return events
1595
+
1570
1596
  @db_retry()
1571
1597
  def get_event(
1572
1598
  self,
@@ -1,9 +1,26 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dbos
3
- Version: 1.15.0a7
3
+ Version: 1.15.0a9
4
4
  Summary: Ultra-lightweight durable execution in Python
5
5
  Author-Email: "DBOS, Inc." <contact@dbos.dev>
6
6
  License: MIT
7
+ Classifier: Development Status :: 5 - Production/Stable
8
+ Classifier: Programming Language :: Python
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: 3 :: Only
11
+ Classifier: Programming Language :: Python :: 3.10
12
+ Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: Programming Language :: Python :: 3.13
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: Intended Audience :: Information Technology
17
+ Classifier: License :: OSI Approved :: MIT License
18
+ Classifier: Operating System :: OS Independent
19
+ Classifier: Topic :: Internet
20
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
21
+ Classifier: Topic :: Database
22
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
23
+ Classifier: Framework :: AsyncIO
7
24
  Requires-Python: >=3.10
8
25
  Requires-Dist: pyyaml>=6.0.2
9
26
  Requires-Dist: python-dateutil>=2.9.0.post0
@@ -20,6 +37,12 @@ Description-Content-Type: text/markdown
20
37
 
21
38
  <div align="center">
22
39
 
40
+ [![GitHub Actions](https://img.shields.io/github/actions/workflow/status/dbos-inc/dbos-transact-py/unit-test.yml?query=branch%3Amain)](https://github.com/dbos-inc/dbos-transact-py/actions/workflows/unit-test.yml)
41
+ [![PyPI release (latest SemVer)](https://img.shields.io/pypi/v/dbos.svg)](https://pypi.python.org/pypi/dbos)
42
+ [![Python Versions](https://img.shields.io/pypi/pyversions/dbos.svg)](https://pypi.python.org/pypi/dbos)
43
+ [![License (MIT)](https://img.shields.io/github/license/dbos-inc/dbos-transact-py.svg?v)](LICENSE)
44
+ [![Join Discord](https://img.shields.io/badge/Discord-Join%20Chat-5865F2?logo=discord&logoColor=white)](https://discord.com/invite/jsmC6pXGgX)
45
+
23
46
  # DBOS Transact: Lightweight Durable Workflows
24
47
 
25
48
  #### [Documentation](https://docs.dbos.dev/) &nbsp;&nbsp;•&nbsp;&nbsp; [Examples](https://docs.dbos.dev/examples) &nbsp;&nbsp;•&nbsp;&nbsp; [Github](https://github.com/dbos-inc) &nbsp;&nbsp;•&nbsp;&nbsp; [Discord](https://discord.com/invite/jsmC6pXGgX)
@@ -1,7 +1,7 @@
1
- dbos-1.15.0a7.dist-info/METADATA,sha256=cVEV8R9_v6FXbU-t_Fs2e-6-M1yRTXJPbgyozjKOCxA,13021
2
- dbos-1.15.0a7.dist-info/WHEEL,sha256=9P2ygRxDrTJz3gsagc0Z96ukrxjr-LFBGOgv3AuKlCA,90
3
- dbos-1.15.0a7.dist-info/entry_points.txt,sha256=_QOQ3tVfEjtjBlr1jS4sHqHya9lI2aIEIWkz8dqYp14,58
4
- dbos-1.15.0a7.dist-info/licenses/LICENSE,sha256=VGZit_a5-kdw9WT6fY5jxAWVwGQzgLFyPWrcVVUhVNU,1067
1
+ dbos-1.15.0a9.dist-info/METADATA,sha256=lfchHv4kltB2uhC5uD9ZRbwwVSYExDTAXiNvnR0RFY0,14533
2
+ dbos-1.15.0a9.dist-info/WHEEL,sha256=9P2ygRxDrTJz3gsagc0Z96ukrxjr-LFBGOgv3AuKlCA,90
3
+ dbos-1.15.0a9.dist-info/entry_points.txt,sha256=_QOQ3tVfEjtjBlr1jS4sHqHya9lI2aIEIWkz8dqYp14,58
4
+ dbos-1.15.0a9.dist-info/licenses/LICENSE,sha256=VGZit_a5-kdw9WT6fY5jxAWVwGQzgLFyPWrcVVUhVNU,1067
5
5
  dbos/__init__.py,sha256=pT4BuNLDCrIQX27vQG8NlfxX6PZRU7r9miq4thJTszU,982
6
6
  dbos/__main__.py,sha256=G7Exn-MhGrVJVDbgNlpzhfh8WMX_72t3_oJaFT9Lmt8,653
7
7
  dbos/_admin_server.py,sha256=hubQJw5T8zGKCPNS6FQTXy8jQ8GTJxoYQaDTMlICl9k,16267
@@ -13,7 +13,7 @@ dbos/_conductor/protocol.py,sha256=q3rgLxINFtWFigdOONc-4gX4vn66UmMlJQD6Kj8LnL4,7
13
13
  dbos/_context.py,sha256=cJDxVbswTLXKE5MV4Hmg6gpIX3Dd5mBTG-4lmofWP9E,27668
14
14
  dbos/_core.py,sha256=13DNN_fpSIs42NquV80XsHV7yKwY_adKP03h_xhXok4,50493
15
15
  dbos/_croniter.py,sha256=XHAyUyibs_59sJQfSNWkP7rqQY6_XrlfuuCxk4jYqek,47559
16
- dbos/_dbos.py,sha256=MbcJRiPmjpJlIIlPBvEULAjMAcBZDzTX19tyT92-w_Q,57425
16
+ dbos/_dbos.py,sha256=lkOnSZrEPkqURBJatBhnslHO0OKgmrS8rqLowEn5Rr0,58441
17
17
  dbos/_dbos_config.py,sha256=4vgPyy4NiojAOiw3BnjWwiwT1_Ju3ZhXqJQOKDXhsE4,25148
18
18
  dbos/_debouncer.py,sha256=9-9dlXKLRHSUSylprCw18r-7MAdFwD8-w0KkY-bEG_I,15281
19
19
  dbos/_debug.py,sha256=0MfgNqutCUhI4PEmmra9x7f3DiFE_0nscfUCHdLimEY,1415
@@ -36,7 +36,7 @@ dbos/_schemas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
36
36
  dbos/_schemas/application_database.py,sha256=SypAS9l9EsaBHFn9FR8jmnqt01M74d9AF1AMa4m2hhI,1040
37
37
  dbos/_schemas/system_database.py,sha256=aEkjRQDh9xjdke0d9uFx_20-c9UjQtvuLtHZ24aOypA,5497
38
38
  dbos/_serialization.py,sha256=GLgWLtHpvk7nSHyXukVQLE1ASNA3CJBtfF8w6iflBDw,3590
39
- dbos/_sys_db.py,sha256=rIbwxIc4uglpgsg5ZQRmfHv7YPfFQKUCDOW07pGrD8w,83699
39
+ dbos/_sys_db.py,sha256=lv7ahoD2E0eIzZCfaaHpDJ40XlJsbwPjEX_Sju3b9ew,84558
40
40
  dbos/_sys_db_postgres.py,sha256=GuyGVyZZD_Wl7LjRSkHnOuZ-hOROlO4Xs2UeDhKq10E,6963
41
41
  dbos/_sys_db_sqlite.py,sha256=ifjKdy-Z9vlVIBf5L6XnSaNjiBdvqPE73asVHim4A5Q,6998
42
42
  dbos/_templates/dbos-db-starter/README.md,sha256=GhxhBj42wjTt1fWEtwNriHbJuKb66Vzu89G4pxNHw2g,930
@@ -56,4 +56,4 @@ dbos/cli/migration.py,sha256=zJnDPUBnil5XZXFxc01EbZ0Radw_y8wtDGZExgelAxc,3633
56
56
  dbos/dbos-config.schema.json,sha256=47wofTZ5jlFynec7bG0L369tAXbRQQ2euBxBXvg4m9c,1730
57
57
  dbos/py.typed,sha256=QfzXT1Ktfk3Rj84akygc7_42z0lRpCq0Ilh8OXI6Zas,44
58
58
  version/__init__.py,sha256=L4sNxecRuqdtSFdpUGX3TtBi9KL3k7YsZVIvv-fv9-A,1678
59
- dbos-1.15.0a7.dist-info/RECORD,,
59
+ dbos-1.15.0a9.dist-info/RECORD,,