LumeFuse SDK - Atomic Veracity Protocol for Born-Signed Data
Project description
LumeFuse Python SDK
The official Python SDK for LumeFuse - Atomic Veracity Protocol for Born-Signed Data.
Installation
pip install lumefuse-sdk
Quick Start
from lumefuse import LumeFuse
# Initialize the client
lf = LumeFuse(api_key="lf_your_api_key")
# Open a data stream (The "Latch")
stream = lf.open_stream("medical_lab_results")
# Every data point is automatically:
# 1. Hashed (SHA-256)
# 2. Linked to previous packet (Recursive DNA)
# 3. Anchored to BSV ledger
stream.write({"patient_id": "P-001", "glucose": 95, "timestamp": "2026-02-20T14:30:00Z"})
stream.write({"patient_id": "P-001", "glucose": 102, "timestamp": "2026-02-20T15:30:00Z"})
# Close stream and get the Merkle root
result = stream.close()
print(f"Chain Root: {result.merkle_root}")
print(f"Total Packets: {result.total_packets}")
print(f"BSV TX: {result.anchor_txid}")
Features
Recursive DNA Binding (The Cryptographic Heartbeat)
Every Bit-Packet contains the DNA of the previous packet:
H_N = SHA256(Data_N + H_{N-1})
This creates an unbreakable chain where altering any packet breaks all subsequent packets.
Quantum Resistance
The recursive hashing model provides practical resistance against quantum computing attacks. Even if a single hash is compromised, the entire chain cannot be altered without breaking the recursive DNA sequence.
Self-Healing Data
The Sentinel system automatically detects and heals data corruption:
# Verify chain integrity
status = lf.verify_chain("medical_lab_results")
if status.chain_intact:
print("Data integrity verified")
else:
print(f"Break detected at sequence {status.break_sequence}")
if status.healed:
print("Data automatically healed!")
API Reference
LumeFuse Client
from lumefuse import LumeFuse
# Initialize with API key
lf = LumeFuse(
api_key="lf_your_api_key",
base_url="https://api.lumefuse.io/v1", # Optional
timeout=30.0, # Optional
auto_heal=True # Optional - auto-heal on chain breaks
)
Data Streams
# Open a stream
stream = lf.open_stream("source_id")
# Write data (any JSON-serializable object)
stream.write({"key": "value"})
stream.write(["array", "of", "items"])
stream.write("plain string")
# Close and get result
result = stream.close()
Verification
# Verify single data item
result = lf.verify({"key": "value"})
print(f"Verified: {result.verified}")
# Verify entire chain
status = lf.verify_chain("source_id")
print(f"Chain intact: {status.chain_intact}")
print(f"Quantum resistant: {status.quantum_resistant}")
Sentinel (Self-Healing)
# Get sentinel status
status = lf.get_sentinel_status()
# Manually trigger audit
audit = lf.trigger_audit()
# Manually heal a break
result = lf.heal("source_id", break_sequence=5)
# Get healing history
history = lf.get_healing_history("source_id")
Credits
# Get credit balance
balance = lf.get_credits()
print(f"Packets available: {balance.packets_available}")
print(f"Satoshi balance: {balance.satoshi_balance}")
Context Manager
with LumeFuse(api_key="lf_your_key") as lf:
stream = lf.open_stream("data")
stream.write({"event": "action"})
result = stream.close()
Error Handling
from lumefuse import LumeFuse
from lumefuse.exceptions import (
AuthenticationError,
RateLimitError,
ChainIntegrityError,
InsufficientCreditsError
)
try:
lf = LumeFuse(api_key="lf_invalid")
except AuthenticationError:
print("Invalid API key")
try:
status = lf.verify_chain("source", auto_heal=False)
except ChainIntegrityError as e:
print(f"Chain broken at sequence {e.break_sequence}")
Environment Variables
LUMEFUSE_API_KEY- Your API keyLUMEFUSE_BASE_URL- Custom API base URL (optional)
Publishing to PyPI
# Install build tools
pip install build twine
# Build the package
python -m build
# Upload to PyPI
twine upload dist/*
License
MIT License - see LICENSE file for details.
Support
- Documentation: https://docs.lumefuse.io
- Email: support@lumefuse.io
- Enterprise: enterprise@lumefuse.io
Project details
Release history Release notifications | RSS feed
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 lumefuse_sdk-1.0.0.tar.gz.
File metadata
- Download URL: lumefuse_sdk-1.0.0.tar.gz
- Upload date:
- Size: 13.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d83fdc75b67e721166f973b9b6de6bf7d281ea1876d900fd9bb30cbeac22a74
|
|
| MD5 |
c53d1c88e50fbfd6028441d4a6b6052a
|
|
| BLAKE2b-256 |
46fee5b9d627a96bc80359d615aa04f64ebc491ab43c0e4437c7688f16ab7b5b
|
File details
Details for the file lumefuse_sdk-1.0.0-py3-none-any.whl.
File metadata
- Download URL: lumefuse_sdk-1.0.0-py3-none-any.whl
- Upload date:
- Size: 12.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f7c0ccfeed3031d1d3b9a38cf1e2bbb60e3afab32498c53a241803daf6695c6c
|
|
| MD5 |
9974f7b29f518ac1300eeff0028f8839
|
|
| BLAKE2b-256 |
f191e1dca1444f5053ab46aa418540ba2f83d91eecada1d9d1b1d7e0800c019f
|