Metadata-Version: 2.4
Name: pliqra-client
Version: 0.1.0
Summary: Dependency-free Pliqra model discovery, binding and inference client
Author: Pliqra contributors
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/eturkok/pliqra
Project-URL: Documentation, https://github.com/eturkok/pliqra/blob/main/docs/CONFORMANCE.md
Project-URL: Issues, https://github.com/eturkok/pliqra/issues
Keywords: pliqra,llm,gateway,inference,protocol
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE
Dynamic: license-file

# Pliqra Python client

Dependency-free Python 3.10+ client for the draft Pliqra discovery/binding protocol. SDK versions have their own lifecycle; SDK 0.1 accompanies the Pliqra 2.1 gateway candidate.

```sh
pip install --pre pliqra-client
```

```python
import os
from pliqra_client import Pliqra, ContractChanged

client = Pliqra("http://localhost:8088", os.environ["PLIQRA_API_KEY"])
connection = client.connect("support", ["chat", "streaming"])
for chunk in connection.stream([{"role": "user", "content": "Hello"}]):
    for choice in chunk.get("choices", []):
        print(choice.get("delta", {}).get("content", ""), end="", flush=True)
```

Changed contracts raise `ContractChanged` (HTTP 409); rediscover and bind explicitly. Credentials are not forwarded across redirects. Incomplete streams raise an error. Embeddings/audio operations and durable batches use the same binding. An organization uses its `/org/slug` base URL.

`pliqra-client --help` and `pliqra-conformance --help` expose the included CLIs. Conformance performs no model call unless `--invoke` is supplied. Set `PLIQRA_API_KEY` through your secret environment rather than a command argument.

See [Pliqra](https://github.com/eturkok/pliqra), [protocol](https://github.com/eturkok/pliqra/blob/main/docs/PROTOCOL.md) and [client documentation](https://github.com/eturkok/pliqra/blob/main/docs/CONFORMANCE.md). The protocol remains a draft; a passing core profile is not vendor certification or a guarantee of model quality. Licensed under Apache-2.0.
