auto-workflow 0.1.0__py3-none-any.whl → 0.1.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {auto_workflow-0.1.0.dist-info → auto_workflow-0.1.1.dist-info}/METADATA +63 -52
- {auto_workflow-0.1.0.dist-info → auto_workflow-0.1.1.dist-info}/RECORD +5 -5
- {auto_workflow-0.1.0.dist-info → auto_workflow-0.1.1.dist-info}/LICENSE +0 -0
- {auto_workflow-0.1.0.dist-info → auto_workflow-0.1.1.dist-info}/WHEEL +0 -0
- {auto_workflow-0.1.0.dist-info → auto_workflow-0.1.1.dist-info}/entry_points.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: auto-workflow
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.1
|
4
4
|
Summary: A lightweight, developer-first workflow & task orchestration engine for Python.
|
5
5
|
Home-page: https://github.com/stoiandl/auto-workflow
|
6
6
|
License: GPL-3.0-or-later
|
@@ -36,7 +36,6 @@ Description-Content-Type: text/markdown
|
|
36
36
|
[](https://github.com/stoiandl/auto-workflow/actions/workflows/docs.yml)
|
37
37
|
[](https://app.codecov.io/gh/stoiandl/auto-workflow)
|
38
38
|
[](https://pypi.org/project/auto-workflow/)
|
39
|
-
[](https://pypi.org/project/auto-workflow/)
|
40
39
|
[](https://stoiandl.github.io/auto-workflow/) [](LICENSE)
|
41
40
|
|
42
41
|
_A lightweight, zero-bloat, developer‑first workflow & task orchestration engine for Python._
|
@@ -103,7 +102,18 @@ Core values: **No mandatory DB**, **no daemon**, **no CLI bureaucracy**, **opt
|
|
103
102
|
|
104
103
|
|
105
104
|
## Feature Overview
|
106
|
-
|
105
|
+
Core capabilities:
|
106
|
+
|
107
|
+
- **Task Definition**: `@task` decorator with retry, timeout, caching, and execution mode options
|
108
|
+
- **Flow Orchestration**: `@flow` decorator for building DAGs with automatic dependency resolution
|
109
|
+
- **Dynamic Fan-Out**: `fan_out()` for runtime task creation based on upstream results
|
110
|
+
- **Multiple Execution Modes**: async, thread pool, and process pool execution
|
111
|
+
- **Caching & Artifacts**: Task result caching and large result persistence
|
112
|
+
- **Observability**: Built-in logging, metrics, tracing, and event system
|
113
|
+
- **Configuration**: Environment-based config with structured logging
|
114
|
+
- **CLI Tools**: Run, describe, and list flows via command line
|
115
|
+
- **Secrets Management**: Pluggable secrets providers
|
116
|
+
- **Failure Handling**: Configurable retry policies and failure propagation
|
107
117
|
|
108
118
|
|
109
119
|
|
@@ -124,7 +134,7 @@ poetry run pytest --cov=auto_workflow --cov-report=term-missing
|
|
124
134
|
|
125
135
|
### Define Tasks
|
126
136
|
```python
|
127
|
-
from auto_workflow import task, flow
|
137
|
+
from auto_workflow import task, flow, fan_out
|
128
138
|
|
129
139
|
@task
|
130
140
|
def load_numbers() -> list[int]:
|
@@ -141,8 +151,8 @@ def aggregate(values: list[int]) -> int:
|
|
141
151
|
@flow
|
142
152
|
def pipeline():
|
143
153
|
nums = load_numbers()
|
144
|
-
#
|
145
|
-
squared =
|
154
|
+
# Dynamic fan-out: create tasks for each number
|
155
|
+
squared = fan_out(square, nums)
|
146
156
|
return aggregate(squared)
|
147
157
|
|
148
158
|
if __name__ == "__main__":
|
@@ -196,27 +206,18 @@ Mode selection:
|
|
196
206
|
|
197
207
|
|
198
208
|
## Building Flows & DAGs
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
```python
|
212
|
-
from auto_workflow import FlowBuilder
|
213
|
-
fb = FlowBuilder(name="my_flow")
|
214
|
-
a = fb.task(task_a)
|
215
|
-
b = fb.task(task_b, a)
|
216
|
-
c = fb.task(task_c, a, b)
|
217
|
-
flow = fb.build()
|
218
|
-
flow.run()
|
219
|
-
```
|
209
|
+
Flows are defined using the `@flow` decorator:
|
210
|
+
|
211
|
+
```python
|
212
|
+
@flow
|
213
|
+
def my_flow():
|
214
|
+
a = task_a()
|
215
|
+
b = task_b(a)
|
216
|
+
c = task_c(a, b)
|
217
|
+
return c
|
218
|
+
```
|
219
|
+
|
220
|
+
Task dependencies are determined automatically by passing task invocation results as arguments to other tasks.
|
220
221
|
|
221
222
|
|
222
223
|
## Dynamic Fan-Out / Conditional Branching
|
@@ -250,13 +251,16 @@ def conditional_flow(flag: bool):
|
|
250
251
|
|
251
252
|
|
252
253
|
## Result Handling, Caching & Idempotency
|
253
|
-
|
254
|
+
Tasks support caching with TTL and artifact persistence for large results:
|
254
255
|
|
255
|
-
Example (concept):
|
256
256
|
```python
|
257
|
-
@task(cache_ttl=3600)
|
257
|
+
@task(cache_ttl=3600) # Cache for 1 hour
|
258
258
|
def expensive(x: int) -> int:
|
259
259
|
return do_work(x)
|
260
|
+
|
261
|
+
@task(persist=True) # Store large results via artifact store
|
262
|
+
def produce_large_dataset() -> dict:
|
263
|
+
return {"data": list(range(1000000))}
|
260
264
|
```
|
261
265
|
|
262
266
|
|
@@ -266,7 +270,9 @@ Per-task configuration:
|
|
266
270
|
@task(retries=3, retry_backoff=2.0, retry_jitter=0.3, timeout=30)
|
267
271
|
def flaky(): ...
|
268
272
|
```
|
269
|
-
Failure policy options
|
273
|
+
Failure policy options:
|
274
|
+
- `FAIL_FAST`: Stop on first error (default)
|
275
|
+
- `CONTINUE`: Continue executing independent tasks
|
270
276
|
|
271
277
|
|
272
278
|
## Hooks, Events & Middleware
|
@@ -285,35 +291,40 @@ def timing_middleware(next_call):
|
|
285
291
|
return wrapper
|
286
292
|
```
|
287
293
|
|
288
|
-
Event bus
|
294
|
+
Event bus: structured events with pluggable subscribers for custom logging and monitoring.
|
289
295
|
|
290
296
|
|
291
297
|
## Configuration & Environment
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
```
|
299
|
-
Environment overrides are available for documented keys (see docs/configuration.md).
|
298
|
+
Configuration via environment variables:
|
299
|
+
- `AUTO_WORKFLOW_LOG_LEVEL`: Set logging level (default: INFO)
|
300
|
+
- `AUTO_WORKFLOW_DISABLE_STRUCTURED_LOGS`: Disable structured logging
|
301
|
+
- `AUTO_WORKFLOW_MAX_DYNAMIC_TASKS`: Limit dynamic task expansion
|
302
|
+
|
303
|
+
See docs/configuration.md for full details.
|
300
304
|
|
301
305
|
|
302
306
|
## Observability (Logging, Metrics, Tracing)
|
303
|
-
|
307
|
+
Built-in observability features:
|
308
|
+
|
309
|
+
- **Structured Logging**: Automatic JSON-formatted logging with task/flow context
|
310
|
+
- **Metrics**: Pluggable metrics providers (in-memory and custom backends)
|
311
|
+
- **Tracing**: Task and flow execution spans for performance monitoring
|
312
|
+
- **Events**: Pub/sub event system for task lifecycle hooks
|
313
|
+
- **Middleware**: Chain custom logic around task execution
|
304
314
|
|
305
315
|
|
306
|
-
## Extensibility
|
316
|
+
## Extensibility
|
307
317
|
| Extension | Interface | Status |
|
308
318
|
|-----------|-----------|--------|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
319
|
+
| Storage backend | `ArtifactStore` | ✅ Implemented |
|
320
|
+
| Cache backend | `ResultCache` | ✅ Implemented |
|
321
|
+
| Metrics provider | `MetricsProvider` | ✅ Implemented |
|
322
|
+
| Tracing adapter | `Tracer` | ✅ Implemented |
|
323
|
+
| Secrets provider | `SecretsProvider` | ✅ Implemented |
|
324
|
+
| Event middleware | Middleware chain | ✅ Implemented |
|
325
|
+
| Executor plugins | `BaseExecutor` | Future |
|
326
|
+
| Scheduling layer | External module | Future |
|
327
|
+
| UI / API | Optional service | Future |
|
317
328
|
|
318
329
|
|
319
330
|
## Security & Isolation Considerations
|
@@ -365,7 +376,7 @@ docs/
|
|
365
376
|
|
366
377
|
**Q: Do I need decorators?** No; you can manually wrap callables into Tasks if you prefer pure functional style.
|
367
378
|
|
368
|
-
**Q: How does it serialize arguments across processes?**
|
379
|
+
**Q: How does it serialize arguments across processes?** Uses cloudpickle for process execution mode.
|
369
380
|
|
370
381
|
**Q: Scheduling / cron?** Out of core scope—provide a thin adapter so external schedulers (cron, systemd timers, GitHub Actions) can invoke flows.
|
371
382
|
|
@@ -400,7 +411,7 @@ Contributions are welcome once the core API draft solidifies. Until then:
|
|
400
411
|
3. Adhere to Ruff formatting & lint rules (pre-commit enforced).
|
401
412
|
4. Add or update examples & docs for new features.
|
402
413
|
|
403
|
-
|
414
|
+
See `CONTRIBUTING.md` for detailed contribution guidelines.
|
404
415
|
|
405
416
|
|
406
417
|
## Versioning & Stability
|
@@ -24,8 +24,8 @@ auto_workflow/task.py,sha256=SWWOku4oN1pQU2hGHDlaU09wgsbGOnRifyO14ir5-EE,5562
|
|
24
24
|
auto_workflow/tracing.py,sha256=UH6pQbnrXJpF59XcvsRRiNPKzgtP9pkVeR9YKXD0Ihk,619
|
25
25
|
auto_workflow/types.py,sha256=2C-SBNG9YQNqw6nApOXatDsmkBRF0oBxm2jsSEbYAs8,538
|
26
26
|
auto_workflow/utils.py,sha256=sWu303zJR5vz6ncP-zXTxpR6q97N8dZRt22ZxhwRI0c,1186
|
27
|
-
auto_workflow-0.1.
|
28
|
-
auto_workflow-0.1.
|
29
|
-
auto_workflow-0.1.
|
30
|
-
auto_workflow-0.1.
|
31
|
-
auto_workflow-0.1.
|
27
|
+
auto_workflow-0.1.1.dist-info/LICENSE,sha256=0R_K7rXirniQSUGGNOLY97m7rCIyrb8C05mycpAV6FY,35072
|
28
|
+
auto_workflow-0.1.1.dist-info/METADATA,sha256=K0B_ovA7TXz7H6QIYXqoUGohcbldjTE0ZTWGombFrsE,15467
|
29
|
+
auto_workflow-0.1.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
30
|
+
auto_workflow-0.1.1.dist-info/entry_points.txt,sha256=7De4UkwX05DfQ3E4b3qvB9m2ovW4mSsO1qRUcxjWERo,56
|
31
|
+
auto_workflow-0.1.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|