semvec/pypi-packages huggingface dataset:
vac-client 0.1.0
Python client for VAC (Verifiable Agentic Credential) Protocol
License: MIT
Requires Python: >=3.7
Keywords: vac, security, ai-agents, credentials, biscuit

# VAC Python Client

Simple Python client for the VAC (Verifiable Agentic Credential) Protocol.

## Installation

```bash
# Copy vac_client.py to your project, or:
pip install httpx  # Recommended for proper multi-header support
```

## Quick Start

```python
from vac_client import VACClient

# Create client
vac = VACClient(
    sidecar_url="http://localhost:3000",
    root_biscuit="<your-biscuit-token>"
)

# Make requests - receipts auto-accumulate
response = vac.get("/search", params={"q": "flights"})
print(f"Search: {response.status_code}")

response = vac.post("/charge", json={"amount": 100, "currency": "usd"})
print(f"Charge: {response.status_code}")

# Start new workflow (clears receipts, new correlation ID)
vac.clear_receipts()
```

## Features

- Automatic receipt accumulation
- Correlation ID management
- Multiple `X-VAC-Receipt` header support (with httpx)
- Error classification (policy violation, expired, etc.)

## Error Handling

```python
from vac_client import VACClient, VACError

vac = VACClient(root_biscuit="...")

try:
    response = vac.post("/charge", json={"amount": 100})
    response.raise_for_status()
except VACError as e:
    if e.is_missing_receipt:
        print("Need to complete prior steps first")
    elif e.is_expired:
        print("Receipt expired - restart workflow")
    elif e.is_policy_violation:
        print(f"Policy denied: {e.message}")
```

## Multi-Step Workflows

```python
import uuid
from vac_client import VACClient

# All requests in a workflow share a correlation ID
vac = VACClient(
    root_biscuit="...",
    correlation_id=str(uuid.uuid4())  # Or let it auto-generate
)

# Step 1: Search
vac.get("/search", params={"q": "flights to NYC"})

# Step 2: Select (policy may require search first)
vac.post("/select", json={"flight_id": "AA123"})

# Step 3: Charge (policy may require search + select)
vac.post("/charge", json={"amount": 35000})

# Receipts are automatically included in each request
print(f"Receipts collected: {len(vac.receipts)}")
```

## Requirements

- Python 3.7+
- `httpx` (recommended) or `requests`

**Observability:** For OpenTelemetry tracing of VAC requests, install with `pip install vac-client[opentelemetry]` and use `opentelemetry-instrumentation-httpx`, or see [docs/OBSERVABILITY.md](../../docs/OBSERVABILITY.md) in the repo.

**Multi-step workflows (search → select → charge):** The sidecar expects multiple `X-VAC-Receipt` headers, one per prior step. The `requests` library cannot send multiple headers with the same name, so multi-step workflows will fail with `requests`. Use `httpx` for any flow that accumulates more than one receipt.

## License

MIT
resp-agent 0.1.8
Resp-Agent: A multi-agent framework for respiratory sound diagnosis and generation
License: MIT
Requires Python: >=3.8
Keywords: respiratory, audio, diagnosis, generation, deep-learning, transformers

# Resp-Agent

A multi-agent framework for respiratory sound diagnosis and generation using deep learning.

## Installation

### 1. Install PyTorch with CUDA Support

```bash
pip install torch==2.8.0 torchaudio==2.8.0 --index-url https://download.pytorch.org/whl/cu128
```

### 2. Install resp-agent

```bash
pip install resp-agent -i https://pypi.org/simple/
```

> This installs all dependencies for both inference and training (including `deepspeed`, `wandb`, `matplotlib`, etc.).

## Quick Start

### Python API

```python
from resp_agent import BEATs, BEATsConfig
from resp_agent.diagnoser import run_diagnoser
from resp_agent.generator import run_generator

# Diagnose respiratory sounds
result = run_diagnoser(
    audio_dir="./audio",
    output_dir="./output",
    metadata_csv="./metadata.csv",
    config_path="./Diagnoser/config.yaml"
)

# Generate respiratory sounds
audio = run_generator(
    ref_audio="./reference.wav",
    disease="Asthma",
    out_dir="./generated",
    config_path="./Generator/config.yaml"
)
```

### Command Line Interface

```bash
# Run diagnosis
resp-agent diagnose --audio_dir ./audio --output_dir ./output --metadata_csv ./metadata.csv --config ./Diagnoser/config.yaml

# Run generation
resp-agent generate --ref_audio ./ref.wav --disease Asthma --out_dir ./output --config ./Generator/config.yaml

# Start interactive chat agent
resp-agent chat --lang zh  # Chinese
resp-agent chat --lang en  # English
```

## Requirements

- Python >= 3.8
- PyTorch >= 2.0.0 (recommended: 2.8.0 with CUDA 12.8)
- CUDA-capable GPU (recommended for training and inference)

## Environment Variables

Set your DeepSeek API key for the Thinker agent:
```bash
export DEEPSEEK_API_KEY='your-api-key'
```

## License

MIT License