Nanorix Python SDK
Sealed ephemeral capsules for regulated data, with independently verifiable AuditProofs.
Installation
pip install nanorix
Quick Start
import nanorix
client = nanorix.Client(api_key="nrx_live_...")
# Create a capsulefile (one-time setup)
capsulefile = client.capsulefiles.create(
name="patient-risk-scorer",
runtime="python3.11",
entrypoint="python model.py",
files=["model.py", "requirements.txt"],
)
client.capsulefiles.wait_until_finalized(capsulefile.id)
# Process data — capsule auto-destroyed after completion
outputs, cdp = client.capsules.run(
capsulefile=capsulefile.id,
inputs={"patient.csv": open("patient.csv", "rb")},
)
# The proof
print(cdp.verify_url) # https://nanorix.io/verify/cap_...
Workspace Mode
For multi-step workflows with full control:
capsule = client.capsules.create(capsulefile="cf_...")
capsule.upload("patient.csv", data)
capsule.execute("python preprocess.py")
capsule.execute("python model.py")
prediction = capsule.download("prediction.json")
cdp = capsule.destroy()
# Share the proof with auditors
verification = cdp.verification()
AuditProof Access
Every destroyed capsule produces an AuditProof covering the full lifecycle — ingress, execution, egress, and destruction:
# AuditRecord — your private audit trail
full = cdp.full()
print(full.activity) # Complete event timeline
print(full.destruction) # 8-step chain verification
# AuditProof — safe to share
verify = cdp.verification()
print(verify.data_ingested) # File count and hashes only
print(verify.residency) # How long data existed
# Zero filenames, commands, or operational details
Error Handling
from nanorix import ExecutionError, TimeoutError
try:
outputs, cdp = client.capsules.run(capsulefile="cf_...", inputs=inputs)
except ExecutionError as e:
print(f"Exit code: {e.exit_code}")
print(f"CDP still generated: {e.cdp}") # Destruction happened
except TimeoutError as e:
print(f"Capsule still alive: {e.capsule.id}")
# Decide: retry, debug, or destroy
Async Support
import nanorix
async with nanorix.AsyncClient(api_key="nrx_live_...") as client:
outputs, cdp = await client.capsules.run(
capsulefile="cf_...",
inputs={"data.csv": data},
)
Configuration
client = nanorix.Client(
api_key="nrx_live_...",
base_url="https://api.nanorix.io", # default
timeout=30.0, # default
max_retries=3, # default
)
Documentation
Metadata
Release files for nanorix 0.7.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nanorix-0.7.0.tar.gz | 392.4 kB | Without provenance | Details for nanorix-0.7.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nanorix-0.7.0-py3-none-any.whl | Python 3 | none | any | Details for nanorix-0.7.0-py3-none-any.whl |
Total release size: 875.6 kB
Release files / nanorix-0.7.0.tar.gz
| Download URL | nanorix-0.7.0.tar.gz |
|---|---|
| Size | 392.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ec5c198af0271eb3aaca02abe391fe14b3de906045db40202dc8751f7bcc942c
|
|
BLAKE2b-256 checksum How to use checksums |
90803f005faf4d8e3e778b6568032c64e282a6f3912a78a2db38bb77553c8a65
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Release files / nanorix-0.7.0-py3-none-any.whl
| Download URL | nanorix-0.7.0-py3-none-any.whl |
|---|---|
| Size | 483.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
eca2859500a5ef56feb379060cb6692d59329b2c8ad7873427c5fe0e2d367a76
|
|
BLAKE2b-256 checksum How to use checksums |
29d799a72bc4dd417d5b3341a06a2bcb9d829c3285768f0b1d699a5f5d27cffe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Security for nanorix 0.7.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.