Skip to main content

ToolLane (Python)

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

Install

pip install -e ".[dev]"

Quickstart

PYTHONPATH=src python3 examples/quickstart.py
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

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.

Download files

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

Source Distribution

toollane-0.0.1.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

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

toollane-0.0.1-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file toollane-0.0.1.tar.gz.

File metadata

  • Download URL: toollane-0.0.1.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.8

File hashes

Hashes for toollane-0.0.1.tar.gz
Algorithm Hash digest
SHA256 c20c50afa553172c08a80a8c83fa460a526c5fb64fa605ec670a92ae2070b33d
MD5 039bdd108ac34ed1c522a7dc42ab99e5
BLAKE2b-256 5aa2aea1bedc35576afc055f617230b2c65c9a06e01db7335a54d5c711d14a79

See more details on using hashes here.

File details

Details for the file toollane-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: toollane-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.8

File hashes

Hashes for toollane-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a3310668df477c2c7a9beef7292c0949c5b931ad68c6c98e254f89a376f7c5e9
MD5 deb7afbb666a1c3f48d0e6482dc0c510
BLAKE2b-256 2ea1194ce245c642bdf923f71cefe0fc342d4efbeafef2b8d62f1fe916f65302

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