MassEngine Python SDK (massengine)
Official zero-dependency Python client for MassEngine — the sub-5ms filtered vector search database.
Installation
pip install massengine
Quickstart
from massengine import MassEngineClient, Doc
# Connect to a local quickstart cluster (http://localhost:8080) or cloud gateway:
client = MassEngineClient(
base_url="http://localhost:8080",
api_key="mk_your_tenant_or_meadm_admin_key",
)
# 1. Ingest dense vectors + structured metadata
client.ingest(
"acme-prod",
[
Doc(
id="docs/2026/policy-1",
vector=[0.12, -0.44, 0.88, 0.05],
category=1,
metadata={"department": "security", "clearance": 3, "tags": ["soc2", "policy"]},
)
],
)
# 2. Dense vector search with rich metadata filter operators
res = client.search(
"acme-prod",
vector=[0.12, -0.44, 0.88, 0.05],
k=10,
min_score=0.5,
metadata_filter={
"department": {"$in": ["security", "legal"]},
"clearance": {"$gte": 2},
"tags": {"$contains": "soc2"},
},
)
print(res["hits"])
# 3. In-place metadata patching without re-embedding
client.patch_doc(
"acme-prod",
"docs/2026/policy-1",
metadata={"clearance": 4, "reviewed": True},
)
# 4. Inspect tenant quota & billable usage
usage = client.get_tenant_usage("acme-prod")
print(usage)
Multi-Database Scoping
Create isolated databases within a tenant and scope operations using database= (pass tenant="" when authenticating with a tenant-scoped mk_... key):
client.create_database("", "analytics", data_type="int8")
client.ingest(
"",
[Doc(id="event-1", vector=[0.1, 0.2, 0.3, 0.4])],
database="analytics",
)
hits = client.search("", vector=[0.1, 0.2, 0.3, 0.4], database="analytics", k=5)
License
Apache License 2.0
Metadata
Release files for massengine 1.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| massengine-1.1.4.tar.gz | 13.0 kB | Without provenance | Details for massengine-1.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| massengine-1.1.4-py3-none-any.whl | Python 3 | none | any | Details for massengine-1.1.4-py3-none-any.whl |
Total release size: 22.6 kB
Release files / massengine-1.1.4.tar.gz
| Download URL | massengine-1.1.4.tar.gz |
|---|---|
| Size | 13.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
95ca2f2a572e94a0e71489f42b515d6118056f373ed5c1a4d6babd8702fbc275
|
|
BLAKE2b-256 checksum How to use checksums |
cdc71c29c84445d6d16ea5fb377824198d8a0ac91b526c245c10b9c4b5e46034
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.16
|
Release files / massengine-1.1.4-py3-none-any.whl
| Download URL | massengine-1.1.4-py3-none-any.whl |
|---|---|
| Size | 9.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9ae2c7f41590b5b099c9ee0095c5a9b4f959f983e4cd2548e1b72a8dae3e8c20
|
|
BLAKE2b-256 checksum How to use checksums |
5dac11f95e5bcd40586e0aa4b9c3c240cff55bda9a405ffcd5ab1e8022665eb8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.16
|
Security for massengine 1.1.4
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.