Metadata-Version: 2.2
Name: pyenvector
Version: 1.4.0a2
Summary: Python SDK for enVector: encrypted vector search powered by homomorphic encryption
Author-Email: "CryptoLab Inc." <pypi@cryptolab.co.kr>
License: Proprietary
Classifier: License :: Other/Proprietary License
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Security :: Cryptography
Project-URL: Homepage, https://envector.io
Project-URL: Documentation, https://docs.envector.io
Project-URL: Repository, https://github.com/CryptoLabInc/envector-python-sdk
Project-URL: Bug Tracker, https://github.com/CryptoLabInc/envector-python-sdk/issues
Requires-Python: <3.14,>=3.9
Requires-Dist: grpcio<=1.74.0,>=1.49.1
Requires-Dist: grpcio-health-checking<=1.74.0,>=1.49.1
Requires-Dist: protobuf<6.0.0,>=5.0.0
Requires-Dist: loguru
Requires-Dist: numpy>=2.0.2
Requires-Dist: tqdm
Requires-Dist: cryptography
Provides-Extra: colab
Requires-Dist: numpy==2.0.2; extra == "colab"
Description-Content-Type: text/markdown

# pyenvector — enVector Python SDK

Python SDK for [enVector](https://envector.io) — encrypted vector search powered by fully homomorphic encryption (FHE).

Your vectors and similarity scores stay encrypted during the entire computation. The server never sees plaintext data.

## Install

```bash
pip install pyenvector
```

## Quick Start

```python
import numpy as np
import pyenvector as ev

# Connect and load keys
ev.init(host="localhost", port=50050, key_path="./keys", key_id="my_key")

# Create an index
index = ev.create_index("my_index", dim=512)

# Insert vectors
vectors = np.random.randn(100, 512).astype(np.float32)
vectors /= np.linalg.norm(vectors, axis=1, keepdims=True)
metadata = [f"item_{i}" for i in range(100)]

index.insert(vectors, metadata=metadata)

# Search (encrypted end-to-end)
result = index.search(vectors[0], top_k=5, output_fields=["metadata"])
print(result)

# Clean up
ev.drop_index("my_index")
# ev.delete_key("my_key")  # optional: remove keys from server
```

## Key Features

- **End-to-end encryption** — vectors are encrypted on the client. Search runs on ciphertext via FHE. Scores are decrypted only on the client.
- **Familiar API** — `create_index`, `insert`, `search`, `drop_index`. Works like Milvus or Pinecone.
- **Key management CLI** — generate, seal, and upload HE keys to AWS S3 or GCP Cloud Storage.
- **Cloud-ready** — deploy the enVector server on GKE, EKS, or on-prem.

## Documentation

- [enVector Docs](https://docs.envector.io) — deployment, architecture, API reference
- [GitHub](https://github.com/CryptoLabInc/envector-python-sdk) — source, examples, issues

## License

Proprietary. See [LICENSE](https://github.com/CryptoLabInc/envector-python-sdk/blob/main/LICENSE) for details.
