Skip to content

Commit 59d254d

Browse files
Publish API reference to python.durable-workflow.com
Set up mkdocs-material + mkdocstrings to generate the public API reference from docstrings under src/durable_workflow. GitHub Actions builds the site on push to main and deploys to GitHub Pages. The docs/CNAME file claims python.durable-workflow.com so the generated site serves from the subdomain once DNS resolves. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent e0a83ea commit 59d254d

15 files changed

Lines changed: 192 additions & 0 deletions

File tree

.github/workflows/docs.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Docs
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- 'src/**'
8+
- 'docs/**'
9+
- 'mkdocs.yml'
10+
- 'pyproject.toml'
11+
- '.github/workflows/docs.yml'
12+
workflow_dispatch:
13+
14+
permissions:
15+
contents: read
16+
pages: write
17+
id-token: write
18+
19+
concurrency:
20+
group: docs
21+
cancel-in-progress: false
22+
23+
jobs:
24+
build:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v6
28+
29+
- uses: actions/setup-python@v6
30+
with:
31+
python-version: "3.12"
32+
33+
- name: Install package + docs deps
34+
run: pip install -e '.[docs]'
35+
36+
- name: Build site
37+
run: mkdocs build --strict
38+
39+
- uses: actions/upload-pages-artifact@v4
40+
with:
41+
path: site
42+
43+
deploy:
44+
needs: build
45+
runs-on: ubuntu-latest
46+
environment:
47+
name: github-pages
48+
url: ${{ steps.deployment.outputs.page_url }}
49+
steps:
50+
- id: deployment
51+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ __pycache__/
55
.venv/
66
dist/
77
build/
8+
site/
89
*.egg-info/

docs/CNAME

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
python.durable-workflow.com

docs/index.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Durable Workflow Python SDK
2+
3+
API reference for [`durable-workflow`](https://pypi.org/project/durable-workflow/), the Python SDK for the Durable Workflow server. For conceptual documentation, tutorials, and the overall architecture, see the [main docs site](https://durable-workflow.com/docs/2.0/polyglot/python).
4+
5+
## Install
6+
7+
```bash
8+
pip install durable-workflow
9+
```
10+
11+
With the optional Prometheus metrics recorder:
12+
13+
```bash
14+
pip install 'durable-workflow[prometheus]'
15+
```
16+
17+
## Quick links
18+
19+
- **[Client](reference/client.md)** — start workflows, signal, query, update, wait for results, manage schedules.
20+
- **[Worker](reference/worker.md)** — poll the server for workflow and activity tasks, dispatch to registered handlers.
21+
- **[Workflow](reference/workflow.md)** — workflow-side primitives: `ContinueAsNew`, `StartChildWorkflow`, and the workflow decorator.
22+
- **[Activity](reference/activity.md)** — activity decorator and execution context.
23+
- **[Errors](reference/errors.md)** — typed exceptions raised by the client and worker.
24+
- **[Retry policy](reference/retry_policy.md)** — retry configuration for activities and workflows.
25+
- **[Metrics](reference/metrics.md)** — pluggable recorders, including a Prometheus adapter.
26+
- **[Serializer](reference/serializer.md)** — payload encoding and decoding helpers.
27+
- **[Sync helpers](reference/sync.md)** — blocking wrappers around the async client for scripts and tests.
28+
29+
## Versioning
30+
31+
This reference is generated from the `main` branch of [`durable-workflow/sdk-python`](https://github.com/durable-workflow/sdk-python) on every push. For the version installed in your project, check `durable_workflow.__version__`.

docs/reference/activity.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Activity
2+
3+
::: durable_workflow.activity

docs/reference/client.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Client
2+
3+
::: durable_workflow.client

docs/reference/errors.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Errors
2+
3+
::: durable_workflow.errors

docs/reference/metrics.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Metrics
2+
3+
::: durable_workflow.metrics

docs/reference/retry_policy.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Retry policy
2+
3+
::: durable_workflow.retry_policy

docs/reference/serializer.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Serializer
2+
3+
::: durable_workflow.serializer

0 commit comments

Comments
 (0)