Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docs/python/tutorials/step-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: Steps
When using DBOS workflows, we recommend annotating any function that performs complex operations or accesses external APIs or services as a _step_.

You can turn **any** Python function into a step by annotating it with the [`@DBOS.step`](../reference/decorators.md#step) decorator.
The only requirement is that its inputs and outputs should be serializable ([pickle](https://docs.python.org/3/library/pickle.html)-able).
The only requirement is that its outputs should be serializable ([pickle](https://docs.python.org/3/library/pickle.html)-able).
Here's a simple example:

```python
Expand All @@ -24,6 +24,8 @@ Therefore, making a function a step guarantees that a workflow will never re-exe

2. DBOS provides [configurable automatic retries](#configurable-retries) for steps to more easily handle transient errors.

(A `step` called from outside a `workflow` will be upgraded to `workflow` and
therefore the inputs must also be serializable.)

### Configurable Retries

Expand Down Expand Up @@ -62,4 +64,4 @@ async def example_step():
async with aiohttp.ClientSession() as session:
async with session.get("https://example.com") as response:
return await response.text()
```
```