dbos 0.18.0a1__py3-none-any.whl → 0.19.0__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.
Potentially problematic release.
This version of dbos might be problematic. Click here for more details.
- dbos/_context.py +11 -2
- dbos/_core.py +30 -8
- dbos/_db_wizard.py +53 -12
- dbos/_dbos.py +1 -1
- dbos/_dbos_config.py +52 -7
- dbos/_error.py +11 -0
- dbos/_kafka.py +17 -1
- dbos/_migrations/versions/04ca4f231047_workflow_queues_executor_id.py +34 -0
- dbos/_queue.py +20 -0
- dbos/_schemas/system_database.py +1 -0
- dbos/_sys_db.py +100 -47
- dbos/_templates/hello/dbos-config.yaml.dbos +0 -4
- dbos/_workflow_commands.py +172 -0
- dbos/cli.py +100 -1
- dbos/dbos-config.schema.json +2 -11
- {dbos-0.18.0a1.dist-info → dbos-0.19.0.dist-info}/METADATA +21 -16
- {dbos-0.18.0a1.dist-info → dbos-0.19.0.dist-info}/RECORD +20 -18
- {dbos-0.18.0a1.dist-info → dbos-0.19.0.dist-info}/WHEEL +0 -0
- {dbos-0.18.0a1.dist-info → dbos-0.19.0.dist-info}/entry_points.txt +0 -0
- {dbos-0.18.0a1.dist-info → dbos-0.19.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: dbos
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.19.0
|
|
4
4
|
Summary: Ultra-lightweight durable execution in Python
|
|
5
5
|
Author-Email: "DBOS, Inc." <contact@dbos.dev>
|
|
6
6
|
License: MIT
|
|
@@ -28,14 +28,14 @@ Description-Content-Type: text/markdown
|
|
|
28
28
|
|
|
29
29
|
<div align="center">
|
|
30
30
|
|
|
31
|
-
# DBOS Transact:
|
|
31
|
+
# DBOS Transact: A Lightweight Durable Execution Library Built on Postgres
|
|
32
32
|
|
|
33
33
|
#### [Documentation](https://docs.dbos.dev/) • [Examples](https://docs.dbos.dev/examples) • [Github](https://github.com/dbos-inc) • [Discord](https://discord.com/invite/jsmC6pXGgX)
|
|
34
34
|
</div>
|
|
35
35
|
|
|
36
36
|
---
|
|
37
37
|
|
|
38
|
-
DBOS Transact is a Python library
|
|
38
|
+
DBOS Transact is a Python library for **ultra-lightweight durable execution**.
|
|
39
39
|
For example:
|
|
40
40
|
|
|
41
41
|
```python
|
|
@@ -55,18 +55,23 @@ def workflow()
|
|
|
55
55
|
|
|
56
56
|
Durable execution means your program is **resilient to any failure**.
|
|
57
57
|
If it is ever interrupted or crashes, all your workflows will automatically resume from the last completed step.
|
|
58
|
-
|
|
59
|
-
No matter how many times you try to crash it, it always resumes from exactly where it left off!
|
|
58
|
+
Durable execution helps solve many common problems:
|
|
60
59
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
60
|
+
- Orchestrating long-running or business-critical workflows so they seamlessly recover from any failure.
|
|
61
|
+
- Running reliable background jobs with no timeouts.
|
|
62
|
+
- Processing incoming events (e.g. from Kafka) exactly once.
|
|
63
|
+
- Running a fault-tolerant distributed task queue.
|
|
64
|
+
- Running a reliable cron scheduler.
|
|
65
|
+
- Operating an AI agent, or anything that connects to an unreliable or non-deterministic API.
|
|
64
66
|
|
|
65
|
-
|
|
67
|
+
What’s unique about DBOS's implementation of durable execution is that it’s implemented in a **lightweight library** that’s **totally backed by Postgres**.
|
|
68
|
+
To use DBOS, just `pip install` it and annotate your program with DBOS decorators.
|
|
69
|
+
Under the hood, those decorators store your program's execution state (which workflows are currently executing and which steps they've completed) in a Postgres database.
|
|
70
|
+
If your program crashes or is interrupted, they automatically recover its workflows from their stored state.
|
|
71
|
+
So all you need to use DBOS is Postgres—there are no other dependencies you have to manage, no separate workflow server.
|
|
66
72
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
- Observability—all workflows automatically emit [OpenTelemetry](https://opentelemetry.io/) traces.
|
|
73
|
+
One big advantage of this approach is that you can add DBOS to **any** Python application—**it’s just a library**.
|
|
74
|
+
You can use DBOS to add reliable background jobs or cron scheduling or queues to your app with no external dependencies except Postgres.
|
|
70
75
|
|
|
71
76
|
## Getting Started
|
|
72
77
|
|
|
@@ -77,7 +82,7 @@ pip install dbos
|
|
|
77
82
|
dbos init --config
|
|
78
83
|
```
|
|
79
84
|
|
|
80
|
-
Then, try it out with this simple program
|
|
85
|
+
Then, try it out with this simple program:
|
|
81
86
|
|
|
82
87
|
```python
|
|
83
88
|
from fastapi import FastAPI
|
|
@@ -107,14 +112,14 @@ def fastapi_endpoint():
|
|
|
107
112
|
dbos_workflow()
|
|
108
113
|
```
|
|
109
114
|
|
|
110
|
-
Save the program into `main.py
|
|
115
|
+
Save the program into `main.py` and start it with `fastapi run`.
|
|
111
116
|
Visit `localhost:8000` in your browser to start the workflow.
|
|
112
117
|
When prompted, press `Control + \` to force quit your application.
|
|
113
118
|
It should crash midway through the workflow, having completed step one but not step two.
|
|
114
119
|
Then, restart your app with `fastapi run`.
|
|
115
120
|
It should resume the workflow from where it left off, completing step two without re-executing step one.
|
|
116
121
|
|
|
117
|
-
To learn how to build more complex workflows, see
|
|
122
|
+
To learn how to build more complex workflows, see the [programming guide](https://docs.dbos.dev/python/programming-guide) or [examples](https://docs.dbos.dev/examples).
|
|
118
123
|
|
|
119
124
|
## Documentation
|
|
120
125
|
|
|
@@ -125,7 +130,7 @@ To learn how to build more complex workflows, see our [programming guide](https:
|
|
|
125
130
|
|
|
126
131
|
- [**AI-Powered Slackbot**](https://docs.dbos.dev/python/examples/rag-slackbot) — A Slackbot that answers questions about previous Slack conversations, using DBOS to durably orchestrate its RAG pipeline.
|
|
127
132
|
- [**Widget Store**](https://docs.dbos.dev/python/examples/widget-store) — An online storefront that uses DBOS durable workflows to be resilient to any failure.
|
|
128
|
-
- [**
|
|
133
|
+
- [**Scheduled Reminders**](https://docs.dbos.dev/python/examples/scheduled-reminders) — In just three lines of code, schedule an email to send days, weeks, or months in the future.
|
|
129
134
|
|
|
130
135
|
More examples [here](https://docs.dbos.dev/examples)!
|
|
131
136
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
dbos-0.
|
|
2
|
-
dbos-0.
|
|
3
|
-
dbos-0.
|
|
4
|
-
dbos-0.
|
|
1
|
+
dbos-0.19.0.dist-info/METADATA,sha256=Xce4k1qg4PeKccISSh9dZEUxiopjpJlzowY5NureWAM,5307
|
|
2
|
+
dbos-0.19.0.dist-info/WHEEL,sha256=thaaA2w1JzcGC48WYufAs8nrYZjJm8LqNfnXFOFyCC4,90
|
|
3
|
+
dbos-0.19.0.dist-info/entry_points.txt,sha256=z6GcVANQV7Uw_82H9Ob2axJX6V3imftyZsljdh-M1HU,54
|
|
4
|
+
dbos-0.19.0.dist-info/licenses/LICENSE,sha256=VGZit_a5-kdw9WT6fY5jxAWVwGQzgLFyPWrcVVUhVNU,1067
|
|
5
5
|
dbos/__init__.py,sha256=CxRHBHEthPL4PZoLbZhp3rdm44-KkRTT2-7DkK9d4QQ,724
|
|
6
6
|
dbos/_admin_server.py,sha256=DOgzVp9kmwiebQqmJB1LcrZnGTxSMbZiGXdenc1wZDg,3163
|
|
7
7
|
dbos/_app_db.py,sha256=_tv2vmPjjiaikwgxH3mqxgJ4nUUcG2-0uMXKWCqVu1c,5509
|
|
@@ -9,20 +9,21 @@ dbos/_classproperty.py,sha256=f0X-_BySzn3yFDRKB2JpCbLYQ9tLwt1XftfshvY7CBs,626
|
|
|
9
9
|
dbos/_cloudutils/authentication.py,sha256=V0fCWQN9stCkhbuuxgPTGpvuQcDqfU3KAxPAh01vKW4,5007
|
|
10
10
|
dbos/_cloudutils/cloudutils.py,sha256=5e3CW1deSW-dI5G3QN0XbiVsBhyqT8wu7fuV2f8wtGU,7688
|
|
11
11
|
dbos/_cloudutils/databases.py,sha256=x4187Djsyoa-QaG3Kog8JT2_GERsnqa93LIVanmVUmg,8393
|
|
12
|
-
dbos/_context.py,sha256=
|
|
13
|
-
dbos/_core.py,sha256=
|
|
12
|
+
dbos/_context.py,sha256=RH08s_nee95vgxdz6AsYuVWF1LuJSVtOyIifblsa4pw,18760
|
|
13
|
+
dbos/_core.py,sha256=lonD_iSnZtxhwetDcDlCV3HLr40jjqxUS2Q0TFaIOt0,34784
|
|
14
14
|
dbos/_croniter.py,sha256=hbhgfsHBqclUS8VeLnJ9PSE9Z54z6mi4nnrr1aUXn0k,47561
|
|
15
|
-
dbos/_db_wizard.py,sha256=
|
|
16
|
-
dbos/_dbos.py,sha256=
|
|
17
|
-
dbos/_dbos_config.py,sha256=
|
|
18
|
-
dbos/_error.py,sha256=
|
|
15
|
+
dbos/_db_wizard.py,sha256=xgKLna0_6Xi50F3o8msRosXba8NScHlpJR5ICVCkHDQ,7534
|
|
16
|
+
dbos/_dbos.py,sha256=LWFa48CPt7bsNAnMZrNDzHHTFCyMrY-nKbMZwCG_dqY,34710
|
|
17
|
+
dbos/_dbos_config.py,sha256=h_q1gzudhsAMVkGMD0qQ6kLic6YhdJgzm50YFSIx9Bo,8196
|
|
18
|
+
dbos/_error.py,sha256=vtaSsG0QW6cRlwfZ4zzZWy_IHCZlomwSlrDyGWuyn8c,4337
|
|
19
19
|
dbos/_fastapi.py,sha256=iyefCZq-ZDKRUjN_rgYQmFmyvWf4gPrSlC6CLbfq4a8,3419
|
|
20
20
|
dbos/_flask.py,sha256=z1cijbTi5Dpq6kqikPCx1LcR2YHHv2oc41NehOWjw74,2431
|
|
21
|
-
dbos/_kafka.py,sha256=
|
|
21
|
+
dbos/_kafka.py,sha256=o6DbwnsYRDtvVTZVsN7BAK8cdP79AfoWX3Q7CGY2Yuo,4199
|
|
22
22
|
dbos/_kafka_message.py,sha256=NYvOXNG3Qn7bghn1pv3fg4Pbs86ILZGcK4IB-MLUNu0,409
|
|
23
23
|
dbos/_logger.py,sha256=iYwbA7DLyXalWa2Yu07HO6Xm301nRuenMU64GgwUMkU,3576
|
|
24
24
|
dbos/_migrations/env.py,sha256=38SIGVbmn_VV2x2u1aHLcPOoWgZ84eCymf3g_NljmbU,1626
|
|
25
25
|
dbos/_migrations/script.py.mako,sha256=MEqL-2qATlST9TAOeYgscMn1uy6HUS9NFvDgl93dMj8,635
|
|
26
|
+
dbos/_migrations/versions/04ca4f231047_workflow_queues_executor_id.py,sha256=ICLPl8CN9tQXMsLDsAj8z1TsL831-Z3F8jSBvrR-wyw,736
|
|
26
27
|
dbos/_migrations/versions/50f3227f0b4b_fix_job_queue.py,sha256=ZBYrtTdxy64HxIAlOes89fVIk2P1gNaJack7wuC_epg,873
|
|
27
28
|
dbos/_migrations/versions/5c361fc04708_added_system_tables.py,sha256=QMgFMb0aLgC25YicsvPSr6AHRCA6Zd66hyaRUhwKzrQ,6404
|
|
28
29
|
dbos/_migrations/versions/a3b18ad34abe_added_triggers.py,sha256=Rv0ZsZYZ_WdgGEULYsPfnp4YzaO5L198gDTgYY39AVA,2022
|
|
@@ -30,7 +31,7 @@ dbos/_migrations/versions/d76646551a6b_job_queue_limiter.py,sha256=8PyFi8rd6CN-m
|
|
|
30
31
|
dbos/_migrations/versions/d76646551a6c_workflow_queue.py,sha256=G942nophZ2uC2vc4hGBC02Ptng1715roTjY3xiyzZU4,729
|
|
31
32
|
dbos/_migrations/versions/eab0cc1d9a14_job_queue.py,sha256=uvhFOtqbBreCePhAxZfIT0qCAI7BiZTou9wt6QnbY7c,1412
|
|
32
33
|
dbos/_outcome.py,sha256=FDMgWVjZ06vm9xO-38H17mTqBImUYQxgKs_bDCSIAhE,6648
|
|
33
|
-
dbos/_queue.py,sha256=
|
|
34
|
+
dbos/_queue.py,sha256=o_aczwualJTMoXb0XXL-Y5QH77OEukWzuerogbWi2ho,2779
|
|
34
35
|
dbos/_recovery.py,sha256=jbzGYxICA2drzyzlBSy2UiXhKV_16tBVacKQdTkqf-w,2008
|
|
35
36
|
dbos/_registrations.py,sha256=mei6q6_3R5uei8i_Wo_TqGZs85s10shOekDX41sFYD0,6642
|
|
36
37
|
dbos/_request.py,sha256=cX1B3Atlh160phgS35gF1VEEV4pD126c9F3BDgBmxZU,929
|
|
@@ -38,22 +39,23 @@ dbos/_roles.py,sha256=iOsgmIAf1XVzxs3gYWdGRe1B880YfOw5fpU7Jwx8_A8,2271
|
|
|
38
39
|
dbos/_scheduler.py,sha256=0I3e8Y-OIBG3wiUCIskShd-Sk_eUFCFyRB5u4L7IHXI,1940
|
|
39
40
|
dbos/_schemas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
40
41
|
dbos/_schemas/application_database.py,sha256=KeyoPrF7hy_ODXV7QNike_VFSD74QBRfQ76D7QyE9HI,966
|
|
41
|
-
dbos/_schemas/system_database.py,sha256=
|
|
42
|
+
dbos/_schemas/system_database.py,sha256=rwp4EvCSaXcUoMaRczZCvETCxGp72k3-hvLyGUDkih0,5163
|
|
42
43
|
dbos/_serialization.py,sha256=YCYv0qKAwAZ1djZisBC7khvKqG-5OcIv9t9EC5PFIog,1743
|
|
43
|
-
dbos/_sys_db.py,sha256=
|
|
44
|
+
dbos/_sys_db.py,sha256=ha5E11P83oi78L4R7cX_OL_N1Tf2Ir0Xr30GK1_27SA,52290
|
|
44
45
|
dbos/_templates/hello/README.md,sha256=GhxhBj42wjTt1fWEtwNriHbJuKb66Vzu89G4pxNHw2g,930
|
|
45
46
|
dbos/_templates/hello/__package/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
46
47
|
dbos/_templates/hello/__package/main.py,sha256=eI0SS9Nwj-fldtiuSzIlIG6dC91GXXwdRsoHxv6S_WI,2719
|
|
47
48
|
dbos/_templates/hello/__package/schema.py,sha256=7Z27JGC8yy7Z44cbVXIREYxtUhU4JVkLCp5Q7UahVQ0,260
|
|
48
49
|
dbos/_templates/hello/alembic.ini,sha256=VKBn4Gy8mMuCdY7Hip1jmo3wEUJ1VG1aW7EqY0_n-as,3695
|
|
49
|
-
dbos/_templates/hello/dbos-config.yaml.dbos,sha256=
|
|
50
|
+
dbos/_templates/hello/dbos-config.yaml.dbos,sha256=OMlcpdYUJKjyAme7phOz3pbn9upcIRjm42iwEThWUEQ,495
|
|
50
51
|
dbos/_templates/hello/migrations/env.py.dbos,sha256=GUV6sjkDzf9Vl6wkGEd0RSkK-ftRfV6EUwSQdd0qFXg,2392
|
|
51
52
|
dbos/_templates/hello/migrations/script.py.mako,sha256=MEqL-2qATlST9TAOeYgscMn1uy6HUS9NFvDgl93dMj8,635
|
|
52
53
|
dbos/_templates/hello/migrations/versions/2024_07_31_180642_init.py,sha256=U5thFWGqNN4QLrNXT7wUUqftIFDNE5eSdqD8JNW1mec,942
|
|
53
54
|
dbos/_templates/hello/start_postgres_docker.py,sha256=lQVLlYO5YkhGPEgPqwGc7Y8uDKse9HsWv5fynJEFJHM,1681
|
|
54
55
|
dbos/_tracer.py,sha256=rvBY1RQU6DO7rL7EnaJJxGcmd4tP_PpGqUEE6imZnhY,2518
|
|
55
|
-
dbos/
|
|
56
|
-
dbos/
|
|
56
|
+
dbos/_workflow_commands.py,sha256=25mLcPifaaQtX_Wzrf2LVq4CtXGDjmLHABimTcOeQuw,4691
|
|
57
|
+
dbos/cli.py,sha256=0E_QDJm3aGjjauUnmrsdZkqc8U49L6j2uPEtA0QRaZE,13946
|
|
58
|
+
dbos/dbos-config.schema.json,sha256=X5TpXNcARGceX0zQs0fVgtZW_Xj9uBbY5afPt9Rz9yk,5741
|
|
57
59
|
dbos/py.typed,sha256=QfzXT1Ktfk3Rj84akygc7_42z0lRpCq0Ilh8OXI6Zas,44
|
|
58
60
|
version/__init__.py,sha256=L4sNxecRuqdtSFdpUGX3TtBi9KL3k7YsZVIvv-fv9-A,1678
|
|
59
|
-
dbos-0.
|
|
61
|
+
dbos-0.19.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|