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:
- Serializes the SymPy object into a structured
sreprformat. - Generates a rich HTML representation with a LaTeX preview.
- 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file graviton_sdk-0.1.1.tar.gz.
File metadata
- Download URL: graviton_sdk-0.1.1.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c61c73c20611efa8ea63b85a44f756529554002667f49b5e45041dab02e34cff
|
|
| MD5 |
f616e52a2e5b32d8aca9c5cc69e0b0c0
|
|
| BLAKE2b-256 |
8134fce96070e68fba6342b176cb739722cefd65ce9b49cf46635d133f165e9d
|
Provenance
The following attestation bundles were made for graviton_sdk-0.1.1.tar.gz:
Publisher:
deploy.yml on CodeZeroLabs/graviton
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
graviton_sdk-0.1.1.tar.gz -
Subject digest:
c61c73c20611efa8ea63b85a44f756529554002667f49b5e45041dab02e34cff - Sigstore transparency entry: 2090578244
- Sigstore integration time:
-
Permalink:
CodeZeroLabs/graviton@0c58a4d9493d94023733c0e22266a766acf7be1d -
Branch / Tag:
refs/tags/v0.1.78 - Owner: https://github.com/CodeZeroLabs
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yml@0c58a4d9493d94023733c0e22266a766acf7be1d -
Trigger Event:
push
-
Statement type:
File details
Details for the file graviton_sdk-0.1.1-py3-none-any.whl.
File metadata
- Download URL: graviton_sdk-0.1.1-py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08e408a543adfefaecd1508e46ebeff88a6634ea65015dc5d7860d227c2fd0e8
|
|
| MD5 |
91b8c2acabd6f298cb775684e640493e
|
|
| BLAKE2b-256 |
7010a219e011397687de4be41908c7cd04981344ce72cc472b0715fb188c25c1
|
Provenance
The following attestation bundles were made for graviton_sdk-0.1.1-py3-none-any.whl:
Publisher:
deploy.yml on CodeZeroLabs/graviton
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
graviton_sdk-0.1.1-py3-none-any.whl -
Subject digest:
08e408a543adfefaecd1508e46ebeff88a6634ea65015dc5d7860d227c2fd0e8 - Sigstore transparency entry: 2090578668
- Sigstore integration time:
-
Permalink:
CodeZeroLabs/graviton@0c58a4d9493d94023733c0e22266a766acf7be1d -
Branch / Tag:
refs/tags/v0.1.78 - Owner: https://github.com/CodeZeroLabs
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yml@0c58a4d9493d94023733c0e22266a766acf7be1d -
Trigger Event:
push
-
Statement type: