warpweft
A declarative framework for building resilient, observable service components in async Python. You write a component's calls; warpweft wraps every call with retry, timeout, circuit breaking, caching, concurrency limiting and telemetry - driven by configuration, not boilerplate.
Async-only, built on anyio (runs on asyncio and
trio). Typed throughout (mypy --strict).
Install
pip install warpweft # core + runtime
pip install warpweft[mcp] # + expose components as Model Context Protocol tools
pip install warpweft[yaml] # + YAML config files
A taste
from warpweft import AComponent, App, component, invocable
class WeatherSettings(BaseModel):
base_url: str
@component
class Weather(AComponent[WeatherSettings, str, dict]):
@invocable
async def forecast(self, city: str) -> dict:
resp = await self._client.get(f"/forecast/{city}")
resp.raise_for_status()
return resp.json()
app = App(
env_prefix="MYAPP",
config={"weather": {"policy": {"retry": {"attempts": 3, "base_delay": 0.1, "max_delay": 1.0}}}},
)
async with app.run():
forecast = await app.proxy(Weather).forecast(city="oslo") # runs through the chain
Everything useful is importable from warpweft; focused surfaces have their own
module - warpweft.formats (field formats), warpweft.testing (test helpers),
warpweft.mcp (MCP tools, with the extra). The internal layers remain available
as warpweft.core.* and warpweft.runtime.*.
Documentation
- Write your first component - from nothing to a tested component.
- Runtime - the App,
@component, autodiscovery, config and the lifespan. - Composition - registry, container, dependency graph, lifecycle, axes, health.
- Telemetry - spans, metrics and the semantic conventions.
- Logging - the library logging convention.
- MCP tools - exposing invocables to LLMs.
Requirements
- Python >= 3.11
- uv for development
Development
uv sync # dev environment (editable install + tools)
uv run pre-commit install # git hooks
uv run pytest # tests, on both anyio backends
uv run ruff check . # linter
uv run ruff format --check . # formatter
uv run mypy src # type checking
See CONTRIBUTING.md for the commit format, DCO and checks.
Metadata
Release files for warpweft 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| warpweft-0.1.0.tar.gz | 969.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| warpweft-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.1 MB
Release files / warpweft-0.1.0.tar.gz
| Download URL | warpweft-0.1.0.tar.gz |
|---|---|
| Size | 969.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eb99f2b0ff6b1308ddb5055682aedfd671278887fb7a81eea885084a50c95a1b
|
|
BLAKE2b-256 checksum How to use checksums |
3c7294fda16669d401f9eaa708583b88d4cba0b7674b93d77b7afba37ebd0093
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.
Transparency logRelease files / warpweft-0.1.0-py3-none-any.whl
| Download URL | warpweft-0.1.0-py3-none-any.whl |
|---|---|
| Size | 87.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
374d85f65b5251276e168e3fbdcefa670fcbf48ac0530eef0d2c0c72b41cc198
|
|
BLAKE2b-256 checksum How to use checksums |
92acda2a8b1bcca2504581ee7d6eaad439c3d1d62478b03659a3cf11e87b6b27
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.
Transparency log