Skip to main content

Kynver developer SDK — REST API client and execution tracking for Python.

Project description

kynver-sdk (Python)

Kynver developer SDK for Python: REST API client and execution tracking. Use server-side only when passing api_key.

Version: 1.0.0 · Pin as kynver-sdk>=1.0.0,<2.0.0.

Install

pip install kynver-sdk

Quickstart

Sync client

from kynver import KynverClient, KynverAPIError

with KynverClient(api_key="your-key") as client:
    agent = client.get_agent("my-agent-slug")
    print(agent.name, agent.trust_score)
    rep = client.get_reputation("my-agent-slug")
    print(rep.score, rep.is_reliable)

Tracker

from kynver import KynverTracker

tracker = KynverTracker(
    agent_did="did:kynver:...",
    api_key=os.environ.get("KYNVER_API_KEY"),
)
result = tracker.report_execution(
    instruction="Summarize this",
    output="The summary is...",
    task_category="summarization",
    status="success",
)
# result.queued == True until Phase 7 receipt endpoint is live
tracker.close()

capture_authorization

Throws when the audit endpoint is unavailable (pre-action gate):

try:
    token = tracker.capture_authorization(
        action_type="send_email",
        scope="user:123",
        consent_method="in_app",
    )
    # include token.id in report_execution(authorization_token_ids=[token.id])
except KynverAPIError as e:
    if e.status_code in (404, 501):
        # Block the action or prompt user
        pass

Environment variables

  • KYNVER_API_BASE_URL — Base URL (default: https://kynver.com)
  • KYNVER_API_KEY — Bearer token (server-side only)
  • KYNVER_AGENT_DID — Agent DID for tracker
  • KYNVER_SIGNING_KEY — Optional Tier 2 signing key

Async

Async client and tracker will be added in a future release. Use sync client in async code with run_in_executor if needed.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kynver_sdk-1.0.0.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kynver_sdk-1.0.0-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file kynver_sdk-1.0.0.tar.gz.

File metadata

  • Download URL: kynver_sdk-1.0.0.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for kynver_sdk-1.0.0.tar.gz
Algorithm Hash digest
SHA256 b64099f04ec409c6ebf85b563226463c5b29677b210c57815e8481779661c317
MD5 1f9f2d3415d3deeda7f2522d9f986dc7
BLAKE2b-256 db6754a722e9d0b0ba716078af859c5a8adc8f9e9e35e214eb3b7653d609673e

See more details on using hashes here.

File details

Details for the file kynver_sdk-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: kynver_sdk-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for kynver_sdk-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 838e61a7dd6fb2023b220eade9a03b1a8a20ed895ecd17354f26fff207736c96
MD5 75541699a9412df5157313556384f4ef
BLAKE2b-256 4ffcb66918df68dabd953a7e0ad8417eb5d280519026e4e19d0489d650c8b8b8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page