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.dev4.tar.gz (407.2 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.dev4-py3-none-any.whl (163.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for matchlab-0.1.0.dev4.tar.gz
Algorithm Hash digest
SHA256 1dd9cc9b297a26f8cb46d38762b82525c643b343d89c1ccb6515842c4290cc7f
MD5 ec374aacd6ec614d9f35463b6ea6d2ef
BLAKE2b-256 09d984ccd58eefabee9ce3b037615b6d64287d38a2a787a30c3ec6e1e3b43744

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for matchlab-0.1.0.dev4-py3-none-any.whl
Algorithm Hash digest
SHA256 5868cbb63f09d853bbb48df6dbbee26b65ed84f9db48671153e8de73eeb1e903
MD5 6721856e63229b4771b229694794ba98
BLAKE2b-256 6a840b7727dc0cdeaec01e7b96fa7ed095c00374691652f1b6bb4ce5a514f8c6

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