Metadata-Version: 2.1
Name: subnoto-api-client
Author: Subnoto
Author-email: support@subnoto.com
Home-page: https://subnoto.com
License: Apache-2.0
Description-Content-Type: text/markdown
Summary: Python client for the Subnoto Public API
Project-URL: Documentation, https://subnoto.com/documentation/developers/sdks/python
Project-URL: Homepage, https://subnoto.com
Project-URL: Repository, https://gitlab.com/subnoto/subnoto-monorepo-public
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Internet :: WWW/HTTP :: HTTP Servers
Requires-Python: >=3.11
Requires-Dist: httpx
Requires-Dist: attrs
Requires-Dist: http-message-signatures
Requires-Dist: typer
Requires-Dist: typing_extensions
Version: 2.8.1

# Subnoto Python SDK

Python client for the Subnoto Public API

Note: the SDK is only available on the linux/amd64 platform for now

## Installation

```bash
pip install subnoto-api-client
```

## Usage

The SDK provides both async and sync clients. Use `SubnotoClient` for async/await code
or `SubnotoSyncClient` for synchronous code.

Set your credentials as environment variables:

```bash
export SUBNOTO_API_KEY="your-access-key"
export SUBNOTO_SECRET_KEY="your-secret-key-hex"
```

### Async Example

```python
import asyncio
from subnoto_api_client import SubnotoClient, SubnotoConfig

async def main():
    async with SubnotoClient(SubnotoConfig()) as client:
        response = await client.post("/public/workspace/list", json={})
        print(f"Workspaces: {response.json()}")

if __name__ == "__main__":
    asyncio.run(main())
```

### Sync Example

```python
from subnoto_api_client import SubnotoSyncClient, SubnotoConfig

with SubnotoSyncClient(SubnotoConfig()) as client:
    response = client.post("/public/workspace/list", json={})
    print(f"Workspaces: {response.json()}")
```

## Configuration

| Option         | Type  | Required | Description                                            |
| -------------- | ----- | -------- | ------------------------------------------------------ |
| `access_key`   | str   | No       | API access key (default: `SUBNOTO_API_KEY` env var)    |
| `secret_key`   | str   | No       | API secret key, hex-encoded (default: `SUBNOTO_SECRET_KEY` env var) |
| `api_base_url` | str   | No       | API base URL (default: `https://enclave.subnoto.com`)  |
| `unattested`   | bool  | No       | Use unattested mode for development (default: `False`) |
| `attester_key` | bytes | No       | Public key for attestation verification                |

