Skip to main content

nlproxy-python: High-Performance Python SDK (v1.0.0)

This branch contains the high-performance Python SDK bindings for nlproxy, compiled from our Rust core engine using Maturin and PyO3.

It provides the speed of native Rust execution (sub-3ms latency, 5000+ rps) wrapped in an easy-to-use Python interface.

License: BSL-1.1


📦 Installation

To install this high-performance version of the SDK directly from GitHub:

# Install directly from the sdk-python branch
pip install git+https://github.com/intellideep/nlproxy.git@sdk-python

Note: This will automatically build and compile the Rust core on your local system. Ensure you have the Rust toolchain (rustc and cargo) installed.


💻 Code Example

from nlproxy import init_engine, ensure_models_ready, compress_prompt, run_unified_pipeline, CompressRequest, CompressUnifiedRequest

# 1. Download models automatically if needed
ensure_models_ready("models")

# 2. Initialize the Candle embedding engine with local models
init_engine(
    "models/all-MiniLM-L6-v2/model.safetensors",
    "models/all-MiniLM-L6-v2/config.json",
    "models/all-MiniLM-L6-v2/tokenizer.json"
)

# 3. Compress prompt and redact PII
req = CompressRequest(
    text="The database server is located at 192.168.1.150.",
    mode="general",
    aggressiveness=0.5
)
res = compress_prompt(req)

print("Shielded Prompt:", res.processed_text)
# "The database server is located at __PROT_82736284__."

print("PII Placeholders:", res.placeholders)
# { "__PROT_82736284__": "192.168.1.150" }

Run Unified Orchestrated Pipeline

Execute a complete secure LLM pipeline including firewall checks, Redis semantic cache lookup, prompt compression, upstream LLM execution, and post-LLM verification:

# Create pipeline request
pipeline_req = CompressUnifiedRequest(
    prompt="Connect to database and extract tables",
    domain="general",
    aggressiveness=0.0,
    provider="gemini",
    model="gemini-1.5-pro",
    bypass_cache=False,
    check_firewall=True
)

# Run pipeline
pipeline_res = run_unified_pipeline(pipeline_req)

print("Allowed:", pipeline_res.allowed)
print("Response:", pipeline_res.final_response)
print("Latency:", pipeline_res.latency_ms, "ms")

🏢 Authors & Cofounders

This SDK is developed and maintained exclusively by IntelliDeep Labs.

For attributions and licenses of integrated open-source components, see credits.md.


© 2026 IntelliDeep Labs. All rights reserved.

Release files for nlproxy 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nlproxy 1.0.0
File Size Uploaded
nlproxy-1.0.0.tar.gz 66.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nlproxy 1.0.0
File Interpreter ABI Platform
nlproxy-1.0.0-cp38-abi3-manylinux_2_39_x86_64.whl CPython 3.8 abi3 Linux glibc 2.39+ x86-64 Details

Total release size: 9.0 MB

Release files / nlproxy-1.0.0.tar.gz

Download URL nlproxy-1.0.0.tar.gz
Size 66.1 kB
Tags Source
SHA-256 checksum
How to use checksums
6b25fd231a7f4812a194a96d24b30f12675e5269060de8172909542daa27bac5
BLAKE2b-256 checksum
How to use checksums
72429799bdd8a7c216f80479dd75ffd93e3f070e6fb50a352c09d452fcd49086
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.13.3

Release files / nlproxy-1.0.0-cp38-abi3-manylinux_2_39_x86_64.whl

Download URL nlproxy-1.0.0-cp38-abi3-manylinux_2_39_x86_64.whl
Size 9.0 MB
Tags CPython 3.8 Linux glibc 2.39+ x86-64 abi3
SHA-256 checksum
How to use checksums
84bed1c7a303f52f8980ff29258eb544e80f4925a49030e923207fd53a93b5e3
BLAKE2b-256 checksum
How to use checksums
45671aa223232acd961b571f0b2fd868bdf0b58b9b74b4817897087c68bb074b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.13.3

Release history Release notifications | RSS feed

1.2.1

2 release files

1.2.0

2 release files

This release

1.0.0 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page