Scan your whole stack
From OX Research Newsroom
Are you using weft-sdk?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.32.16
weft-sdk was last scanned on 29 Nov 2026 at version 0.32.16. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.32.16 LATEST | 29 Nov 2026 | No rules fired |
| 0.32.15 | 29 Nov 2026 | No rules fired |
| 0.32.12 | 20 Nov 2026 | No rules fired |
| 0.32.9 | 14 Nov 2026 | Not shown |
| 0.32.8 | 2 Nov 2026 | Not shown |
Findings for v0.32.16. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.32.16; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
weft-sdk for PythonThe supported Python buyer client for Weft. Generated OpenAPI APIs remain
available under weft_sdk.generated as an advanced escape hatch.
Use Python compatible with the requires-python contract in
pyproject.toml. For source development, use the pinned Mise
runtime and installation/build/unit steps in the
repository README; those checks need
no buyer key. This package is a library, not a server, so no independent
start/stop step applies.
The examples below call a real Weft account and are optional consumer usage,
not source setup verification. Create a buyer wk_* key in
Dashboard → API keys, then:
pip install weft-sdk
export WEFT_API_KEY="wk_..."
import os
from weft_sdk import Client
api_key = os.environ["WEFT_API_KEY"]
with Client(api_key=api_key) as weft:
account = weft.me()
results = weft.search(query="weather data API", max_results=5)
print(account.data)
print(results.results)
The client defaults to https://weft.network.
Paid fetches require both a maximum cost and an idempotency key. Reuse the key when retrying the same logical purchase after an uncertain response.
from uuid import uuid4
idempotency_key = str(uuid4())
artifact = weft.fetch(
url="https://merchant.example/data",
max_cost_usd="0.05",
idempotency_key=idempotency_key,
)
All buyer-client methods raise the same WeftError shape, including the HTTP
status, stable error code, request ID, retry hint, and structured details.
from weft_sdk import WeftError
try:
results = weft.search(query="weather data API")
except WeftError as error:
print(error.status, error.code, error.request_id, error.retryable, error.charge)
print(error.details)
raise
401: confirm that WEFT_API_KEY contains a current buyer wk_* key.403: inspect code and details for an insufficient balance or spending
policy denial before changing the request.409 (IDEMPOTENCY_CONFLICT): this buyer already used the supplied
idempotency key for a different fetch request. Generate a new key for the
new operation; the original operation retries unchanged with its own key.
retryable is False — resending the conflicting request will conflict
again.429: honor Retry-After and back off.5xx: retry transient failures with backoff; reuse the idempotency key for a
paid fetch.status == 0 (NETWORK_ERROR): the request failed before any Weft
response, so the outcome is uncertain. retryable is True; retry with
backoff and reuse the idempotency key for a paid fetch.charge: "none" means this call cannot have paid. For a fetch, Weft
refused before it signed a payment (for example EXCEEDED_MAX_COST or
MERCHANT_RETURNED_NON_402). "possible" means this fetch can have paid
(a 5xx, a network error, PAID_DELIVERY_FAILED). After "possible", retry
only with the same idempotency key and the same request: Weft returns the
stored response or reuses the existing payment. A new key can pay again.
"none" covers this call only; an earlier call with the same key can still
have paid.See the API reference for the complete contract. Product guides live on weftlabs.com.
Use WeftASGIMiddleware. weft_require_payment, weft_flask_require_payment, and WeftPaymentMiddleware do not work on x402 2.x.
create_auth_headers must be synchronous. x402 reads those headers on a sync call.
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.