Skip to main content

Identity resolution as code

Project description

kanoniv

Identity resolution as code. Define matching rules in YAML, reconcile locally in Python.

PyPI License

Installation

pip install kanoniv

Quick Start

import kanoniv

# 1. Load your spec
spec = kanoniv.Spec.from_file("kanoniv.yml")

# 2. Validate it
result = kanoniv.validate(spec)
result.raise_on_error()

# 3. Load sources
sources = [
    kanoniv.Source.from_csv("crm", "data/crm_contacts.csv", primary_key="id"),
    kanoniv.Source.from_csv("billing", "data/billing_accounts.csv", primary_key="id"),
]

# 4. Reconcile
result = kanoniv.reconcile(sources, spec)

# 5. Golden records as a DataFrame
df = result.to_pandas()
print(f"{result.cluster_count} entities, {result.merge_rate:.0%} merge rate")

Every record in the output DataFrame gets a kanoniv_id — a stable identifier that groups duplicate records across sources into a single entity.

What the Spec Covers

The YAML spec is the single source of truth for your identity resolution pipeline:

  • Sources — canonical field mappings from each system
  • Blocking — composite keys to reduce O(n²) comparisons
  • Scoring — Fellegi-Sunter probabilistic matching with EM training
  • Normalizers — email, phone, name, nickname, domain (built-in)
  • Survivorship — golden record assembly rules (source priority, most complete)
  • Governance — freshness checks, schema validation, shadow-mode deploys

See the spec reference for the full schema.

Source Adapters

# Pandas DataFrame
source = kanoniv.Source.from_pandas("crm", df, primary_key="contact_id")

# CSV file
source = kanoniv.Source.from_csv("billing", "data/billing.csv", primary_key="account_id")

# Warehouse table (requires sqlalchemy)
source = kanoniv.Source.from_warehouse(
    "erp", table="raw.erp_customers", connection_string="postgresql://..."
)

# dbt model (requires sqlalchemy)
source = kanoniv.Source.from_dbt("staging", model="stg_customers")

Validation & Planning

# Validate spec for errors
result = kanoniv.validate(spec)
if not result:
    print(result.errors)

# Preview the execution plan
plan = kanoniv.plan(spec)
print(plan.summary())

Diffing Specs

# Compare two spec versions
diff = kanoniv.diff(spec_v1, spec_v2)
print(diff.summary)

Cloud API (Optional)

For managed reconciliation, monitoring, and collaboration, install with the cloud extra:

pip install kanoniv[cloud]
client = kanoniv.Client(api_key="kn_...")

result = client.resolve(system="crm", external_id="003xxx")
entities = client.entities.search(q="john@acme.com")

See the cloud API docs for the full reference.

Links

License

Apache-2.0

Project details


Download files

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

Source Distribution

kanoniv-0.2.17.tar.gz (273.2 kB view details)

Uploaded Source

Built Distributions

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

kanoniv-0.2.17-cp314-cp314-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.14Windows x86-64

kanoniv-0.2.17-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ x86-64

