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.3.0.tar.gz (325.7 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.3.0-cp314-cp314-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.14Windows x86-64

kanoniv-0.3.0-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.3.0-cp314-cp314-macosx_11_0_arm64.whl (1.2 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

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

Uploaded CPython 3.14macOS 10.12+ x86-64

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

Uploaded CPython 3.13Windows x86-64

kanoniv-0.3.0-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.3.0-cp313-cp313-macosx_11_0_arm64.whl (1.2 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.13macOS 10.12+ x86-64

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

Uploaded CPython 3.12Windows x86-64

kanoniv-0.3.0-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.3.0-cp312-cp312-macosx_11_0_arm64.whl (1.2 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.12macOS 10.12+ x86-64

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

Uploaded CPython 3.11Windows x86-64

kanoniv-0.3.0-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.3.0-cp311-cp311-macosx_11_0_arm64.whl (1.2 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.11macOS 10.12+ x86-64

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

Uploaded CPython 3.10Windows x86-64

kanoniv-0.3.0-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.3.0-cp310-cp310-macosx_11_0_arm64.whl (1.2 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

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

Uploaded CPython 3.10macOS 10.12+ x86-64

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

Uploaded CPython 3.9Windows x86-64

kanoniv-0.3.0-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.3.0.tar.gz.

File metadata

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

File hashes

Hashes for kanoniv-0.3.0.tar.gz
Algorithm Hash digest
SHA256 eb00351e21bbfc35251c01df30d7adda8e832d1f0d2dd19ecc6c4e9cf5e9e34e
MD5 574cbe93edbca087d872c104caab423c
BLAKE2b-256 75bcca63f3a18fc868fa8cd798940f594962ec2699e3fa143e87e4498bab2df0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kanoniv-0.3.0-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.12.4

File hashes

Hashes for kanoniv-0.3.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 aa258486d6ea867f4af84abe78a9e0a461e100dcd8252738cdce2fdff87c7d9b
MD5 74e337f2c17e1db4d3d85b8c14f4fdc4
BLAKE2b-256 2a9b8dc678335a55ebd05a1e7ff9d09d6fe02158c8f498df07e1776d18f8bdf9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kanoniv-0.3.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bca6005bd5fe486fcad894bccb6971b91ef31d3ab8b5ca3d9275289db533f8b3
MD5 6524a6b5f76df56e215d4e35c11512bb
BLAKE2b-256 58cc40d0885cc8f48138548745bb1d08eee184e1bca0a1ee1b9f6aa51292b7ae

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kanoniv-0.3.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 315b984940523cc72230b8c0d09eb6611e4f362f81167f7c69fa9204fc958ac1
MD5 94bef12eca8361f0656b8c3b1e716961
BLAKE2b-256 61a772583184050a3477d951b53eedebbabbf69fb8769bfe86637759bd6bceb3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kanoniv-0.3.0-cp314-cp314-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 4fee19283a51b0e75721fb565832cb946d0916f414594a339b755f1fc81e89d8
MD5 3d929e9a6e0655274b1e7323479a8adf
BLAKE2b-256 5a427327b405fbaa56cb30959a05b097a3b18a045f654c439af634aa1f0479f1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kanoniv-0.3.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.12.4

File hashes

Hashes for kanoniv-0.3.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 8917af6f1ccdc186da3ad9de619a315eefb4c37840a2921ea9e1144e93d0efd6
MD5 328089e42d616aa036189f45acc49e32
BLAKE2b-256 8120fa56642883b3d1a63f40aa72ead6f2d80d3004ea3c55aab62556c7afdb00

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kanoniv-0.3.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f90d4192d7c3d2024d633f826a5d01619960676c9e0a0270d5270533a9abfab1
MD5 4d29c54d452ec2d827b1231cb8042b0b
BLAKE2b-256 acbea213e49648bff7e882c3f9efa633d866d4018b063c9d38d3f05ec4daa8c0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kanoniv-0.3.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 410757a9f1330120a1f86d55f2bf59d906c9b17da351dadc1a9fd6d34a825d2f
MD5 ef825d0e7e97a5632754ed3207d9ba18
BLAKE2b-256 35895287223b46d39f37df29053f29a8d86620cc0fa3d06a7d543d9b36e6e41b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kanoniv-0.3.0-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 a2419379cf28dd42d45597583e8d163cd66cf574afd8c5b6f4a81964c59abb4f
MD5 cb0fb57044efcef9d335996cafd52737
BLAKE2b-256 807a7a536b022e12f6de0b3e4c5e36f34de99cb06cd72279983b020f16b91b6d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kanoniv-0.3.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.12.4

File hashes

Hashes for kanoniv-0.3.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 705c0693ad3ed62b9f00423551255dbfd0f704074b74b2c9a438cbe69c98417a
MD5 2c0d4936dc469db35fcc9458ff4bcabb
BLAKE2b-256 bb8d147661e59ab1cb39e71abfd57f55afa475d5d808292a20d9c87120bc0c45

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kanoniv-0.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b2f1eefd94ec86420c407b20f3f744aacb004ebf3ca2b178194527f3bd69e679
MD5 a13e9a225a6ba4ce8e7642af6ed48d0d
BLAKE2b-256 021867a09372e190f44d78c0091ca884076abc1c3aeca524323fcdb4712e8f0e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kanoniv-0.3.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4f1e567ee4258a771f2031aab1507020c27ae30b9f013c0faa05ca630cf70269
MD5 e6cd1e9db06ae6971593b95fc8034b54
BLAKE2b-256 ae80569b78a95b58c66a55f9e454a872ce75e72a570681424c54059beb7dd50f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kanoniv-0.3.0-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 61cf9642990cf37b398b7fd733d8ccde34ae3dc37b12b978362044127eb0296e
MD5 4028a29c8a07b2306cd599a91cd117d1
BLAKE2b-256 bbf706109d60d16fa825ee61d0fb7b2e5371b7693c235311ae8069c547d83c19

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kanoniv-0.3.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.12.4

File hashes

Hashes for kanoniv-0.3.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 d038015458ba152bed86ddef378e1bedb31349ea4b94c99a180cb3b1e5514e0f
MD5 b0ca118f5f86cf3124c83aecb41fccb5
BLAKE2b-256 d276922c164bfae171a9c792103d798d6b80522b6e48aeb64097147531ccd592

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kanoniv-0.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e1a7483c91c1aceeb71804ac7963210535efc49f1028ff028225bde99194bced
MD5 c12addcb86ba1c136bc24a2ac64bda8c
BLAKE2b-256 c177645420dc79b1c0d344fa3a82d64f451fc5314f46c16ae9142265edef04c6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kanoniv-0.3.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6d8452290ef7034fc5ea464414e1d963a4e49a08ecfca840596db8920ecac825
MD5 1522f3e9c4e84115b2a2b7047faac268
BLAKE2b-256 6347337b653071f3797957149cb7987f491ac610c8a6687b11b1e5a56f73efba

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kanoniv-0.3.0-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 efa5dec567bb60383abb74ec7479fde6619e4a48c37e14ea3a4f3bee01463510
MD5 4bf08b18d187ae63dd57793094e15c2e
BLAKE2b-256 e132878a6d0c758d10e29cc91dcbf1933a18a82e3d54cd288db35cb4f4b7ad96

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kanoniv-0.3.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.12.4

File hashes

Hashes for kanoniv-0.3.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 df07a257c7b42e5a894696b2541bab7df515cc274ef5537f8e52503eab8e1b99
MD5 6f1d90195c8cae4a9e5a9647498157ff
BLAKE2b-256 8f9c1d6825106461bf2d0b8c4e7461b8edb7c5b7bee21940d84c59134c3c002c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kanoniv-0.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5543a05c273f394d2b662fec6313e1faba861af0994b6ab7e5519f96e94ae59e
MD5 e1683dc2f4faae3527e0e34fd7dd4d59
BLAKE2b-256 52ec673e6e2be335addbba60fdc0cdacb58e75e13b973730ca52f05006491b60

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kanoniv-0.3.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2e0bf4d7c326eb05a67dde7cdf74c88a659dee7734d73ffcf94c6c34bd1bed49
MD5 ea01c84154d09a8b90fd310b2a4160d2
BLAKE2b-256 80bde3646b7c80d4bef31914ca45ca7cc95636980a6027c0dcf1bf9889516fba

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kanoniv-0.3.0-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 4f2172314b9280bb5069d7b438425173bcb619bb0ddc15f884d93da2bb978dab
MD5 ca37ed168d0f1373e5f52f792fc7f128
BLAKE2b-256 daa118ea5cc6300b11136269f536f180431a22e1a36d952e302e6ec497fdd8b9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kanoniv-0.3.0-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.4

File hashes

Hashes for kanoniv-0.3.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 7886a31b985feb999b7209707894e12e6c1133c57ed12288a9f5ae7ac3d277ad
MD5 89db63264b7544f344c3ec9b7d3d2d05
BLAKE2b-256 21742f2aa2c9ef4467ee558f2e4456ca5c4156e32777bb9afb85d6a50d3411ef

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kanoniv-0.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e0cfe4af2323a934334c0f062ecb040354b4c9bc78b2eadfa774abb9cb9c61ab
MD5 493f725bb68bea5405116f7a079ba29f
BLAKE2b-256 2e79c2497ac0266ac4d3ebac4b7d327ef235577318948f09f1b0f0089425bc92

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