Skip to main content

Dwarix Python SDK

Python client for calling MCP tools through Dwarix gateway.

Install

pip install dwarix-sdk

Quick Start

from dwarix import DwarixClient

client = DwarixClient(
    agent_id="agt_example",
    secret="agent-secret",
    gateway_url="http://localhost:8080",
)

result = client.call_sync("github/list_repos", {"org": "acme"})
print(result)

Features

  • Automatic token issuance and refresh
  • Sync and async tool calls
  • batch_sync() and async batch()
  • Parent-child request chaining with spawn_child()
  • Sync and async context manager support
  • Typed exceptions for auth, policy, and upstream failures

Environment Variables

  • DWARIX_GATEWAY_URL
  • DWARIX_AGENT_ID
  • DWARIX_SECRET
  • DWARIX_SKIP_TLS_VERIFY for local self-signed environments

Example

import asyncio
from dwarix import DwarixClient


async def main() -> None:
    async with DwarixClient(
        agent_id="agt_example",
        secret="agent-secret",
        gateway_url="http://localhost:8080",
    ) as client:
        parent_result = await client.call("orchestrator/run", {})
        child = client.spawn_child()
        repos = await child.call("github/list_repos", {"org": "acme"})
        print(parent_result, repos)


asyncio.run(main())

Development Check

cd sdk/python
python3 -m build --no-isolation
python3 -m twine check dist/*

Metadata

Release files for dwarix-sdk 0.1.0

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

Built distribution (wheel)

Table of built distributions (wheels) for dwarix-sdk 0.1.0
File Interpreter ABI Platform
dwarix_sdk-0.1.0-py3-none-any.whl Python 3 none any Details

Release files / dwarix_sdk-0.1.0-py3-none-any.whl

Download URL dwarix_sdk-0.1.0-py3-none-any.whl
Size 6.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8378e7315004f91ba2157e6ad6970d36fbdcc9fe5621c6ffdb8f75f15f912708
BLAKE2b-256 checksum
How to use checksums
28d5e6abd8739c2b15c82426302c6ceb9adfc1696a6fadaaec60b4daf63957cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.6

Security for dwarix-sdk 0.1.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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

1 release file No provenance

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