Registry / data / fingerprints

fingerprints

JSON →
library1.3.1pypypi✓ verified 90d ago

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 fingerprints
INSTALL
IMPORT
SIG · FINGERPRINTS
F
fingerprints
datapythonv1.3.1
Install
—
Import
—
Disk
—
Pass rate
0/ 10
Env Coverage0 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v? · pip install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.910 runs
build_error
glibc
py 3.10–3.910 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

generate
✓ from fingerprints import generate

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.

from fingerprints import generate # Generate a fingerprint for a person person_fp = generate(name="Angela Merkel", country="de", birth_date="1954-07-17") print(f"Person Fingerprint: {person_fp}") # Generate a fingerprint for an organization with an address org_fp = generate( name="Global Corp Inc.", address="123 Main Street, Cityville, Countryland", country="us", url="http://globalcorp.com" ) print(f"Organization Fingerprint: {org_fp}") # Fingerprints are deterministic for identical, normalized inputs same_person_fp = generate(name="angela merkel", country="germany", birth_date="1954-07-17") print(f"Same Person Fingerprint: {same_person_fp}") assert person_fp == same_person_fp
Debug
Known issues
gotchaInput keys for `generate` are specific and others are ignored. The `generate` function processes a predefined set of keys (e.g., `name`, `address`, `country`, `id_number`, `email`). Providing other, unrecognized keys will not cause an error but will be silently ignored, potentially leading to less distinct or identical fingerprints for entities that differ only by ignored attributes.
fix
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`.
affects: All versions
gotchaFingerprints are deterministic hashes, not fuzzy matches. This library generates exact cryptographic hashes (SHA1) based on *normalized* input. It is not designed for fuzzy matching (e.g., matching 'John Doe' to 'Jon Doh'). Even minor differences in input (like typos or extra spaces not handled by normalization) will result in completely different fingerprints.
fix
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.
affects: All versions
gotchaDependency on `normality` version and its behavior. The `fingerprints` library relies heavily on `normality` for data cleaning and standardization. Changes, bug fixes, or new normalization rules in newer versions of `normality` can subtly alter how data is processed, potentially leading to different fingerprints for the same input across different `normality` versions or environments.
fix
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`.
affects: All versions
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'fingerprints'
The `fingerprints` library is not installed in your Python environment or is not accessible from the current path.
fix
Install the library using pip: `pip install fingerprints`
TypeError: generate() missing 1 required positional argument: 'data'
The `generate` function was called without any keyword arguments. It expects identifying attributes to be passed as `key=value` pairs (e.g., `generate(name="Alice", country="US")`).
fix
Provide identifying attributes as keyword arguments, for example: `from fingerprints import generate; generate(name="Example Entity", country="ZZ")`.
ValueError: Could not normalize country: <INVALID_CODE>
The `country` argument provided to `generate` could not be normalized by the underlying `normality` library. This typically happens when an invalid or unresolvable country code or name is passed.
fix
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.
Upgrade
Version history
1.3.1latest on PyPI · released Aug 1, 2025
Audit
Dependencies
normalityrequiredUsed for data cleaning and standardization before fingerprint generation, ensuring consistency across inputs.
Agent activity
4 hits · last 30 days
node
4
Resources
fingerprints — pip install fingerprints · libregistry