Skip to main content

wayforth-sdk

PyPI

Python SDK for Wayforth — search, execute, and pay for ~5,000 indexed APIs from one client. Talks to the production gateway (https://gateway.wayforth.io) and authenticates with your wf_live_ API key.

Get a free key at wayforth.io/signup (100 credits, no card required).

Install

pip install wayforth-sdk
# or
uv add wayforth-sdk

Usage

from wayforth import Wayforth

client = Wayforth(api_key="wf_live_...")

# Search by natural-language intent (returns {"query", "results": [...], ...})
hits = client.search("translate text to Spanish")
for svc in hits["results"][:3]:
    print(f"{svc['name']}  WRI {svc['wri']}  tier {svc['coverage_tier']}")

# Execute a managed service directly — Wayforth holds the upstream key
result = client.execute("deepl", text="Hello world", target_lang="ES")
print(result)

# Intent-based routing — Wayforth picks the best service and runs it in one call
result = client.run("summarize this article", content="...")
print(result)

# Account
print(client.balance())   # credits + plan
print(client.me())        # whoami

Async client:

from wayforth import AsyncWayforth

async with AsyncWayforth(api_key="wf_live_...") as client:
    hits = await client.search("real-time stock data")
    result = await client.execute("alphavantage", symbol="AAPL")

Batch up to 5 calls in parallel:

client.execute_batch([
    {"slug": "groq",  "params": {"messages": [{"role": "user", "content": "2+2?"}], "model": "llama-3.3-70b-versatile"}},
    {"slug": "deepl", "params": {"text": "Good morning", "target_lang": "FR"}},
])

API

Wayforth(api_key, base_url="https://gateway.wayforth.io")

Synchronous client.

AsyncWayforth(api_key, base_url="https://gateway.wayforth.io")

Async client — same methods, all await-able.

Methods

Method Endpoint Description
search(query, limit=5, category=None, tier_min=None) GET /search Search by natural-language intent (1 credit)
query(ql, **kwargs) POST /query Structured WayforthQL query (starter tier+)
services(category=None, tier=None, limit=20, offset=0) GET /services List catalog services
get_service(service_id) GET /services/{id} One service by id (None if 404)
get_similar(service_id, limit=5) GET /services/similar/{id} Co-used services
execute(slug, **params) POST /execute Run a managed service by slug
execute_batch(calls) POST /execute/batch Up to 5 managed calls in parallel
run(intent, **params) POST /run Intent → search → rank → execute
pay(service_id, amount_usd=0.001, track="auto", query_id=None) POST /pay Pay via card credits or USDC
balance() GET /billing/balance Credit balance and plan
credits() GET /account/credits Credit summary
tier() GET /account/tier Current tier
usage_history() GET /account/usage/history Usage history
me() GET /auth/me Authenticated account (whoami)
get_tiers() GET /keys/tiers Tiers and pricing
stats() GET /stats Catalog statistics
status() GET /health Gateway health
get_identity(agent_id) GET /identity/{id} Agent identity / trust score
register_identity(agent_id, display_name="") POST /identity/register Register an agent identity

Errors

All raise subclasses of WayforthError (status_code attribute): AuthenticationError (401), InsufficientCreditsError (402, with credits_remaining / credits_required / upgrade_url), ServiceUnavailableError (5xx). Requests retry up to 3× on 5xx with exponential backoff.

Full API reference: gateway.wayforth.io/docs

Metadata

Release files for wayforth-sdk 0.9.0

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

Source distribution (sdist)

Source distribution for wayforth-sdk 0.9.0
File Size Uploaded Provenance
wayforth_sdk-0.9.0.tar.gz 10.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for wayforth-sdk 0.9.0
File Interpreter ABI Platform
wayforth_sdk-0.9.0-py3-none-any.whl Python 3 none any Details

Total release size: 17.6 kB

Release files / wayforth_sdk-0.9.0.tar.gz

Download URL wayforth_sdk-0.9.0.tar.gz
Size 10.1 kB
Tags Source
SHA-256 checksum
How to use checksums
d85fc844e347c28045e4f7b4df44b9f5e978e8bfc2e4521c304ba235425edc09
BLAKE2b-256 checksum
How to use checksums
e1c5f1b6036684d410681b411ad382c21ed4b5ac5301803fe51fb0cbb268d6a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / wayforth_sdk-0.9.0-py3-none-any.whl

Download URL wayforth_sdk-0.9.0-py3-none-any.whl
Size 7.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
234d07cc3646fc7887873a991e626ae2432a371724a87632abf4081ac15bd95a
BLAKE2b-256 checksum
How to use checksums
e9f48d5593593ffbe3ba503142ae5aaedee91ac80c5f6ee44dc3b0bb817517a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for wayforth-sdk 0.9.0

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