semvec/pypi-packages huggingface dataset:
work-utils-zxj 0.1.7
work util for self
Requires Python: <4.0,>=3.10

## [0.1.7] - 2025-12-02
### 新增
- playwright新增proxy
- 新增图片webj -> jpg

# work-utils
## [0.1.6] - 2025-10-27
### 新增
- 拆分模块

## [0.1.5] - 2025-10-27
### 新增
- 新增图片切割

## [0.1.4] - 2025-10-23
### fix
- 移除无用依赖

## [0.1.3] - 2025-10-23
### fix
- 继续修复Playwright日志导入问题

## [0.1.2] - 2025-10-23
### fix
- 修复Playwright日志导入问题

## [0.1.1] - 2025-10-23
### 新增
- 增加Playwright基础方法

## [0.1.0] - 2025-10-20
### 初始发布
- 包含日志、CSV处理等工具
compliance-packet 0.1.1
Universal compliance packet SDK for Python.
Requires Python: >=3.9



# 🐍 Compliance Packet — Python SDK

Official **Python client** for the **Compliance Packet API** — a universal safety, copyright, privacy, and compliance scoring system for AI applications.

This SDK provides a clean, typed interface for:

- Running compliance checks  
- Retrieving usage statistics  
- Handling structured errors  
- Integrating moderation into Python agents, backends, and workflows  

---

## 📦 Installation

Install from PyPI:

```bash
pip install compliance-packet
```

---

## 🚀 Quickstart

```python
from compliance_packet import ComplianceClient, CompliancePacketError

client = ComplianceClient(api_key="cpk_your_key_here")

try:
    packet = client.check("Hello, world!")
    print("Safety:", packet.safety.score)
    print("Recommendation:", packet.overall.recommendation)

    usage = client.usage()
    print("Checks used:", usage.summary["totalChecks"])

except CompliancePacketError as e:
    print("API error:", e.code, "-", e.message)
```

---

## 🧠 API Overview

### Initialize client
```python
client = ComplianceClient(api_key="cpk_1234")
```

### Run a compliance check
```python
packet = client.check("some text")
```

### Response structure
Each check returns a structured **CompliancePacket**:

```python
packet.safety.score
packet.safety.category
packet.privacy.piiDetected
packet.copyright.assessment
packet.overall.complianceScore
packet.meta.inputId
```

Full packet fields mirror the backend specification.

---

## 🔥 Error Handling

All API errors raise `CompliancePacketError`.

Each error has:

- `code` — machine-readable code  
- `message` — human-readable explanation  
- `status` — HTTP status code  

Example:

```python
try:
    client.check("hello")
except CompliancePacketError as err:
    print(err.code)       # "AUTH_INVALID_API_KEY"
    print(err.message)    # "Invalid or inactive API key."
    print(err.status)     # 401
```

---

## 📊 Usage Endpoint

```python
usage = client.usage()
print(usage.summary)
```

Example summary:

```python
{
  "totalChecks": 42,
  "allow": 40,
  "review": 1,
  "block": 1
}
```

---

## 🔒 Authentication

All requests require:

```python
client = ComplianceClient(api_key="cpk_xxx")
```

If the key is invalid, a `CompliancePacketError` is raised with:

```
code: AUTH_INVALID_API_KEY
status: 401
```

---

## 🛠 Development

Install editable version:

```bash
pip install -e .
```

Run tests:

```bash
python test-client.py
```

---

## 🌐 Links

- API Documentation: https://your-frontend-domain.com/docs  
- JavaScript SDK: https://www.npmjs.com/package/compliance-packet  
- Python SDK (PyPI): https://pypi.org/project/compliance-packet/

---

## ⚠️ Disclaimer

Compliance Packet provides **probabilistic analysis**, not legal advice.  
Use human review for high-stakes or regulated applications.

---

## 📄 License

MIT