Skip to content

Commit d70cba9

Browse files
committed
docs: add usage instructions to hello_world.py example
1 parent e13a139 commit d70cba9

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

‎examples/prefect/hello_world.py‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,32 @@
1+
"""Dummy Prefect workflow that prints a message on an OSW page.
2+
3+
Usage (PowerShell):
4+
$env:PREFECT_API_URL="https://osw.example.com:4200/api"
5+
$env:PREFECT_PUBLIC_URL="https://osw.example.com/w/rest.php/apigateway/v1/prefect"
6+
$env:OSW_USER="Bot@name"
7+
$env:OSW_SERVER="osw.example.com"
8+
$env:OSW_PASSWORD="bot-password"
9+
python examples/prefect/hello_world.py
10+
11+
Usage (Bash):
12+
export PREFECT_API_URL="https://osw.example.com:4200/api"
13+
export PREFECT_PUBLIC_URL="https://osw.example.com/w/rest.php/apigateway/v1/prefect"
14+
export OSW_USER="Bot@name"
15+
export OSW_SERVER="osw.example.com"
16+
export OSW_PASSWORD="bot-password"
17+
python examples/prefect/hello_world.py
18+
19+
Environment variables:
20+
PREFECT_API_URL Prefect server API URL (used by the worker)
21+
PREFECT_PUBLIC_URL (optional) Public URL stored in PrefectFlow entity,
22+
for use by browser clients (e.g. prefect.js).
23+
Falls back to PREFECT_API_URL if not set.
24+
OSW_USER OSW bot username
25+
OSW_SERVER OSW instance domain
26+
OSW_PASSWORD OSW bot password. If not set, falls back to a
27+
Prefect Secret named <user>-<domain-with-dashes>.
28+
"""
29+
130
from typing import Optional
231
from uuid import UUID, uuid4
332

0 commit comments

Comments
 (0)