Metadata-Version: 2.4
Name: modeldriveprotocol-client
Version: 2.2.0
Summary: Python client SDK for Model Drive Protocol.
Project-URL: Homepage, https://github.com/modeldriveprotocol/modeldriveprotocol
Project-URL: Documentation, https://github.com/modeldriveprotocol/modeldriveprotocol/tree/main/sdks/python
Project-URL: Repository, https://github.com/modeldriveprotocol/modeldriveprotocol.git
Project-URL: Issues, https://github.com/modeldriveprotocol/modeldriveprotocol/issues
Author: Model Drive Protocol
License: MIT
Keywords: client,mcp,mdp,model-drive-protocol,sdk
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Requires-Dist: httpx<1,>=0.28
Requires-Dist: websockets<16,>=15
Provides-Extra: test
Requires-Dist: pytest-asyncio<1,>=0.24; extra == 'test'
Requires-Dist: pytest<9,>=8; extra == 'test'
Description-Content-Type: text/markdown

# `modeldriveprotocol-client`

Python client SDK for Model Drive Protocol.

## Install

```bash
pip install modeldriveprotocol-client
```

## Quick start

```python
import asyncio

from modeldriveprotocol import ClientInfo, MdpClient


async def main() -> None:
    client = MdpClient(
        "ws://127.0.0.1:47372",
        ClientInfo(id="python-01", name="Python Client"),
    )

    client.expose_endpoint(
        "/page/search",
        "POST",
        lambda request, _context: {
            "query": request.body.get("query", "") if isinstance(request.body, dict) else "",
        },
        description="Search the current runtime.",
    )

    await client.connect()
    await client.register()


asyncio.run(main())
```

## Included transports

- WebSocket: `ws://` / `wss://`
- HTTP loop: `http://` / `https://`

Unlike the browser-focused JavaScript entrypoints, this SDK uses direct transport headers for runtime auth when needed.
