Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

matchlab

A local-first library for building, running and evaluating entity resolution pipelines.

Record matching is a chore. matchlab makes it a pipeline you can build, run, query and measure — on your machine, against your warehouse, with nothing to deploy.

import matchlab as mb

companies = mb.read_database(
    name="crn",
    sql="select pk, company, town from companies",
    client=warehouse,
    key_field="pk",
)

entities = (
    companies.clean({"name": "lower(crn_company)"})
    .dedupe(
        model_class=mb.NaiveDeduper,
        model_settings={"unique_fields": ["name"]},
    )
    .resolve()
    .collect()
)

entities.lookup_key(from_source="crn", to_sources=["dh"], key="a1")

Read the full documentation.

What it does

  • A lazy plan. Source(...).dedupe(...).resolve() builds a tree of steps. Nothing runs until you collect().
  • Content-addressed caching. Re-collecting an unchanged plan does no work. Adding a step runs only that step.
  • Materialised resolver output. A collected resolver writes a complete (root, leaf, key, source) table, so lookups are reads, not re-derivations.
  • Measurement as a first-class job. Sample clusters, record judgements, score precision and recall, and compare methodologies on equal terms.

What it doesn't do

No server, no accounts, no permissions, nothing to deploy. If you need a shared, governed matching service, matchlab is not that.

Installation

pip install matchlab

Coming from Matchbox?

matchlab is the successor to matchbox-db, with the server removed and the client API rebuilt. It's a hard break — see the migration guide.

Development

See our full development guide and coding standards on our contribution guide.

Download files

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

Source Distribution

matchlab-0.1.0.dev3.tar.gz (406.4 kB view details)

Uploaded Source

Built Distribution

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

matchlab-0.1.0.dev3-py3-none-any.whl (163.2 kB view details)

Uploaded Python 3

File details

Details for the file matchlab-0.1.0.dev3.tar.gz.

File metadata

  • Download URL: matchlab-0.1.0.dev3.tar.gz
  • Upload date:
  • Size: 406.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.5

File hashes

Hashes for matchlab-0.1.0.dev3.tar.gz
Algorithm Hash digest
SHA256 00dff778c51c26d75f90b88865985a9d040c359640b49ad7cd18690153e12fde
MD5 43f73a21b7d1bbcead0862fe17b382a7
BLAKE2b-256 b95c5ba89263a62e2d53f0ce4ff333f378b525fffe764b2d9088278825be0b5e

See more details on using hashes here.

File details

Details for the file matchlab-0.1.0.dev3-py3-none-any.whl.

File metadata

File hashes

Hashes for matchlab-0.1.0.dev3-py3-none-any.whl
Algorithm Hash digest
SHA256 97dc8ec31e4cd5c877192fda58c4da61563e5006859abe832c5e776cd52d6052
MD5 74c5cbff9319881bd9dadf590dacc2c7
BLAKE2b-256 ebb5ec94aacf9eaf177701adf7b10e0d30319dc7d0d6f87848946d71e26bf386

See more details on using hashes here.

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