slap-sdk
Official Python client for the Semantic Latent-Algebraic Protocol (SLAP).
A modern, high-performance alternative to traditional RAG architectures (Pinecone / Chroma / LangChain) that operates directly in continuous hyperspherical latent space ($S^{d-1}$), achieving 96%+ KV Cache context reduction and sub-millisecond retrieval.
⚡ Installation
pip install slap-sdk
🚀 Quickstart
1. Connect to the Live Global Cluster
from slap_sdk import SlapClient
# Automatically connects to the global production cluster
client = SlapClient(base_url="https://slap-9m29.onrender.com")
# Health check
print(client.health())
2. Ingest Data (Cloud Storage + Compression)
resp = client.ingest(
text="Kubernetes orchestrates containerized services with declarative manifests.",
metadata={"service": "infra"}
)
print("Ingested Doc ID:", resp.doc_id)
print("INT8 Compression SNR:", resp.compression_stats["snr_db"])
3. Retrieve Context with 96% Token Reduction
results = client.retrieve(query="container orchestration", top_k=3)
for match in results.matches:
print(f"Similarity: {match.cosine_similarity:.4f} | Text: {match.text}")
print("KV Cache Savings:", results.token_savings["context_reduction_percent"], "%")
4. Continuous Unit Hypersphere Embeddings
embedding = client.embed(["Microservices architecture and event-driven design"])
print("Dimension:", embedding["dimension"])
print("Vector (first 5 dims):", embedding["data"][0]["embedding"][:5])
🔗 LlamaIndex Integration
from slap_sdk import SlapLlamaIndexRetriever
retriever = SlapLlamaIndexRetriever(base_url="https://slap-9m29.onrender.com")
nodes = retriever.retrieve("distributed systems architecture")
for n in nodes:
print(n.score, n.node.text)
📄 License
Apache-2.0
Metadata
Release files for slap-sdk 0.1.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 |
|---|---|---|---|---|
| slap_sdk-0.1.0.tar.gz | 4.6 kB | Without provenance | Details for slap_sdk-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| slap_sdk-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for slap_sdk-0.1.0-py3-none-any.whl |
Total release size: 10.4 kB
Release files / slap_sdk-0.1.0.tar.gz
| Download URL | slap_sdk-0.1.0.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5a0d281e96c86d25e7954eee216cf7004274b3c6999d3c2be0884d65a362798f
|
|
BLAKE2b-256 checksum How to use checksums |
0fd8c7d26d4780a4f80924950e8a889a82f15600f1e5cdea0e1e5c6724c99799
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.3
|
Release files / slap_sdk-0.1.0-py3-none-any.whl
| Download URL | slap_sdk-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bf7b5b37988792d5e29dc5f8ee13acd350e05348696f049cd3251f2758efc843
|
|
BLAKE2b-256 checksum How to use checksums |
8d5b58e48769538ef1eb7815af53e5bec2757d7b314b57a843b219222c1dc54b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.3
|
Security for slap-sdk 0.1.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.