Skip to main content

MassEngine Python SDK (massengine)

Official zero-dependency Python client for MassEngine — the sub-5ms filtered and hybrid 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 vectors + structured metadata
client.ingest(
    "acme-prod",
    [
        Doc(
            id="doc-1",
            vector=[0.12, -0.44, 0.88, 0.05],
            category=1,
            metadata={"department": "security", "clearance": 3, "tags": ["soc2", "policy"]},
        )
    ],
)

# 2. Hybrid dense + BM25 search with rich metadata filter operators
res = client.search(
    "acme-prod",
    vector=[0.12, -0.44, 0.88, 0.05],
    query_text="soc2 policy",
    hybrid_alpha=0.7,
    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",
    "doc-1",
    metadata={"clearance": 4, "reviewed": True},
)

# 4. Inspect tenant quota & billable usage
usage = client.get_tenant_usage("acme-prod")
print(usage)

License

Apache License 2.0

Metadata

Release files for massengine 1.1.3

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

Source distribution (sdist)

Source distribution for massengine 1.1.3
File Size Uploaded Provenance Actions
massengine-1.1.3.tar.gz 9.0 kB Without provenance Details for massengine-1.1.3.tar.gz

Built distribution (wheel)

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

Total release size: 16.7 kB

Release files / massengine-1.1.3.tar.gz

Download URL massengine-1.1.3.tar.gz
Size 9.0 kB
Tags Source
SHA-256 checksum
How to use checksums
0b70d772b4a81109a90f8db5c9fcd51c16068ea61f1e85dd9bda4344256da4f1
BLAKE2b-256 checksum
How to use checksums
a594947650bd2748594b19072a8937cc0d87083651481e4e5670294b136ede03
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / massengine-1.1.3-py3-none-any.whl

Download URL massengine-1.1.3-py3-none-any.whl
Size 7.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
448b7eea71ae96625c58159b9b9b5d96b176b6b067b1cf99501f4f564fd8d4dc
BLAKE2b-256 checksum
How to use checksums
c499d2547940cc74a8047abc9159acf6a202c0703abb637d32023275982ea957
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for massengine 1.1.3

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

1.1.3 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