modeldriveprotocol-client
Python client SDK for Model Drive Protocol.
Install
pip install modeldriveprotocol-client
Quick start
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.
Metadata
Release files for modeldriveprotocol-client 2.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| modeldriveprotocol_client-2.2.0.tar.gz | 10.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| modeldriveprotocol_client-2.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 22.7 kB
Release files / modeldriveprotocol_client-2.2.0.tar.gz
| Download URL | modeldriveprotocol_client-2.2.0.tar.gz |
|---|---|
| Size | 10.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e80d7acc1ce0041577df242ac93fc068658cdb31189a2a3f642a7151205b9a40
|
|
BLAKE2b-256 checksum How to use checksums |
07fe6bb1537d87d117ec916388c91aa10c6bb5f6f81ae57ab8ed53f256a35f06
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Release files / modeldriveprotocol_client-2.2.0-py3-none-any.whl
| Download URL | modeldriveprotocol_client-2.2.0-py3-none-any.whl |
|---|---|
| Size | 12.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6c340ecc20e2a494c6e5a7d3a8a64251a67bb41fc296ce967d9e44eb10c86201
|
|
BLAKE2b-256 checksum How to use checksums |
af97a582e42a4ed549866357cee79e00767082990486772a53e40d95fb685b11
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|