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

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

Built distribution (wheel)

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

Total release size: 23.9 kB

Release files / leashbyte_sdk-0.1.3.tar.gz

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

Download URL leashbyte_sdk-0.1.3-py3-none-any.whl
Size 12.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
446da7ed76fc408fb51396d9a258c8665f0f4b3d32bd3c414b5674fbeec65ade
BLAKE2b-256 checksum
How to use checksums
1f42c32c9b6ba2bee5fe5e9ac2eaf2e896bb81bbcdef81a37e70240f0b02d2d8
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.3

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