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.2.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.2.0
File Size Uploaded
nlproxy-1.2.0.tar.gz 74.6 kB Details

Built distribution (wheel)

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

Total release size: 10.0 MB

Release files / nlproxy-1.2.0.tar.gz

Download URL nlproxy-1.2.0.tar.gz
Size 74.6 kB
Tags Source
SHA-256 checksum
How to use checksums
93130cfb63896cc441cbc24b771e0e7b24f9f099c2ef3e18a1dd01204ce982e6
BLAKE2b-256 checksum
How to use checksums
510fa6f919332a636db00e38e48ecb5b81538cc24060111c228cf91510b30f11
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.13.3

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

Download URL nlproxy-1.2.0-cp38-abi3-manylinux_2_39_x86_64.whl
Size 9.9 MB
Tags CPython 3.8 Linux glibc 2.39+ x86-64 abi3
SHA-256 checksum
How to use checksums
a84ae2ac917d33ea4b77e3d4b0f770d2400974ba8fb9c4ab9803c149e44296dc
BLAKE2b-256 checksum
How to use checksums
177528ff79e955f17d045913faee5bf14675a13ceb0ac433c34524c42c024baf
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

This release

1.2.0 This release

2 release files

1.0.0

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