{"id":27348,"library":"rigour","title":"Rigour","description":"Financial crime domain data validation and normalization library. Current version 2.0.3, release cadence irregular.","status":"active","version":"2.0.3","language":"python","source_language":"en","source_url":"https://github.com/opensanctions/rigour","tags":["validation","normalization","financial-crime","sanctions","data-quality"],"install":[{"cmd":"pip install rigour","lang":"bash","label":"PyPI"}],"dependencies":[],"imports":[{"note":"validate_email moved to rigour.email in 2.0","wrong":"from rigour.validate import validate_email","symbol":"validate_email","correct":"from rigour.email import validate_email"},{"note":"renamed module in 2.0","wrong":"from rigour.name_utils import normalise_company_name","symbol":"normalise_company_name","correct":"from rigour.names import normalise_company_name"},{"note":"function renamed in 2.0","wrong":"from rigour.tax import validate_tax_id","symbol":"validate_tax_number","correct":"from rigour.tax import validate_tax_number"},{"note":"module renamed in 2.0","wrong":"from rigour.phones import clean_phone","symbol":"clean_phone","correct":"from rigour.phone import clean_phone"},{"note":"American spelling not used; use British 'normalise'","wrong":"from rigour.dates import normalize_date","symbol":"normalise_date","correct":"from rigour.dates import normalise_date"},{"note":"module renamed in 2.0","wrong":"from rigour.ip import validate_ip","symbol":"validate_ip","correct":"from rigour.net import validate_ip"}],"quickstart":{"code":"from rigour.email import validate_email\nfrom rigour.names import normalise_company_name\n\nresult = validate_email('test@example.com')\nprint(result)  # True\n\nname = normalise_company_name('OpenSanctions GmbH')\nprint(name)  # opensanctions gmbh","lang":"python","description":"Basic usage of email validation and name normalisation."},"warnings":[{"fix":"Use new imports: from rigour.email import validate_email, from rigour.names import normalise_company_name, etc. Check migration guide.","message":"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.","severity":"breaking","affected_versions":"1.x"},{"fix":"result = validate_tax_number('DE123456789'); valid = result.is_valid","message":"Function validate_tax_number now returns a ValidationResult object instead of a boolean. Access .is_valid attribute.","severity":"deprecated","affected_versions":">=2.0"},{"fix":"Always pass dates as YYYY-MM-DD or use normalise_date with strict=False for lenient parsing.","message":"Date normalisation expects ISO 8601 strings or specific formats; passing arbitrary strings may raise ValueError or return None.","severity":"gotcha","affected_versions":">=2.0"},{"fix":"Always include country code (e.g., '+49 30 123456') before calling clean_phone.","message":"Phone cleaning requires plus-prefixed numbers (E.164). National numbers without country code will be discarded or raise error.","severity":"gotcha","affected_versions":">=2.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use from rigour.email import validate_email and from rigour.names import normalise_company_name instead.","cause":"Imports from rigour.validate are part of 1.x API; in 2.x the module was removed.","error":"ModuleNotFoundError: No module named 'rigour.validate'"},{"fix":"Use: from rigour.email import validate_email; validate_email('test@example.com')","cause":"Attempting to use rigour.validate_email() directly instead of importing the submodule.","error":"AttributeError: module 'rigour' has no attribute 'validate_email'"},{"fix":"Use normalise_date('2023-01-31') or normalise_date('31/01/2023', strict=False)","cause":"date normalisation expects ISO 8601 format by default.","error":"ValueError: Invalid date format: '31/01/202, expected format: YYYY-MM-DD"},{"fix":"Remove country parameter and ensure phone starts with '+' and country code.","cause":"The country parameter was removed in 2.0; phone numbers must include country code.","error":"TypeError: clean_phone() got an unexpected keyword argument 'country'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}