Skip to main content

LeashByte Python SDK

A Python client for the stable LeashByte REST API. The models are generated from openapi.json, and a hand-written client on top adds authentication, binary downloads and run polling. It needs Python 3.13.

Install it from PyPI:

pip install leashbyte-sdk

With uv, use uv add leashbyte-sdk. From a checkout of the repository, uv pip install ./sdk/python installs the copy in your tree.

import os

from leashbyte_sdk import FetchRequest, LeashByteClient, RunCreateRequest

with LeashByteClient(api_key=os.environ["LEASHBYTE_API_KEY"]) as client:
    page = client.fetch(FetchRequest(url="https://example.com"))
    results = client.search("self-hosted web automation", limit=3)
    run = client.create_run(
        RunCreateRequest(
            goal="Read the page title. Return it as the result.",
            start_url="https://example.com",
        )
    )
    finished = client.wait_for_run(run.id)
    print(page.content)
    print(results.results)
    print(finished.state)

You can leave out api_key and set LEASHBYTE_API_KEY or LEASHBYTE_API_KEY_FILE instead, which keeps the key out of your code. The default base URL is http://127.0.0.1:8080.

The client never logs keys, and its repr and API errors redact the configured one. Run artifacts and screenshots can contain page data, so keep them in private storage. For browser logins, use credential placeholders. Passwords don't belong in goals, URLs or ordinary text actions.

Metadata

Release files for leashbyte-sdk 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for leashbyte-sdk 0.1.1
File Size Uploaded Provenance Actions
leashbyte_sdk-0.1.1.tar.gz 11.2 kB Without provenance Details for leashbyte_sdk-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for leashbyte-sdk 0.1.1
File Interpreter ABI Platform Actions
leashbyte_sdk-0.1.1-py3-none-any.whl Python 3 none any Details for leashbyte_sdk-0.1.1-py3-none-any.whl

Total release size: 23.9 kB

Release files / leashbyte_sdk-0.1.1.tar.gz

Download URL leashbyte_sdk-0.1.1.tar.gz
Size 11.2 kB
Tags Source
SHA-256 checksum
How to use checksums
39063f4b3b3cc28ff5d62ea5fd8a17f33909fda7e120f232603ead517c57af77
BLAKE2b-256 checksum
How to use checksums
32bf4cf9617eee3f5a4ac502e364ba487dae2cf5124413bbd24af8e739267d3c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.15

Release files / leashbyte_sdk-0.1.1-py3-none-any.whl

Download URL leashbyte_sdk-0.1.1-py3-none-any.whl
Size 12.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ac44f2c397c0d56d67f369d949f90eaebe7bb119dcc7b02905cddacb27cc99b9
BLAKE2b-256 checksum
How to use checksums
15571725205093128864c44b4fa0cc7fd1e77e4dcdf6db2718c8c47ec3f35719
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.15

Security for leashbyte-sdk 0.1.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page