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.2.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.2-cp311-cp311-manylinux_2_34_x86_64.whl (919.3 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

File details

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

File metadata

  • Download URL: kanoniv-0.2.2.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.2.tar.gz
Algorithm Hash digest
SHA256 9821392029b88bcf25d26f3e9f8dc8576f52cda3bfe0f54655b9035e088747ea
MD5 59a7d838dffe42c69473f4ed300167f3
BLAKE2b-256 788453d249d758e42bb999aa3908618b05eae0c234953fb10c8d7cb287f272f2

See more details on using hashes here.

File details

Details for the file kanoniv-0.2.2-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for kanoniv-0.2.2-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 517656758aad5e42da01272edc9ddd4efb1daa1cdb985cb18f2b0426b25286b3
MD5 ea6f7354a5c3d33a8fd1294687a35d7b
BLAKE2b-256 db12b3d47dc10ae39d4089f03f37cfd1d57f9a4230ce20e26eef9e55daf2611e

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