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.2

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.2
File Size Uploaded Provenance Actions
leashbyte_sdk-0.1.2.tar.gz 11.2 kB Without provenance Details for leashbyte_sdk-0.1.2.tar.gz

Built distribution (wheel)

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

Total release size: 23.9 kB

Release files / leashbyte_sdk-0.1.2.tar.gz

Download URL leashbyte_sdk-0.1.2.tar.gz
Size 11.2 kB
Tags Source
SHA-256 checksum
How to use checksums
e31b142ea8bc4b1d7facf6819667263093d4b2c58b47b6ac7bcbeb4cbd1e876b
BLAKE2b-256 checksum
How to use checksums
1f6e0ed1e65f3d3aa0a10e2e1caf76eb9a03847c4d4fb2cdd8ab8cb29dd4d09b
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.2-py3-none-any.whl

Download URL leashbyte_sdk-0.1.2-py3-none-any.whl
Size 12.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b10762a12c79a318f7f9908f3ff451867caa8d554c692b04aba429c1017700ab
BLAKE2b-256 checksum
How to use checksums
04469beb363328932f2f8182c2ff83c5f7c8fe31631e9413c376987353c06546
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.2

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