Skip to main content

Inline task orchestration for Python

Project description

Wove

PyPI GitHub license coverage GitHub last commit PyPI - Downloads GitHub stars Ko-fi Link

Python 3.8 Python 3.9 Python 3.10 Python 3.11 Python 3.12 Python 3.13 Python 3.14 Python 3.14 (free-threaded)

Beautiful Python async.

What is Wove For?

Wove is for running high latency async tasks like web requests and database queries concurrently in the same way as asyncio, but with a drastically improved user experience.

Improvements compared to asyncio include:

  • Reads Top-to-Bottom: The workflow is declared in the order it runs, inline with the code that needs the result.
  • Implicit Parallelism: Parallelism and execution order are implicit based on function and parameter naming.
  • Sync or Async: Mix async def and def freely without restructuring the call site around one concurrency style.
  • Normal Python Data: Task outputs behave like normal Python values without making you manage shared mutable state.
  • Automatic Scheduling: Wove builds a dependency graph from your task signatures and runs independent tasks concurrently as soon as possible.
  • Automatic Detachment: Run inline workflows outside the current request, command, or worker when waiting would be the wrong user experience.
  • Remote Task Environments: Keep quick work local while sending selected long-running or infrastructure-heavy tasks to your worker service, queue, workflow engine, cluster, or scheduler.
  • Extensibility: Define parallelized workflow templates that can be overridden inline.
  • High Visibility: Wove includes debugging tools that allow you to identify where exceptions and deadlocks occur across parallel tasks, and inspect inputs and outputs at each stage of execution.
  • Minimal Boilerplate: Get started with just the with weave() as w: context manager and the @w.do decorator.
  • Fast: Wove has low overhead and internally uses asyncio, so performance is comparable to using threading or asyncio directly.
  • Free Threading Compatible: Running a modern GIL-less Python? Build true multithreading without changing the workflow shape.
  • Zero Required Dependencies: Core Wove installs without third-party packages. Serialization, networking, and backend libraries are only needed when a workflow opts into features that use them.

Install

Install Wove with uv:

uv add wove

Or with pip:

pip install wove

Documentation

The full documentation includes topic guides, API reference pages, executor setup, backend adapter setup, and version history.

View Documentation

Topics

The topic path starts with the smallest useful weave, then adds the things real workflows need as they grow: fanout, task policy, reuse, helper glue, failure handling, observability, background work, remote execution, and production patterns.

Reference

Reference material pins down the public surface of Wove: imports, configuration shape, environment resolution, executor contracts, network executors, and backend adapter setup. Reference pages answer what each feature accepts, returns, guarantees, and raises once the workflow shape is already clear.

Core Behavior

Core behavior covers the names and runtime rules that everything else builds on: stable imports, environment resolution, and the guarantees Wove keeps before any executor-specific or adapter-specific behavior is involved.

  • Public API: stable imports most users should rely on.
  • Environments: persistent execution profiles, defaults, and precedence rules.
  • Executors: delivery interfaces for local, subprocess, and direct network execution.
  • Backend Adapters: bridges from Wove tasks into existing task systems, queues, clusters, and schedulers.

Runtime Modules

Runtime module references connect public concepts back to the objects that implement and enforce them.

  • wove.runtime: process-wide wove.config(...) behavior.
  • wove.environment: executor interfaces, runtime delivery errors, and executor runtime classes.
  • wove.backend: backend callback transport and dispatch payload helpers.
  • wove.integrations: adapter registry, adapter base interface, and worker entrypoints.

Executors

Executors are the delivery layer for Wove environments. They carry task frames to local execution, subprocess workers, or direct worker services over HTTP, gRPC, and WebSocket while keeping result collection attached to the weave.

Backend Adapters

Backend adapters are separate from direct executors because an existing task system owns delivery behavior: queueing, scheduling, retries, worker placement, or batch execution. They let a Wove task enter infrastructure the project already runs while Wove keeps the task result attached to the local weave.

Version History

Wove's version history records the major and minor release series. Patch releases are not listed separately unless they change the shape of a series.

  • 2.0.0: remote task environments and the new execution-environment layer.
  • 1.0.0: stable local inline concurrency and background processing.
  • 0.3.0: reusable weave classes, richer task controls, and helpers.
  • 0.2.0: dynamic task mapping and executor management.
  • 0.1.0: initial public release.

Benchmarks

Wove has low overhead and internally uses asyncio, so its performance is comparable to using threading or asyncio directly. The benchmark script below is available in the /examples directory.

$ python examples/benchmark.py
Starting performance benchmarks...
Number of tasks: 200
CPU load iterations per task: 100000
I/O sleep duration per task: 0.1s
===================================
--- Running Threading Benchmark ---
Threading total time: 0.6978 seconds
-----------------------------------
--- Running Asyncio Benchmark ---
Asyncio total time: 0.6831 seconds
-----------------------------------
--- Running Wove Benchmark ---
Wove timing details:
  - data: 0.5908s
  - planning: 0.0001s
  - tier_1_execution: 0.6902s
  - tier_1_post_execution: 0.0000s
  - tier_1_pre_execution: 0.0004s
  - wove_task: 0.6882s
Wove total time: 0.6937 seconds
-----------------------------------
--- Running Wove Async Benchmark ---
Wove Async timing details:
  - data: 0.5515s
  - planning: 0.0000s
  - tier_1_execution: 0.6550s
  - tier_1_post_execution: 0.0000s
  - tier_1_pre_execution: 0.0004s
  - wove_async_task: 0.6534s
Wove Async total time: 0.6571 seconds
-----------------------------------
Benchmarks finished.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wove-2.0.2.tar.gz (83.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wove-2.0.2-py3-none-any.whl (56.2 kB view details)

Uploaded Python 3

File details

Details for the file wove-2.0.2.tar.gz.

File metadata

  • Download URL: wove-2.0.2.tar.gz
  • Upload date:
  • Size: 83.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.5

File hashes

Hashes for wove-2.0.2.tar.gz
Algorithm Hash digest
SHA256 bc82d801e0ca89e919728ea20aa663388fc6e1d07e39dfc450e1f658a4006b0f
MD5 e5c2b29a48819a21e83cf2d74d9114c5
BLAKE2b-256 62cafd1fec17515892da00ba34aab1cf342620424674cb392275381007143af6

See more details on using hashes here.

File details

Details for the file wove-2.0.2-py3-none-any.whl.

File metadata

  • Download URL: wove-2.0.2-py3-none-any.whl
  • Upload date:
  • Size: 56.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.5

File hashes

Hashes for wove-2.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5962aa28c31a816af316bda2c3fb4e9fcd98ba8050d332f85f262e53ecd5d0ab
MD5 cad8c0ef83d23f33ba3a7d7fb7aa4767
BLAKE2b-256 a8063760298f6681030202245dc6a78180d4c3609051ce5701dfa300bc181431

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page