
DBOS Python Best Practices
FreeBuild reliable Python applications with DBOS workflows.
Free · Opens the source repo
What DBOS Python Best Practices does
The DBOS Python Best Practices skill provides a comprehensive guide for developers looking to build reliable and fault-tolerant applications using DBOS durable workflows. This skill is particularly useful for those who are integrating DBOS into existing Python projects or creating new workflows and steps. It covers essential guidelines on configuring DBOS applications, implementing concurrency control through queues, and ensuring effective communication within workflows.
The skill emphasizes critical rules that must be adhered to when working with DBOS. For example, it is mandatory to configure and launch DBOS within the main function of your application. The structure of workflows and steps is also clearly defined, ensuring that complex operations are encapsulated within steps. This promotes best practices in software design, particularly in maintaining the determinism of workflows and avoiding global state changes.
In addition to critical rules, the skill provides a categorized list of rules that prioritize different aspects of DBOS application development, such as lifecycle management, workflow design, and queue usage. Each category is accompanied by specific guidelines that help developers avoid common pitfalls and ensure robust application behavior. The references included in the skill offer deeper insights into specific topics, making it a valuable resource for both novice and experienced developers alike.
Overall, this skill is designed for developers and designers who are looking to leverage DBOS in their Python applications, providing them with the necessary tools and knowledge to create efficient, maintainable, and scalable software solutions.
When to use it
Use this skill when integrating DBOS into existing Python code, creating new workflows, or managing concurrency with queues.
When not to use it
This skill may not be suitable for projects that do not involve DBOS or for scenarios that require extensive custom configurations outside the provided guidelines.
What you can build with it
Integrating DBOS into an Existing Project
When adding DBOS to an existing Python application, this skill provides essential guidelines to ensure a smooth integration.
Creating New Workflows
For developers tasked with building new workflows, this skill outlines best practices and critical rules to follow.
Managing Concurrency with Queues
This skill is useful when implementing concurrency control in applications using DBOS queues, ensuring efficient task management.
How to install DBOS Python Best Practices
View source1. Install with the skills CLI
npx skills add sickn33/agentic-awesome-skills/dbos-python --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by sickn33DBOS Python Best Practices
Guide for building reliable, fault-tolerant Python applications with DBOS durable workflows.
When to Use
Reference these guidelines when:
- Adding DBOS to existing Python code
- Creating workflows and steps
- Using queues for concurrency control
- Implementing workflow communication (events, messages, streams)
- Configuring and launching DBOS applications
- Using DBOSClient from external applications
- Testing DBOS applications
Rule Categories by Priority
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Lifecycle | CRITICAL | lifecycle- |
| 2 | Workflow | CRITICAL | workflow- |
| 3 | Step | HIGH | step- |
| 4 | Queue | HIGH | queue- |
| 5 | Communication | MEDIUM | comm- |
| 6 | Pattern | MEDIUM | pattern- |
| 7 | Testing | LOW-MEDIUM | test- |
| 8 | Client | MEDIUM | client- |
| 9 | Advanced | LOW | advanced- |
Critical Rules
DBOS Configuration and Launch
A DBOS application MUST configure and launch DBOS inside its main function:
import os
from dbos import DBOS, DBOSConfig
@DBOS.workflow()
def my_workflow():
pass
if __name__ == "__main__":
config: DBOSConfig = {
"name": "my-app",
"system_database_url": os.environ.get("DBOS_SYSTEM_DATABASE_URL"),
}
DBOS(config=config)
DBOS.launch()
Workflow and Step Structure
Workflows are comprised of steps. Any function performing complex operations or accessing external services must be a step:
@DBOS.step()
def call_external_api():
return requests.get("https://api.example.com").json()
@DBOS.workflow()
def my_workflow():
result = call_external_api()
return result
Key Constraints
- Do NOT call
DBOS.start_workfloworDBOS.recvfrom a step - Do NOT use threads to start workflows - use
DBOS.start_workflowor queues - Workflows MUST be deterministic - non-deterministic operations go in steps
- Do NOT create/update global variables from workflows or steps
How to Use
Read individual rule files for detailed explanations and examples:
references/lifecycle-config.md
references/workflow-determinism.md
references/queue-concurrency.md
References
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Frequently asked questions about DBOS Python Best Practices
Similar skills
WinMD API Search
Easily find and explore Windows desktop APIs.
WebMCPify
Transform any web app into an agent-ready platform.
Phoenix Tracing
Instrument LLM applications with OpenInference tracing.
Foundry Hosted Agent CopilotKit
Guidance for developing agentic web apps on Azure.
Power Automate Foundation
Connect AI agents to Power Automate seamlessly.
Power Automate Flow Builder
Efficiently build and deploy Power Automate flows programmatically.
