Metadata-Version: 2.4
Name: nopaque
Version: 0.1.3
Summary: Official Python SDK for the Nopaque API
Project-URL: Homepage, https://nopaque.co.uk
Project-URL: Documentation, https://nopaque.co.uk/docs/sdks
Project-URL: Repository, https://github.com/nopaque/python-sdk
Project-URL: Issues, https://github.com/nopaque/python-sdk/issues
Author-email: Nopaque <support@nopaque.co.uk>
License: MIT License
        
        Copyright (c) 2026 Nopaque Ltd
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: api,ivr,nopaque,sdk
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.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Typing :: Typed
Requires-Python: >=3.9
Requires-Dist: httpx>=0.27
Requires-Dist: pydantic>=2.6
Description-Content-Type: text/markdown

# nopaque - Python SDK for Nopaque

Official Python client for the [Nopaque](https://nopaque.co.uk) API.

## Install

```bash
pip install nopaque
```

## Quick start

```python
from nopaque import Nopaque

client = Nopaque(api_key="nop_live_...")   # or set NOPAQUE_API_KEY

# Create a mapping job and wait for it to complete
job = client.mapping.create(
    name="Main IVR",
    phone_number="+441234567890",
    mapping_mode="dtmf",
)
client.mapping.start(job.id)
final = client.mapping.wait_for_complete(job.id)
print(final.status)

# List audio files with automatic pagination
for audio in client.audio.list():
    print(audio.id, audio.file_name)

client.close()
```

## Async

```python
import asyncio
from nopaque import AsyncNopaque

async def main():
    async with AsyncNopaque() as client:
        job = await client.mapping.get("map_abc123")
        print(job.status)

asyncio.run(main())
```

## Features

- Full coverage of the Nopaque REST API via API-key auth
- Typed Pydantic v2 models for every request and response
- Paired sync (`Nopaque`) and async (`AsyncNopaque`) clients
- Automatic pagination for list endpoints
- Polling helpers for long-running jobs (`wait_for_complete`)
- One-call audio upload/download wrapping the presigned-URL flow
- Method-aware retry with exponential jitter and `Retry-After` honor
- Typed exception hierarchy (`NotFoundError`, `RateLimitError`, etc.)

## Documentation

Full reference: <https://nopaque.co.uk/docs/sdks>

## Authentication

Pass your API key to the client:

```python
Nopaque(api_key="nop_live_...")
```

Or set the environment variable:

```bash
export NOPAQUE_API_KEY=nop_live_...
```

API keys are workspace-scoped and subject to per-minute rate limits based on
your subscription tier. Free tier cannot use API keys.

## Requirements

- Python 3.9+
- `httpx >= 0.27`, `pydantic >= 2.6`

## License

MIT
