[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-09552f33-548f-4782-a8f3-c3eacba0ce31":3,"$f0m2xBRz1PvVuCX0umQMC6Pnj0j0bTipRnWnG_BET7n4":43},{"id":4,"title":5,"description":6,"categoryId":7,"moduleId":8,"tags":9,"prompt":10,"icon":11,"source":12,"sourceUrl":13,"authorId":14,"authorName":15,"isPublic":16,"stars":17,"runs":18,"createdAt":19,"updatedAt":19,"module":20,"category":27,"packages":34},"09552f33-548f-4782-a8f3-c3eacba0ce31","dbos-python","构建可靠、容错的Python应用程序的DBOS持久工作流指南。在将DBOS添加到现有Python代码、创建工作流和步骤或使用队列进行并发控制时使用。","cat_life_career","mod_other","sickn33,other","---\nname: dbos-python\ndescription: \"Guide for building reliable, fault-tolerant Python applications with DBOS durable workflows. Use when adding DBOS to existing Python code, creating workflows and steps, or using queues for concurrency control.\"\nrisk: safe\nsource: \"https:\u002F\u002Fdocs.dbos.dev\u002F\"\ndate_added: \"2026-02-27\"\n---\n\n# DBOS Python Best Practices\n\nGuide for building reliable, fault-tolerant Python applications with DBOS durable workflows.\n\n## When to Use\nReference these guidelines when:\n- Adding DBOS to existing Python code\n- Creating workflows and steps\n- Using queues for concurrency control\n- Implementing workflow communication (events, messages, streams)\n- Configuring and launching DBOS applications\n- Using DBOSClient from external applications\n- Testing DBOS applications\n\n## Rule Categories by Priority\n\n| Priority | Category | Impact | Prefix |\n|----------|----------|--------|--------|\n| 1 | Lifecycle | CRITICAL | `lifecycle-` |\n| 2 | Workflow | CRITICAL | `workflow-` |\n| 3 | Step | HIGH | `step-` |\n| 4 | Queue | HIGH | `queue-` |\n| 5 | Communication | MEDIUM | `comm-` |\n| 6 | Pattern | MEDIUM | `pattern-` |\n| 7 | Testing | LOW-MEDIUM | `test-` |\n| 8 | Client | MEDIUM | `client-` |\n| 9 | Advanced | LOW | `advanced-` |\n\n## Critical Rules\n\n### DBOS Configuration and Launch\n\nA DBOS application MUST configure and launch DBOS inside its main function:\n\n```python\nimport os\nfrom dbos import DBOS, DBOSConfig\n\n@DBOS.workflow()\ndef my_workflow():\n    pass\n\nif __name__ == \"__main__\":\n    config: DBOSConfig = {\n        \"name\": \"my-app\",\n        \"system_database_url\": os.environ.get(\"DBOS_SYSTEM_DATABASE_URL\"),\n    }\n    DBOS(config=config)\n    DBOS.launch()\n```\n\n### Workflow and Step Structure\n\nWorkflows are comprised of steps. Any function performing complex operations or accessing external services must be a step:\n\n```python\n@DBOS.step()\ndef call_external_api():\n    return requests.get(\"https:\u002F\u002Fapi.example.com\").json()\n\n@DBOS.workflow()\ndef my_workflow():\n    result = call_external_api()\n    return result\n```\n\n### Key Constraints\n\n- Do NOT call `DBOS.start_workflow` or `DBOS.recv` from a step\n- Do NOT use threads to start workflows - use `DBOS.start_workflow` or queues\n- Workflows MUST be deterministic - non-deterministic operations go in steps\n- Do NOT create\u002Fupdate global variables from workflows or steps\n\n## How to Use\n\nRead individual rule files for detailed explanations and examples:\n\n```\nreferences\u002Flifecycle-config.md\nreferences\u002Fworkflow-determinism.md\nreferences\u002Fqueue-concurrency.md\n```\n\n## References\n\n- https:\u002F\u002Fdocs.dbos.dev\u002F\n- https:\u002F\u002Fgithub.com\u002Fdbos-inc\u002Fdbos-transact-py\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.\n","","imported","https:\u002F\u002Fgithub.com\u002Fsickn33\u002Fantigravity-awesome-skills","user_system_seed","SkillOPIC",true,176,803,"2026-05-16 13:14:27",{"id":8,"name":21,"slug":22,"icon":23,"description":24,"sort":25,"createdAt":26},"其他","other","mdi-page-next-outline","其他类型Skill",5,"2026-05-16 12:53:40",{"id":7,"name":28,"slug":29,"icon":30,"description":31,"moduleId":8,"sort":32,"skillCount":33,"createdAt":26},"职场发展","career","mdi-briefcase-outline","面试准备、简历优化、职业规划",4,575,[35],{"id":36,"skillId":4,"version":37,"fileName":38,"fileSize":39,"filePath":40,"fileHash":41,"manifest":42,"createdAt":19},"53af00ee-1f61-42cd-8f1a-aa2aed960e2c","1.0.0","dbos-python.zip",29296,"uploads\u002Fskills\u002F09552f33-548f-4782-a8f3-c3eacba0ce31\u002Fdbos-python.zip","2b248a524c9e79c3df4518fcbe3422ff42c1a45ec15b4b249a4e82130c52b295","[{\"path\":\"AGENTS.md\",\"isDirectory\":false,\"size\":2748},{\"path\":\"CLAUDE.md\",\"isDirectory\":false,\"size\":9},{\"path\":\"SKILL.md\",\"isDirectory\":false,\"size\":2941},{\"path\":\"references\u002F_sections.md\",\"isDirectory\":false,\"size\":1415},{\"path\":\"references\u002Fadvanced-async.md\",\"isDirectory\":false,\"size\":2604},{\"path\":\"references\u002Fadvanced-patching.md\",\"isDirectory\":false,\"size\":1551},{\"path\":\"references\u002Fadvanced-versioning.md\",\"isDirectory\":false,\"size\":1628},{\"path\":\"references\u002Fclient-enqueue.md\",\"isDirectory\":false,\"size\":1384},{\"path\":\"references\u002Fclient-setup.md\",\"isDirectory\":false,\"size\":1668},{\"path\":\"references\u002Fcomm-events.md\",\"isDirectory\":false,\"size\":1551},{\"path\":\"references\u002Fcomm-messages.md\",\"isDirectory\":false,\"size\":1563},{\"path\":\"references\u002Fcomm-streaming.md\",\"isDirectory\":false,\"size\":1570},{\"path\":\"references\u002Flifecycle-config.md\",\"isDirectory\":false,\"size\":1572},{\"path\":\"references\u002Flifecycle-fastapi.md\",\"isDirectory\":false,\"size\":1487},{\"path\":\"references\u002Fpattern-classes.md\",\"isDirectory\":false,\"size\":1651},{\"path\":\"references\u002Fpattern-debouncing.md\",\"isDirectory\":false,\"size\":1659},{\"path\":\"references\u002Fpattern-idempotency.md\",\"isDirectory\":false,\"size\":1512},{\"path\":\"references\u002Fpattern-scheduled.md\",\"isDirectory\":false,\"size\":1492},{\"path\":\"references\u002Fpattern-sleep.md\",\"isDirectory\":false,\"size\":1378},{\"path\":\"references\u002Fqueue-basics.md\",\"isDirectory\":false,\"size\":1370},{\"path\":\"references\u002Fqueue-concurrency.md\",\"isDirectory\":false,\"size\":1378},{\"path\":\"references\u002Fqueue-deduplication.md\",\"isDirectory\":false,\"size\":1591},{\"path\":\"references\u002Fqueue-listening.md\",\"isDirectory\":false,\"size\":1607},{\"path\":\"references\u002Fqueue-partitioning.md\",\"isDirectory\":false,\"size\":1800},{\"path\":\"references\u002Fqueue-priority.md\",\"isDirectory\":false,\"size\":1509},{\"path\":\"references\u002Fqueue-rate-limiting.md\",\"isDirectory\":false,\"size\":1358},{\"path\":\"references\u002Fstep-basics.md\",\"isDirectory\":false,\"size\":1328},{\"path\":\"references\u002Fstep-retries.md\",\"isDirectory\":false,\"size\":1412},{\"path\":\"references\u002Fstep-transactions.md\",\"isDirectory\":false,\"size\":1741},{\"path\":\"references\u002Ftest-fixtures.md\",\"isDirectory\":false,\"size\":1387},{\"path\":\"references\u002Fworkflow-background.md\",\"isDirectory\":false,\"size\":1310},{\"path\":\"references\u002Fworkflow-constraints.md\",\"isDirectory\":false,\"size\":1676},{\"path\":\"references\u002Fworkflow-control.md\",\"isDirectory\":false,\"size\":2066},{\"path\":\"references\u002Fworkflow-determinism.md\",\"isDirectory\":false,\"size\":1309},{\"path\":\"references\u002Fworkflow-introspection.md\",\"isDirectory\":false,\"size\":1832},{\"path\":\"references\u002Fworkflow-timeout.md\",\"isDirectory\":false,\"size\":1435}]",{"code":44,"message":45,"data":46},200,"success",{"items":47,"stats":48,"page":51},[],{"averageRating":49,"totalRatings":49,"ratingCounts":50},0,[49,49,49,49,49],{"limit":52,"offset":49,"hasMore":53,"nextOffset":52,"ratedOnly":16},15,false]