Metadata-Version: 2.4
Name: orbitroute
Version: 0.1.0
Summary: Python SDK for the OrbitRoute API — AI compute routing decisions (orbital vs terrestrial cloud) and managed-job scheduling
Author-email: OrbitRoute <hello@orbitroute.ai>
License: Proprietary
Project-URL: Homepage, https://www.orbitroute.ai
Project-URL: Documentation, https://www.orbitroute.ai/docs
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.27

# OrbitRoute Python SDK

Thin typed client for the [OrbitRoute API](https://www.orbitroute.ai/docs). Sync and async, one dependency (`httpx`).

```bash
pip install orbitroute
```

## Compute buyer

```python
from orbitroute import OrbitRoute

client = OrbitRoute(api_key="or_...")  # demo key: GET /api/v1/keys/demo

# Pure routing decision
decision = client.route(model_name="llama-3-70b", gpu_required="H100",
                        input_size_mb=512, estimated_compute_seconds=30)
print(decision["recommended_target"], decision["reasoning"])

# Managed job: queued → pass-window scheduled → run → SLA-graded
job = client.submit_job(model_name="llama-3-70b", gpu_required="H100",
                        input_size_mb=512, estimated_compute_seconds=30,
                        deadline_utc="2026-08-01T18:00:00Z")
print(client.get_job(job["job_id"])["status"])

# Public honesty scoreboard (no key needed)
print(client.sla_scoreboard())
```

## Satellite operator (federation)

```python
from orbitroute import OrbitRoute

# One-time registration — the or_op_ key is returned exactly once
reg = OrbitRoute().register_operator(name="Acme Orbital",
                                     contact_email="ops@acme.example")

op = OrbitRoute(operator_key=reg["operator_key"])
result = op.advertise_node("acme-tile-1", norad_id=25544, gpu_type="H100",
                           gpu_count=8, power_budget_w=12000,
                           battery_fraction=0.5, price_usd_per_gpu_hr=1.99,
                           isl_neighbors=["acme-tile-2"])
print(result["routable"])          # True → live in the routing fleet
print(op.my_nodes())
```

Full field reference and routability rules: [docs/FEDERATION_ONBOARDING.md](../../docs/FEDERATION_ONBOARDING.md).

## Async

`AsyncOrbitRoute` mirrors the sync surface exactly:

```python
from orbitroute import AsyncOrbitRoute

async with AsyncOrbitRoute(api_key="or_...") as client:
    decision = await client.route(model_name="m", input_size_mb=10,
                                  estimated_compute_seconds=60)
```

## Errors

Any non-2xx response raises `OrbitRouteError` with `.status_code` and `.detail`.

## Honesty note

Job execution currently runs through a simulated orbital adapter and ground stations are modeled until contracted — see the ["Current execution status"](../../docs/FEDERATION_ONBOARDING.md#current-execution-status-read-this-first) section before building anything that assumes bytes reach hardware.
