Metadata-Version: 2.4
Name: govynai
Version: 0.2.6
Summary: Python SDK for the Govyn AI governance proxy
Project-URL: Homepage, https://github.com/govynAI/govyn
Project-URL: Repository, https://github.com/govynAI/govyn
Project-URL: Issues, https://github.com/govynAI/govyn/issues
License: MIT
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: httpx>=0.27
Provides-Extra: all
Requires-Dist: anthropic>=0.30; extra == 'all'
Requires-Dist: openai>=2.0; extra == 'all'
Provides-Extra: anthropic
Requires-Dist: anthropic>=0.30; extra == 'anthropic'
Provides-Extra: dev
Requires-Dist: anthropic>=0.30; extra == 'dev'
Requires-Dist: openai>=2.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=1.0; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: respx>=0.22.0; extra == 'dev'
Provides-Extra: openai
Requires-Dist: openai>=2.0; extra == 'openai'
Description-Content-Type: text/markdown

# govynai

Python SDK for the Govyn governance proxy.

`govynai` gives Python agents a small client layer that points requests at a self-hosted Govyn proxy, adds agent identity headers, and turns proxy governance responses into typed Python exceptions.

## Install

```bash
pip install govynai[all]
```

Optional extras:

```bash
pip install govynai[openai]
pip install govynai[anthropic]
```

## Quick Start

```python
from govynai import GovynOpenAI

client = GovynOpenAI(agent_id="research-agent")
response = client.chat.completions.create(
    model="gpt-4o-mini",
    messages=[{"role": "user", "content": "Hello"}],
)
```

The client reads the proxy URL from `GOVYN_PROXY_URL` by default and targets `http://localhost:4000` if it is not set.

## Local Health Check

```python
from govynai import check_proxy

if not check_proxy():
    raise SystemExit("Govyn proxy is not reachable")
```

## Links

- Repository: [github.com/govynAI/govyn](https://github.com/govynAI/govyn)
- Issues: [github.com/govynAI/govyn/issues](https://github.com/govynAI/govyn/issues)