kanoniv-0.2.17-cp314-cp314-macosx_11_0_arm64.whl (1.3 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

kanoniv-0.2.17-cp314-cp314-macosx_10_12_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.14macOS 10.12+ x86-64

kanoniv-0.2.17-cp313-cp313-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.13Windows x86-64

kanoniv-0.2.17-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

kanoniv-0.2.17-cp313-cp313-macosx_11_0_arm64.whl (1.3 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

kanoniv-0.2.17-cp313-cp313-macosx_10_12_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.13macOS 10.12+ x86-64

kanoniv-0.2.17-cp312-cp312-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.12Windows x86-64

kanoniv-0.2.17-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

kanoniv-0.2.17-cp312-cp312-macosx_11_0_arm64.whl (1.3 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

kanoniv-0.2.17-cp312-cp312-macosx_10_12_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

kanoniv-0.2.17-cp311-cp311-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.11Windows x86-64

kanoniv-0.2.17-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

kanoniv-0.2.17-cp311-cp311-macosx_11_0_arm64.whl (1.3 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

kanoniv-0.2.17-cp311-cp311-macosx_10_12_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

kanoniv-0.2.17-cp310-cp310-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.10Windows x86-64

kanoniv-0.2.17-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

kanoniv-0.2.17-cp310-cp310-macosx_11_0_arm64.whl (1.3 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

kanoniv-0.2.17-cp310-cp310-macosx_10_12_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.10macOS 10.12+ x86-64

kanoniv-0.2.17-cp39-cp39-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.9Windows x86-64

kanoniv-0.2.17-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

File details

Details for the file kanoniv-0.2.17.tar.gz.

File metadata

  • Download URL: kanoniv-0.2.17.tar.gz
  • Upload date:
  • Size: 273.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.12.2

File hashes

Hashes for kanoniv-0.2.17.tar.gz
Algorithm Hash digest
SHA256 c5b2cc8cc742278a3d5190f96759cf818f76c6f73441b124801b618c020c5edd
MD5 eaef2402cf2b9e4b1664ae5b0a693dd0
BLAKE2b-256 d01be72ee8a68ccda2eb055114525e9c46317a9f3e9b869e6f1413c00f8ef975

See more details on using hashes here.

File details

Details for the file kanoniv-0.2.17-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for kanoniv-0.2.17-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 3add24792f0576faed8d2a53137d80906963a71c90b6fec7b100deb014e621e2
MD5 ac600b334e5a54408ff8779f247bd431
BLAKE2b-256 7fef2b3d1097b224f8a84bdab34b2e71029c9a4a57eabaf7b7d1dc56079b1337

See more details on using hashes here.

File details

Details for the file kanoniv-0.2.17-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for kanoniv-0.2.17-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8e7bc6158336a6da8155b54b4aa0748b5c08ec4d9f9fee9e1b3bf93ae2a2de98
MD5 36f6563e0f2a8d5999269df854b3a129
BLAKE2b-256 f639afc1f7f670fa0b8937126858570e62189295b6a6e54fd681cc0c4d41c28f

See more details on using hashes here.

File details

Details for the file kanoniv-0.2.17-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for kanoniv-0.2.17-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 28ddfe97cd734eb953b709a4403f5f2318ff03b01350550b5a158c9aeda68899
MD5 b3fcd3b4e9e4b6b669f4fade9e485616
BLAKE2b-256 46a7fcf264e15f5dd35154bcfd7ccf8eef2ab23aec8fe15c29833d9b0cde0f6c

See more details on using hashes here.

File details

Details for the file kanoniv-0.2.17-cp314-cp314-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for kanoniv-0.2.17-cp314-cp314-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 542ca1c34a707ab6a7f925707ac8d1f3a68beb30cd9523eb4b92e1a1bb918772
MD5 ff70a3e4a8b1c7e6c67e53de8996219b
BLAKE2b-256 f2a1999f1483f6b2692bc9ef2570fedd4abccc43620842f695b3470c1bb810a0

See more details on using hashes here.

File details

Details for the file kanoniv-0.2.17-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for kanoniv-0.2.17-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 d55b22ae42436c7896f3b47ed0f7643cd8b07dd9231b574114d910dbe3e78825
MD5 2d50fb4f049cc53111cef040e14fc941
BLAKE2b-256 afd3e329397d4ef791d7f92cde52b7c83c93ed3da45374b6002c90bd6548242d

See more details on using hashes here.

File details

Details for the file kanoniv-0.2.17-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for kanoniv-0.2.17-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 00ef3c0e4147971d2c842836273c4ba3b8e4e6fcce7a637a20ea1a00d6622d5a
MD5 727029df172ae07c727fe4ff829dcb5d
BLAKE2b-256 6fe491beaefec74bcbb14e62b3a5fd00ee66f785bff222d076b116f315fa1d1d

See more details on using hashes here.

File details

Details for the file kanoniv-0.2.17-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for kanoniv-0.2.17-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ce2f2d61bed9d477a437508d1acac86d8480306d3b2277caf87b285da1ec55d0
MD5 0f32accf4a6609bb4fb1ee3f4a44b7b6
BLAKE2b-256 0c15a3099b6bbc0a04a14937681f6f570c907281cdc403c6abfd39ae1c720897

See more details on using hashes here.

File details

Details for the file kanoniv-0.2.17-cp313-cp313-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for kanoniv-0.2.17-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 79ee0ed4303280829690f088add44edae180a2fd529f92b1aac44da0e24cf035
MD5 5639f5116d91ecb570948bb8d7f78f0c
BLAKE2b-256 b7abfbbaa49590add00314a77fa6410127883162fdfdc90af0f79882afeeedbb

See more details on using hashes here.

File details

Details for the file kanoniv-0.2.17-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for kanoniv-0.2.17-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 ea5b55e3a92d31cd68f7917ebc823c70d189ba8040220874cf3927707e241614
MD5 0b2dcd2344545f2c7ad56ed7e0b4279c
BLAKE2b-256 9a06977edc673a187b7ba38213837f982ccb0738bdcaff576831064b8c171c7f

See more details on using hashes here.

File details

Details for the file kanoniv-0.2.17-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for kanoniv-0.2.17-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 383affd1fd4ec637f7612c65501251df2d8e09d1fd35cc0bf155b39ef751b260
MD5 a68f22574f046badb92ed917fa864692
BLAKE2b-256 e06e2139754c5df9940a365f71683d32c26e6a9e2d07cace647468d6b7ad82b2

See more details on using hashes here.

File details

Details for the file kanoniv-0.2.17-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for kanoniv-0.2.17-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9cf27e010ea7397c8e0c2f9f3d22df209d4f455487679ec82ac6ccef04eedc11
MD5 11943045f9089163ba2fa714b8c5de75
BLAKE2b-256 3a211774ed46250d73f3afc816ab8310a0b6a6b703689e3c640e7c3db6a54d36

See more details on using hashes here.

File details

Details for the file kanoniv-0.2.17-cp312-cp312-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for kanoniv-0.2.17-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 6192fc4683dac1477cbf3b9414e70b6f857555ef702c093d5a9f802356157f6d
MD5 d86a662fa5c05340fa7f8fc2932f43af
BLAKE2b-256 0db6bfc2301debe5f868786d49c8fedd6fbe61a86a4fb0b6fdcbbbb91c995c46

See more details on using hashes here.

File details

Details for the file kanoniv-0.2.17-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for kanoniv-0.2.17-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 8416ed8f32c037a871b1b78dec17ac06bcb8b42cfe407076cd5827eae552de88
MD5 c9380a1908fac1e296b49ff44fcaab02
BLAKE2b-256 caf71eace36306563b237929db76aebd6271c2742b81f3437d5cd3acea0ee5a9

See more details on using hashes here.

File details

Details for the file kanoniv-0.2.17-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for kanoniv-0.2.17-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e4eb609203366dd6748acff7a2279652f2a8301335176c61ed61f6f67dff9d43
MD5 740cf197c0015f066f23eb3a1ab01018
BLAKE2b-256 b8f90de5db53338969256dfe2bc4edc3da5cecb9fa17a3fcdc8278a42c3c0d16

See more details on using hashes here.

File details

Details for the file kanoniv-0.2.17-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for kanoniv-0.2.17-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e0730c9940eb5665a9f7c1ca089c496b106d58b8ec4b0d4fd93ce1223a73ab8a
MD5 8ae22aaeaa1a48af43411220378b63b5
BLAKE2b-256 ef5f61807e86134c19d350c6fbfb094dec225a51cbfc4e6acac3d8a6a87f9576

See more details on using hashes here.

File details

Details for the file kanoniv-0.2.17-cp311-cp311-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for kanoniv-0.2.17-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 1547da7bb7ed172251d07b32050fe0c4a0e9154fdb163ce9a005da0531220d85
MD5 55895a0e06a86335cc1bb2a778d3cd51
BLAKE2b-256 1df9a276808325a13dfdf4889c0f188c8b74fbae07aca2ba71a1e385cfcc0026

See more details on using hashes here.

File details

Details for the file kanoniv-0.2.17-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for kanoniv-0.2.17-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 ff4bf4ba63c337dab4cf97e924eecfdcfa83a4c94e061f50071efea508d037eb
MD5 b59e24253eebc3362e86a9ff8a60acbd
BLAKE2b-256 a041d4fae7752d43b40b871164afa92ed91c15902b480e6d57067c3367aa29ea

See more details on using hashes here.

File details

Details for the file kanoniv-0.2.17-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for kanoniv-0.2.17-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 292f4ccaff13af05af74fa224cfa0f863c7cb1decc145506dfb654c19c7e38f0
MD5 079f2c161a0f38bdb8c686522a8716f3
BLAKE2b-256 caeeb12a874951a38f0ba3fa88b26ac4099bfe1d90b4e8a933fb7bb48711aaa9

See more details on using hashes here.

File details

Details for the file kanoniv-0.2.17-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for kanoniv-0.2.17-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1c5ecb78bea5c656345f33881cca26a4842dd6b3b996f4150978ccaf34591779
MD5 e2085e6816f81859258910e1a0e41722
BLAKE2b-256 c38209da68c8464134a949f9a6b3e8752c58a07f5956a0064a1ee438dcca6808

See more details on using hashes here.

File details

Details for the file kanoniv-0.2.17-cp310-cp310-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for kanoniv-0.2.17-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 bb16006b5ffe207ace180e46a9e6593e7d09d95b49edec6521ba867f1a399af9
MD5 756c9d63026d0e2c46276eeeffcb0ca7
BLAKE2b-256 6fa6ffcaf831c69f6918cc02b54a1948c917489b908f8b80f995f4c739c9b17c

See more details on using hashes here.

File details

Details for the file kanoniv-0.2.17-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: kanoniv-0.2.17-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.12.2

File hashes

Hashes for kanoniv-0.2.17-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 c57dd3c09ad2923c2c95a71d7924f13bf3229a145db3e4752937e900b1ccce5f
MD5 6aed3bdf028285b5440c93d64e66dfac
BLAKE2b-256 56f934d7c8e526df1c88601cee9264d9ef4552a732ae70af31fa49ee63aee262

See more details on using hashes here.

File details

Details for the file kanoniv-0.2.17-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for kanoniv-0.2.17-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5ecdd2c40a39280372ba7aca8129c88874f6771ecd45c05b5edf290e1d7dada7
MD5 9fbe703ffeba11ea07b524137475cc1e
BLAKE2b-256 e3268ba8c216d01cc9cd8ffeba22b57d7871e0cc4ea0b8d21a4a0c13de3c40e7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page