Rigour

raw JSON →
2.0.3 verified Fri May 01 auth: no python

Financial crime domain data validation and normalization library. Current version 2.0.3, release cadence irregular.

pip install rigour
error ModuleNotFoundError: No module named 'rigour.validate'
cause Imports from rigour.validate are part of 1.x API; in 2.x the module was removed.
fix
Use from rigour.email import validate_email and from rigour.names import normalise_company_name instead.
error AttributeError: module 'rigour' has no attribute 'validate_email'
cause Attempting to use rigour.validate_email() directly instead of importing the submodule.
fix
Use: from rigour.email import validate_email; validate_email('test@example.com')
error ValueError: Invalid date format: '31/01/202, expected format: YYYY-MM-DD
cause date normalisation expects ISO 8601 format by default.
fix
Use normalise_date('2023-01-31') or normalise_date('31/01/2023', strict=False)
error TypeError: clean_phone() got an unexpected keyword argument 'country'
cause The country parameter was removed in 2.0; phone numbers must include country code.
fix
Remove country parameter and ensure phone starts with '+' and country code.
breaking Version 2.0 rewrote the entire API with new module names (e.g., rigour.email, rigour.names) and changed function signatures. All code written for 1.x will break.
fix Use new imports: from rigour.email import validate_email, from rigour.names import normalise_company_name, etc. Check migration guide.
deprecated Function validate_tax_number now returns a ValidationResult object instead of a boolean. Access .is_valid attribute.
fix result = validate_tax_number('DE123456789'); valid = result.is_valid
gotcha Date normalisation expects ISO 8601 strings or specific formats; passing arbitrary strings may raise ValueError or return None.
fix Always pass dates as YYYY-MM-DD or use normalise_date with strict=False for lenient parsing.
gotcha Phone cleaning requires plus-prefixed numbers (E.164). National numbers without country code will be discarded or raise error.
fix Always include country code (e.g., '+49 30 123456') before calling clean_phone.

Basic usage of email validation and name normalisation.

from rigour.email import validate_email
from rigour.names import normalise_company_name

result = validate_email('test@example.com')
print(result)  # True

name = normalise_company_name('OpenSanctions GmbH')
print(name)  # opensanctions gmbh