nevarn-sdk (Python)
A thin client for the Nevarn platform API, for an operator's own bot and
servers. It adds no authority: a bot sends intents, never orders or keys, and
every method calls a route an nvk_ API key is already scoped for. Contract:
docs/strategy/Contract.md; design: docs/workplans/agent-sdk.design.md.
Free to download, under the Apache License 2.0 (LICENSE, NOTICE). Using
the Nevarn platform it calls is licensed on the platform, by governed actions
or by subscription.
from datetime import datetime, timezone
import nevarn
client = nevarn.Client(baseUrl="https://<your platform API>") # key from NEVARN_API_KEY
print(client.getMandate().intents) # shadow mode, and the Decionis policy for each strategy
ruling = client.proposeIntent(
strategy="polymarket",
intentKey="momentum-1", # your idempotency key: reuse it to retry, never for other terms
intent={"token_id": "7132…", "side": "BUY", "maker_amount": 5_000_000,
"taker_amount": 10_000_000, "observed_at": datetime.now(timezone.utc)},
)
print(ruling.verdict, ruling.wouldExecute, ruling.reasons) # executed is always False in shadow
# With an `execute` key: on paper in the tenant's Sandbox, live in Production.
execution = client.executeIntent(strategy="polymarket", intentKey="momentum-2", intent={...})
print(execution.environment, execution.state, execution.paper) # "sandbox", "paper_filled", the fill
print(client.getExecution(execution.id).state) # Production: queued, then submitted, confirmed
| Method | Route | Key scope | Today |
|---|---|---|---|
proposeIntent |
POST /machine/intents |
intents |
Shadow ruling; nothing is sent to a venue |
executeIntent |
POST /machine/executions |
execute |
Sandbox: a paper fill and shadow rulings. Production: queued, ruled in ENFORCEMENT at the venue, sent with the tenant's venue credentials |
getExecution |
GET /machine/executions/{id} |
execute |
One execution and its current state |
getMandate |
GET /machine/mandate |
read |
Limits, signing grants, payables policy, intent policies, the execution environment and key limits, this month's governed actions |
getReceipt |
GET /machine/receipts/{id} |
read |
One execution receipt, by the execution's id |
halt |
POST /machine/halt |
halt |
Turns all signing off and stops the bots' unfinished executions; there is no resume |
requestSpend |
POST /machine/invoices |
invoices |
Files a supplier invoice |
proposeIntent refuses, before sending, an intent with a field named like a
secret (private_key, signature, apiKey, …) or a value shaped like a
private key. A reused intent key with other terms raises IntentConflict
(409), as does an intent sent while the deployment has shadow mode off.
executeIntent takes the same terms and runs the same local check. Where the
order goes is the tenant's environment, never the bot's choice. An execute
key is minted by an owner with its own limits (orders a minute, the largest
order, a 24-hour total, in USDC minor units), and it executes polymarket and
sports intents. A refusal raises ExecutionRefused (409) whose code says
why: key_order_limit_exceeded, key_daily_limit_exceeded,
tenant_order_limit_exceeded, tenant_halted, intent_replayed,
intent_key_reused, key_minted_without_wallet (a key minted from a password
sign-in asked for Production; it executes in Sandbox only), strategy_not_executable,
policy_not_published, policy_mapping_unpublished, runtime_adapter_unpinned or
authority_not_configured. The key's minute window raises RateLimited (429).
requestSpend files a supplier invoice; it is not a request for raw funds. The
platform's payables policy decides the outcome: the vendor must already be
verified and the destination must be its payout address; tiers 1–2 are paid
automatically, tier 3 waits for an owner, tier 4 is paid by the customer. A
duplicate raises Conflict (409).
Guarantees
- The base URL is required and must be
https(plainhttponly on127.0.0.1,localhostor[::1]). There is no default. - The key comes only from the constructor or
NEVARN_API_KEY, must be annvk_key, and never appears inrepr, errors or logs. Session tokens are refused. - Redirects are refused, the timeout is 5 seconds, and errors carry only the status, the platform error code and the path template.
- There is no method for limits, resume, keys, vendors or approvals, and
halttakes only an optional reason.
Tests
python -m pytest tests -q
The platform contract tests are apps/platform/tests/test_sdk_contract.py
and test_shadowbot_example.py, which runs examples/shadowbot through the
real app.
Licence and release
Apache License 2.0 (LICENSE; NOTICE names Binaries Fort AB). The licence
covers this client only; the platform's use is licensed on the platform, by
governed actions or subscription.
Publishing stays the owner's: PyPI ownership of nevarn-sdk and the release
workflow. Until then the Private :: Do Not Upload classifier makes PyPI
refuse an upload; the owner removes it in the release change.
Metadata
Release files for nevarn-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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nevarn_sdk-0.1.1.tar.gz | 26.0 kB | With provenance | Details for nevarn_sdk-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nevarn_sdk-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for nevarn_sdk-0.1.1-py3-none-any.whl |
Total release size: 48.9 kB
Release files / nevarn_sdk-0.1.1.tar.gz
| Download URL | nevarn_sdk-0.1.1.tar.gz |
|---|---|
| Size | 26.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0b855ddecc6cb8f4d7b6277334b1a7763cb48bd7db229c093626240761e77413
|
|
BLAKE2b-256 checksum How to use checksums |
6e4dd06aeaaf74847d71cdc1b76e3cbf5be506009b012eb885bd6156375a5b42
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.
Transparency logRelease files / nevarn_sdk-0.1.1-py3-none-any.whl
| Download URL | nevarn_sdk-0.1.1-py3-none-any.whl |
|---|---|
| Size | 22.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dcf744afe67b60f52c2429c97a653743bb387a5294f49c31a58a6fe2e58b65f8
|
|
BLAKE2b-256 checksum How to use checksums |
1c1b084f118a3ae5098504632924c6172f5216ee69b803e9227f4e23c6448128
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.
Transparency logSecurity for nevarn-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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for nevarn_sdk-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.
Transparency logA 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.