Skip to main content

BlindMLClient

BlindMLClient is a Python client library designed to interact with the BlindMLServer, which hosts models powered by Fully Homomorphic Encryption (FHE).
It enables users to perform secure, encrypted predictions without ever exposing raw input data — ensuring full privacy throughout the inference pipeline.

✨ Features

  • Initialize a secure connection with an FHE-enabled inference server
  • Encrypt input data using Fully Homomorphic Encryption (FHE)
  • Send encrypted data and perform remote inference
  • Decrypt the server's encrypted prediction result into readable output
  • Supports integration with Concrete-ML

📦Installation

pip install blindml

🚀 Example Usage

import blindml

# Define server URL and your API key
SERVER_URL = "http://127.0.0.1:3000/proxy/cm/43f75fc1-488e-4ebb-82dd-2f59ee80f3ce"
API_KEY = "YOUR_API_KEY"

# Initialize the client
bm = blindml()
bm.init(server_url=SERVER_URL, api_key=API_KEY)

# Example input (e.g., model features)
input_data = [1.5, 2.3, 3.7]

# Step 1: Encrypt the input
encrypted_input = bm.encrypt(input_data)

# Step 2: Send encrypted input and receive encrypted prediction
encrypted_prediction = bm.predict(encrypted_input)

# Step 3: Decrypt the result
prediction = bm.decrypt(encrypted_prediction)

print("Prediction result:", prediction)

📚 API Methods

init(server_url: str, api_key: str) -> None

Initializes the BlindMLClient with the server’s endpoint and your authentication key.

  • Parameters:
    • server_url: URL of the deployed BlindMLServer
    • api_key: API key used for authenticating the client

encrypt(input_data: Any) -> EncryptedData

Encrypts the input data using Fully Homomorphic Encryption (FHE).
This prepares the input for secure inference.

  • Parameters:

    • input_data: Input data formatted according to the model's expected input schema
      (e.g., a list of floats, dictionary, or other structure depending on the model)
  • Returns:

    • Encrypted version of the input data

predict(encrypted_input: EncryptedData) -> EncryptedResult

Sends the encrypted input to the server and receives an encrypted prediction result.

  • Parameters:

    • encrypted_input: The output from the encrypt() method
  • Returns:

    • An encrypted prediction result returned by the server

decrypt(encrypted_result: EncryptedResult) -> Any

Decrypts the server’s encrypted prediction and returns it in a human-readable format.

  • Parameters:

    • encrypted_result: The encrypted result from the predict() method
  • Returns:

    • The final decrypted prediction (e.g., a float or label)

📌 Notes

This client library must be used with a running instance of BlindMLServer

All communication and computation are based on Fully Homomorphic Encryption (FHE), providing end-to-end data privacy

Metadata

Release files for blindml 0.1.2

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

Source distribution (sdist)

Source distribution for blindml 0.1.2
File Size Uploaded Provenance Actions
blindml-0.1.2.tar.gz 7.7 kB Without provenance Details for blindml-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for blindml 0.1.2
File Interpreter ABI Platform Actions
blindml-0.1.2-py3-none-any.whl Python 3 none any Details for blindml-0.1.2-py3-none-any.whl

Total release size: 18.4 kB

Release files / blindml-0.1.2.tar.gz

Download URL blindml-0.1.2.tar.gz
Size 7.7 kB
Tags Source
SHA-256 checksum
How to use checksums
7aaf4c362c8485d7c936bc752802f5f5efefc017b7fae7252ec5116ac91aeafb
BLAKE2b-256 checksum
How to use checksums
f64843ba3d072efe129ece1d232e6bdb70417ac7688672c4005b17f75bf1d0bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.8.20

Release files / blindml-0.1.2-py3-none-any.whl

Download URL blindml-0.1.2-py3-none-any.whl
Size 10.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7dc2812c3408e608add5c532f56b0e0134898dfc89ab5d5c879c381895743ff0
BLAKE2b-256 checksum
How to use checksums
f73c52d5be4b610d333ca853791623db0aa24c474acad6575a721ff05e0ac746
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.8.20

Security for blindml 0.1.2

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.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files No provenance

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