Skip to main content

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

pip install graviton-sdk

Quick Start (Jupyter/Colab)

The SDK is designed to work beautifully in interactive environments.

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.

# 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.

Metadata

Release files for graviton-sdk 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for graviton-sdk 0.1.6
File Size Uploaded Provenance
graviton_sdk-0.1.6.tar.gz 8.7 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for graviton-sdk 0.1.6
File Interpreter ABI Platform
graviton_sdk-0.1.6-py3-none-any.whl Python 3 none any Details

Total release size: 18.4 kB

Release files / graviton_sdk-0.1.6.tar.gz

Download URL graviton_sdk-0.1.6.tar.gz
Size 8.7 kB
Tags Source
SHA-256 checksum
How to use checksums
43f61485c6bb94eb5a31699ea219e5975d46496b9794947d87ae8188afd879c0
BLAKE2b-256 checksum
How to use checksums
16e641cee7ec4726d1e8d0e757973835a2a47c6bf428d5cc29297aec97e9bb1a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 17, 2026.

Transparency log

Release files / graviton_sdk-0.1.6-py3-none-any.whl

Download URL graviton_sdk-0.1.6-py3-none-any.whl
Size 9.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b59d5a8beac1ab92b58a3cbea852d3a39ac70e586e0bc2bd067d2d548cd95d54
BLAKE2b-256 checksum
How to use checksums
a51e42bf22a2868358f05f8a38f39693c0572adb6adc1d8cf8a2a8f3f0e2e5c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 17, 2026.

Transparency log

Security for graviton-sdk 0.1.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for graviton_sdk-0.1.6.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 17, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page