Metadata-Version: 2.4
Name: pharox-sdk
Version: 0.2.0
Summary: Typed Python SDK for pharox — remote mode (HTTP) and local mode (direct toolkit)
License: MIT
License-File: LICENSE
Author: fzaca
Requires-Python: >=3.10,<4.0
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: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Dist: httpx (>=0.28,<0.29)
Requires-Dist: pharox (>=0.8.1,<0.9.0)
Description-Content-Type: text/markdown

# pharox-sdk

Python SDK for the [Pharox](https://github.com/fzaca/pharox) proxy lifecycle management ecosystem.

Works in two interchangeable modes:

- **Remote mode** — HTTP client for a running `pharox-service`
- **Local mode** — direct access to `pharox-toolkit` via `IAsyncStorage` (no service required)

## Installation

```bash
pip install pharox-sdk
```

## Quick start

```python
from pharox_sdk import PharoxSDK

# Remote mode
sdk = PharoxSDK.remote("http://localhost:8000", api_key="my-key")

# Local mode (no service needed)
from pharox import AsyncInMemoryStorage
sdk = PharoxSDK.local(AsyncInMemoryStorage())

# Same interface in both modes
async with sdk.with_lease("my-pool") as lease:
    if lease:
        print(lease.proxy_id)
```

## Links

- [pharox-toolkit](https://github.com/fzaca/pharox) — core library
- [pharox-service](https://github.com/fzaca/pharox-service) — FastAPI service

