Skip to main content

Python client for the Kanoniv identity resolution API

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.1.0.tar.gz (10.1 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.1.0-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: kanoniv-0.1.0.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for kanoniv-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6b7b0bd529ff2de74e86f3f19cea278da6dc586ebc8224d1723a2e8b5c04e60f
MD5 8716a0525b7b45210ef24d3fefa8f2e6
BLAKE2b-256 7a51f32a33091672a3eb0ae884ba20374efe9ab5d7238820aae137df8548475e

See more details on using hashes here.

File details

Details for the file kanoniv-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: kanoniv-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for kanoniv-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 063cd6ab86f309372f2f17cf9364d34d76703d4d906d92d9b8a4d0afa21a574d
MD5 5e62b8ca9d339b37663232d404eb28d3
BLAKE2b-256 9c68424e24c949e2382237e06b9a8ad8ffdca7caea66a984cafd40bce51f4540

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