Metadata-Version: 2.4
Name: nexphys
Version: 0.1.0
Summary: Python SDK and CLI for the NexPhys simulation platform
License: Proprietary License (placeholder)
        
        Copyright (c) 2026 NexPhys. All rights reserved.
        
        This software is proprietary and confidential. Unauthorized copying,
        distribution, modification, or use of this software, in whole or in part,
        is strictly prohibited without prior written permission from NexPhys.
        
        A public license may be adopted before any open release.
        
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.28
Provides-Extra: dev
Requires-Dist: pytest>=7; extra == "dev"
Dynamic: license-file

# nexphys

Python SDK and CLI for the [NexPhys](https://nexphys.io) simulation platform.

## Install

Private repo for now, so install from git (PyPI later):

```bash
pip install git+ssh://git@github.com/NexPhys/nexphys-python.git
```

## Quick start

```python
from nexphys import Client

client = Client()  # reads NEXPHYS_API_KEY from the environment
job = client.submit("input.txt", "toolpath.crs", description="first run")
result = client.wait(job["job_id"])          # poll until finished
client.download(job["job_id"], "results/")   # result tarball (.tar.gz)
```

## CLI

```bash
nexphys list --status completed
nexphys submit --input input.txt --toolpath toolpath.crs --wait
nexphys status <job_id>
nexphys download <job_id> -o results/
nexphys cancel <job_id>
```

Add `--json` before the subcommand for machine-readable output.
Exit codes: `0` success, `1` API/business failure, `2` authentication failure.

## Configuration

| Environment variable | Meaning                                        |
| -------------------- | ---------------------------------------------- |
| `NEXPHYS_API_KEY`    | API key (create one in your account settings)  |
| `NEXPHYS_BASE_URL`   | API base URL, defaults to `https://api.nexphys.io` |

Both can also be passed explicitly: `Client(api_key=..., base_url=...)`.

## Errors

All failures raise `nexphys.NexphysError` (with `.status`, `.request_id`,
`.details`). Subclasses: `AuthenticationError` (401) and `RateLimitError`
(429, with `.retry_after` seconds).

## Development

```bash
pip install -e '.[dev]'
pytest
```
