Langsung ke konten
Skillpedia
API & server (backend)48k · #4343

dbos-python

Fungsinya

Panduan ini membantu Anda membangun program Python yang lebih kecil kemungkinannya untuk gagal, menggunakan tool bernama DBOS. Panduan ini menunjukkan cara menyusun kode agar berjalan dengan andal, meskipun terjadi kesalahan.

Kapan dipakai

  • ✓Saat menambahkan DBOS ke kode Python yang sudah ada.
  • ✓Saat membuat bagian program baru (workflow dan step).
  • ✓Saat menggunakan queue untuk mengatur berapa banyak tugas yang berjalan bersamaan.

Link skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/dbos-python/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/dbos-python/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit →

Contoh permintaan ke AI

“Bagaimana cara mengatur DBOS di program Python saya?”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

DBOS bekerja dengan mengatur kode Anda menjadi 'workflow' dan 'step'. Step menangani tugas yang mungkin gagal atau membutuhkan waktu, sedangkan workflow mengatur urutan step tersebut secara andal.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

DBOS 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_workflow or DBOS.recv from a step
  • Do NOT use threads to start workflows - use DBOS.start_workflow or 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.
Pertanyaan umum

Apa itu workflow dan step?

Workflow adalah rangkaian aksi yang dijalankan program Anda. Step adalah bagian kecil di dalam workflow yang menjalankan tugas tertentu, misalnya memanggil layanan eksternal.

Mengapa kode saya perlu andal?

Program yang andal tetap berjalan meskipun terjadi error atau kegagalan, sehingga tugas selesai tanpa terganggu.

Apa itu queue untuk pengendalian concurrency?

Queue membantu mengatur berapa banyak tugas yang dijalankan program Anda secara bersamaan. Dengan begitu, program tidak kelebihan beban dan semuanya berjalan dengan teratur.

Detail

Deskripsi asli dari pembuat

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.

repo: sickn33/agentic-awesome-skills

Popularitas

Bintang GitHub
48k
Peringkat
#4343
Lisensi
MIT
Diperbarui
15/10/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa