Metadata-Version: 2.4
Name: toollane
Version: 0.0.1
Summary: A concurrency-safety-aware scheduler for LLM tool-call batches.
License-Expression: MIT
License-File: LICENSE
Requires-Python: >=3.10
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == 'dev'
Description-Content-Type: text/markdown

# ToolLane (Python)

Ported line-for-line from the TypeScript implementation. See the
[root README](../README.md) for the pitch, the prior-art table, and the
scope decisions — this file only covers what's specific to running the
Python code.

## Install

```bash
pip install -e ".[dev]"
```

## Quickstart

```bash
PYTHONPATH=src python3 examples/quickstart.py
```

```python
from toollane import ToolLane

tool_lane = ToolLane(is_safe=lambda call: call.name in {"read_file", "list_dir", "grep"})

for lane in tool_lane.plan(calls):
    print(lane.mode, [c.name for c in lane.calls])

async for result in tool_lane.run(calls):
    # result.status is "fulfilled" or "rejected" — one failure never
    # stops the rest of the batch.
    ...
```

## Test

```bash
pytest
```

## Status

Lane scheduling, streamed execution via an async generator, and isolated
failure handling are real and tested. Not yet published to PyPI —
`toollane` is unclaimed there.
