The `fingerprints` library is a utility for generating stable and deterministic hashes (fingerprints) for entities based on their identifying attributes like names, addresses, and identifiers. It's commonly used in data matching and deduplication scenarios, particularly within the 'opensanctions' ecosystem. The current version is 1.3.1, and its release cadence is irregular, typically corresponding to bug fixes or minor feature enhancements.
pip install fingerprintsVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to import and use the `generate` function to create fingerprints for different types of entities. It highlights that the library internally normalizes inputs, leading to identical fingerprints for semantically equivalent data.
Refer to the library's source code or documentation to understand the full list of supported input keys. Ensure you are passing only relevant and recognized identifying attributes as keyword arguments to `generate`.
Understand that `fingerprints` provides a strong, deterministic identifier for *exact* matches after normalization. For fuzzy matching or similarity detection, other libraries or algorithms (e.g., Levenshtein distance, Jaccard similarity) are required.
For production environments requiring stable fingerprint generation, it is advisable to pin the exact version of the `normality` library used in your project. Regularly test `fingerprints` behavior when updating `normality`.
Install the library using pip: `pip install fingerprints`
Provide identifying attributes as keyword arguments, for example: `from fingerprints import generate; generate(name="Example Entity", country="ZZ")`.
Ensure that country values are valid ISO 3166-1 alpha-2 codes (e.g., 'US', 'DE', 'GB') or common country names that `normality` can resolve. Consult `normality`'s documentation for supported country formats.