Skip to main content

Python client SDK for the Implicant FHE inference platform

Project description

Implicant SDK

Python client for the Implicant FHE inference platform. Encrypts one row locally under BGV, sends the ciphertext to the platform for homomorphic evaluation, and decrypts the result. The server never sees plaintext; the secret key never leaves the process.

The classifier head runs server-side under FHE (Variant B): the platform returns one ciphertext with the class scores packed contiguously, which the client decrypts (unsigned) and decodes with decode_class_scores before threshold/argmax. W / b never reach the client.

Pure Python — all crypto comes from implicant-fhe (helut.client). Contracts: docs/architecture.md and platform/docs/FHE_INTERFACE_SPEC.md.

Install (developers)

implicant-fhe (the helut crypto wheel) is not on a public index — resolve it from the bundled ./wheels/. Wheels ship for cp310–cp313 (macOS-arm64 + manylinux-x86_64) only; Python 3.14 has no wheel, so use a 3.10–3.13 interpreter.

python3.13 -m venv .venv313
.venv313/bin/pip install -e ".[app,dev]" --find-links wheels/
.venv313/bin/pytest tests/ -v      # 79 pass in ~3.5 min — the real smoke test

Desktop app (end users)

Non-technical users install a double-click app instead of using Python:

  • macOS (Apple chip): open the .dmg and drag Implicant to Applications.
  • Linux (Intel/AMD chip): run the .AppImage.

Other platforms are not supported yet; the app says so on launch. Building the installers is documented in docs/INSTALL_SMOKE_TEST.md.

Use

from implicant import ImplicantClient
from implicant.transport import HttpxTransport

client = ImplicantClient(
    HttpxTransport(base_url="https://api.implicant.example", api_key="imp_..."),
    key_cache_dir="~/.implicant/keys",
)
result = client.predict(
    "breast-cancer",
    {"mean_radius": 14.2, "mean_texture": 20.1},
    class_names=("benign", "malignant"),
)
print(result.prediction.label)
implicant predict --model breast-cancer --input row.json

License

Apache-2.0.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

implicant-0.2.0.tar.gz (58.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

implicant-0.2.0-py3-none-any.whl (39.9 kB view details)

Uploaded Python 3

File details

Details for the file implicant-0.2.0.tar.gz.

File metadata

  • Download URL: implicant-0.2.0.tar.gz
  • Upload date:
  • Size: 58.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for implicant-0.2.0.tar.gz
Algorithm Hash digest
SHA256 77c8231cdf1542db039aff5a743d2c0695d0769264d1373b4bb6a3f12fd8d192
MD5 ee7e15561266766ddbbc4122893b35a7
BLAKE2b-256 10dee6bbad2157ffce79b19d75b738fc5c8370d919bfb5a5ac48aa18aebdf4a7

See more details on using hashes here.

File details

Details for the file implicant-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: implicant-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 39.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for implicant-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1f9ecb5e2c74309e5808cd194de3b7bc532c86ffcb0648fa44a95efbcc06296c
MD5 aa669d381219cab473270a5fecd07aaf
BLAKE2b-256 3be79ba019b7c80ca58162897a25f812b267a87fecc9a67ff2aa9da3d189acb5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page