Skip to main content

Identity resolution as code

Project description

kanoniv

Python client for the Kanoniv identity resolution API.

Installation

pip install kanoniv

Quick Start

import kanoniv

client = kanoniv.Client(
    api_key="kn_abc123",
    base_url="https://api.kanoniv.com",
)

# Resolve an identity
result = client.resolve(system="salesforce", external_id="003xxx")
print(result["canonical_data"])

# Search entities
results = client.entities.search(q="john@acme.com")

# Ingest records
client.ingest("source-uuid", records=[
    {"id": "ext_1", "type": "contact", "name": "John", "email": "john@acme.com"},
])

# Dashboard stats
stats = client.stats()
print(f"{stats['total_canonical_entities']} canonical entities")

Async Usage

async with kanoniv.AsyncClient(api_key="kn_...") as client:
    result = await client.resolve(system="crm", external_id="sf_123")
    entities = await client.entities.search(q="jane")

Authentication

# API key (recommended for programmatic use)
client = kanoniv.Client(api_key="kn_abc123")

# JWT bearer token
client = kanoniv.Client(access_token="eyJ...")

Resources

Resource Methods
client.entities search(), get(), get_linked(), history()
client.sources list(), get(), create(), update(), delete(), sync(), preview()
client.rules list(), create(), history()
client.jobs list(), get(), run(), cancel()
client.reviews list(), decide()
client.overrides list(), create(), delete()
client.audit list(), entity_trail()
client.specs list(), get(), ingest()

Error Handling

from kanoniv import NotFoundError, RateLimitError

try:
    entity = client.entities.get("nonexistent")
except NotFoundError:
    print("Entity not found")
except RateLimitError as e:
    print(f"Rate limited, retry after {e.retry_after}s")

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.1.tar.gz (172.8 kB view details)

Uploaded Source

Built Distribution

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

kanoniv-0.2.1-cp314-cp314-manylinux_2_34_x86_64.whl (919.8 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.34+ x86-64

File details

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

File metadata

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

File hashes

Hashes for kanoniv-0.2.1.tar.gz
Algorithm Hash digest
SHA256 07e37dfad67ee1a9ede6e60ad95f061242f6215ace23ab81e6b39431f6c0246f
MD5 a098b286868cdafcfef4b8ed72111cf3
BLAKE2b-256 94719e764f54fd037b52074227cee64934d3549d205e961675fe54a93547276d

See more details on using hashes here.

File details

Details for the file kanoniv-0.2.1-cp314-cp314-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for kanoniv-0.2.1-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 79e815b64fed47f38ae9c4c6e001176fee614d0acc04600448ee593f7b098f15
MD5 0b2397ba491c4324a44c9bea349bc1dd
BLAKE2b-256 dd360a8d91550cacfab6a0bdcdb3b3f6e364ab2302d10a6f577b4c9869c1464d

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