DBOS Python SDK for building reliable, fault-tolerant applications with durable workflows. Use this skill when writing Python code with DBOS, creating workflows and steps, using queues, using DBOSClient from external applications, or building applications that need to be resilient to failures.
Add this skill
npx mdskills install sickn33/dbos-pythonProvides clear DBOS workflow/step patterns but lacks complete implementation examples and edge case handling
1---2name: dbos-python3description: DBOS Python SDK for building reliable, fault-tolerant applications with durable workflows. Use this skill when writing Python code with DBOS, creating workflows and steps, using queues, using DBOSClient from external applications, or building applications that need to be resilient to failures.4risk: safe5source: https://docs.dbos.dev/6license: MIT7metadata:8 author: dbos9 version: "1.0.0"10 organization: DBOS11 date: January 202612 abstract: Comprehensive guide for building fault-tolerant Python applications with DBOS. Covers workflows, steps, queues, communication patterns, and best practices for durable execution.13---1415# DBOS Python Best Practices1617Guide for building reliable, fault-tolerant Python applications with DBOS durable workflows.1819## When to Use2021Reference these guidelines when:22- Adding DBOS to existing Python code23- Creating workflows and steps24- Using queues for concurrency control25- Implementing workflow communication (events, messages, streams)26- Configuring and launching DBOS applications27- Using DBOSClient from external applications28- Testing DBOS applications2930## Rule Categories by Priority3132| Priority | Category | Impact | Prefix |33|----------|----------|--------|--------|34| 1 | Lifecycle | CRITICAL | `lifecycle-` |35| 2 | Workflow | CRITICAL | `workflow-` |36| 3 | Step | HIGH | `step-` |37| 4 | Queue | HIGH | `queue-` |38| 5 | Communication | MEDIUM | `comm-` |39| 6 | Pattern | MEDIUM | `pattern-` |40| 7 | Testing | LOW-MEDIUM | `test-` |41| 8 | Client | MEDIUM | `client-` |42| 9 | Advanced | LOW | `advanced-` |4344## Critical Rules4546### DBOS Configuration and Launch4748A DBOS application MUST configure and launch DBOS inside its main function:4950```python51import os52from dbos import DBOS, DBOSConfig5354@DBOS.workflow()55def my_workflow():56 pass5758if __name__ == "__main__":59 config: DBOSConfig = {60 "name": "my-app",61 "system_database_url": os.environ.get("DBOS_SYSTEM_DATABASE_URL"),62 }63 DBOS(config=config)64 DBOS.launch()65```6667### Workflow and Step Structure6869Workflows are comprised of steps. Any function performing complex operations or accessing external services must be a step:7071```python72@DBOS.step()73def call_external_api():74 return requests.get("https://api.example.com").json()7576@DBOS.workflow()77def my_workflow():78 result = call_external_api()79 return result80```8182### Key Constraints8384- Do NOT call `DBOS.start_workflow` or `DBOS.recv` from a step85- Do NOT use threads to start workflows - use `DBOS.start_workflow` or queues86- Workflows MUST be deterministic - non-deterministic operations go in steps87- Do NOT create/update global variables from workflows or steps8889## How to Use9091Read individual rule files for detailed explanations and examples:9293```94references/lifecycle-config.md95references/workflow-determinism.md96references/queue-concurrency.md97```9899## References100101- https://docs.dbos.dev/102- https://github.com/dbos-inc/dbos-transact-py103
Full transparency — inspect the skill content before installing.