Skip to main content

Canonical entity resolution, aliasing, and merges for MetaSPN systems

Project description

metaspn-entities

Identity layer for MetaSPN systems.

Features

  • Canonical entity IDs
  • Deterministic identifier normalization + alias resolution
  • Merge history and reversible soft undo
  • SQLite backend using stdlib sqlite3
  • Event emission payloads for EntityResolved, EntityMerged, EntityAliasAdded
  • Optional filesystem snapshot export

Quick usage

from metaspn_entities import EntityResolver

resolver = EntityResolver()
resolution = resolver.resolve("twitter_handle", "@some_handle")
events = resolver.drain_events()
print(resolution.entity_id, resolution.confidence)

API notes

  • resolve(identifier_type, value, context=None) -> EntityResolution
  • add_alias(entity_id, identifier_type, value, ...)
  • merge_entities(from_entity_id, to_entity_id, reason, ...)
  • undo_merge(from_entity_id, to_entity_id, ...) (implemented as reverse merge with redirect correction)
  • drain_events() -> list[EmittedEvent]
  • export_snapshot(output_path) to inspect SQLite state as JSON

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

metaspn_entities-0.1.0.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

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

metaspn_entities-0.1.0-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: metaspn_entities-0.1.0.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for metaspn_entities-0.1.0.tar.gz
Algorithm Hash digest
SHA256 93b9d0bb94de18a070363870e13529ba4a97be197030349bc5c6dc3f162ab8b0
MD5 58523eb1247a8166b3e0b34bcc8c8eba
BLAKE2b-256 f2c4c876c75da85fcacf6ba6157d40dc4a58b49333014db5838688b1fb700e96

See more details on using hashes here.

Provenance

The following attestation bundles were made for metaspn_entities-0.1.0.tar.gz:

Publisher: publish.yml on MetaSPN/metaspn-entities

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for metaspn_entities-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 61a3357faedbd83058940f3c419e2fe8921bbdd1e95d05900cdb9b6b02ed3892
MD5 4036e53ee371f59209ac34b767065825
BLAKE2b-256 1c8226fbed8921ec0196dae9d5dd74ba7e69c78af9094c0de43d6d31db59e42c

See more details on using hashes here.

Provenance

The following attestation bundles were made for metaspn_entities-0.1.0-py3-none-any.whl:

Publisher: publish.yml on MetaSPN/metaspn-entities

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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