Skip to main content

Python SDK for Graviton Supercompute

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

graviton_sdk-0.1.0.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

graviton_sdk-0.1.0-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file graviton_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: graviton_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for graviton_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a96c22fb09116d39798e3da27fe3b32d30ea337bb7d69559bc5809de3f9d3782
MD5 bcadb1f6e3b72082773ad83831e6682c
BLAKE2b-256 b9148e5beaaf34a2e0bd75f57fee5a02d1abcd7e0e41f79699cca91c72ebbe1a

See more details on using hashes here.

Provenance

The following attestation bundles were made for graviton_sdk-0.1.0.tar.gz:

Publisher: deploy.yml on CodeZeroLabs/graviton

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file graviton_sdk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: graviton_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for graviton_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4a3557a49d974ea434df579a7fb37683fa8b2f625d9be92bbba4c537609440bd
MD5 46d14163838d288fa9aacaa7273b0dac
BLAKE2b-256 11cc0a082cf5d7468fb6bb28f07ae2cbcc56569b21feef5d99776fa86d9aeaea

See more details on using hashes here.

Provenance

The following attestation bundles were made for graviton_sdk-0.1.0-py3-none-any.whl:

Publisher: deploy.yml on CodeZeroLabs/graviton

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page