Metadata-Version: 2.4
Name: graviton-sdk
Version: 0.1.0
Summary: Python SDK for Graviton Supercompute
Project-URL: Homepage, https://www.g-qt.com
Project-URL: Repository, https://github.com/CodeZeroLabs/graviton
Author-email: CodeZero Labs <aaron@g-qt.com>
License: MIT
Requires-Python: >=3.8
Requires-Dist: ipython
Requires-Dist: requests
Requires-Dist: sympy>=1.12
Description-Content-Type: text/markdown

# Graviton Python SDK

The Graviton SDK provides a seamless way to connect your local mathematical models (built with SymPy) to the Graviton Supercompute platform.

## Installation

```bash
pip install graviton-sdk
```

## Quick Start (Jupyter/Colab)

The SDK is designed to work beautifully in interactive environments.

```python
import sympy as sp
import graviton as gv

# 1. Authenticate (Use the public evaluation key for prototyping)
gv.login('a-little-more-art-than-science')

# 2. Define a complex model
x, y = sp.symbols('x y')
f = sp.sin(x)**2 + sp.exp(-y) * sp.cos(x)

# 3. Display with the Graviton "Compute" button
gv.expr(f)
```

## Programmatic Workflow

For advanced integrations, you can use the flattened API to evaluate and compute programmatically.

```python
# 1. Evaluate to get JSON data
eval_data = gv.evaluate(f, options={"type": "JSON"})

# 2. Use flattened access for cost and ID
cost = eval_data['cost']
job_id = eval_data['id']

print(f"Estimated Cost: {cost:.2f} credits")

# 3. Compute using the ID directly
job = gv.compute(job_id, options={"auto_charge": True})
result = job.wait()
print(f"Result: {result}")
```

## How it Works

When you call `gv(formula)`, the SDK:
1.  Serializes the SymPy object into a structured `srepr` format.
2.  Generates a rich HTML representation with a LaTeX preview.
3.  Adds a secure button that opens the Graviton Dashboard with your formula pre-loaded.

This allows you to leverage Graviton's massive cloud compute resources for complexity analysis and evaluation without ever leaving your research environment.

## Security

Graviton follows a "Data, not Code" security model. The SDK only transmits the mathematical structure of your model, not arbitrary Python code. Your local environment remains isolated, and all authentication is handled securely via the Graviton web platform.
