Metadata-Version: 2.4
Name: patchguard-ai
Version: 0.1.1
Summary: Official Python SDK for PatchOps Guard (patchguard.ai)
Author: Liveplex CPU
License: MIT
Project-URL: Homepage, https://patchguard.ai
Project-URL: Documentation, https://patchguard.ai/docs/sdk/python
Project-URL: Repository, https://github.com/liveplex-cpu/patchops-guard
Keywords: patchguard,patchops,security,sbom,cve,sast,llm-guard
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.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Security
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.27

# patchguard-ai — PatchOps Guard Python SDK

Official Python client for the [PatchOps Guard](https://patchguard.ai) API.

## Installation

```bash
pip install patchguard-ai
```

Distribution name is `patchguard-ai` but the import name is `patchguard`
(Django-style split — `patchguard` alone is taken on PyPI).

## Quick start

```python
from patchguard import PatchopsClient

with PatchopsClient(
    base_url="https://patchguard.ai",
    api_key="pk_live_...",
) as client:
    health = client.health.check()
    print(health)  # {"status": "ok", "db": True, "redis": True}

    findings = client.findings.list_unified(kind="cve", limit=50)
    for f in findings.items:
        print(f"{f.severity:8s} {f.title}")

    lb = client.benchmark.leaderboard()
    print(lb["vendors"][0]["name"])
```

## Resources

- `client.health.check()` — ping `/health`
- `client.findings.list_unified(kind=, severity=, limit=, offset=)` — unified findings across all 10 Lanes
- `client.benchmark.leaderboard()` — full vendor comparison

## Errors

All API errors raise `PatchopsError(status_code, detail)`.

## License

MIT. See `LICENSE`.
