NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #1740 most downloaded on PyPI
Python module to handle standardized numbers and codes
Last release 9 months ago
04 Jan 2026
Ships fairly regularly
a new release about every 7 months
Nearly every release is documented
notes for 34 of 34 stable releases
1 version withdrawn
withdrawn after publishing
16 years old
35 releases · first in 2010
Add modules for the following number formats:
Add modules for the following number formats:
Fix handling of decimals in Application Identifiers (thanks zipus)
Update list of valid Chinese counties (thanks 电子旅人 and Luca)
Mark more Romanian CNP county codes as valid (thanks luella-s)
Support Latvian personal codes issued after 2017 (thanks José Luis López Pino)
Provide aliases for Estonian numbers (thanks Joni Saarinen)
Add validation of country code in BIC (thanks Luuk Gubbels)
Add function to convert a French VAT number into a SIREN (thanks Fabien MICHEL)
Add a function to format a French SIREN (thanks Fabien MICHEL)
Add extra validation of Belgian VAT numbers (thanks Antonio Ginestar)
Add support for nace revision 2.1 (thanks KathrinM)
Support the new Romanian ONRC format (thanks dotbit1)
Support new format for Brazilian CNPJ (thanks Cloves Oliveira)
One column per quarter.
Add python_requires to setup.py to avoid installation with older Python versions (thanks Cédric Krier)
Add modules for the following number formats:
Fix handling of decimals in Application Identifiers (thanks zipus)
Update list of valid Chinese counties (thanks 电子旅人 and Luca)
Mark more Romanian CNP county codes as valid (thanks luella-s)
Support Latvian personal codes issued after 2017 (thanks José Luis López Pino)
Provide aliases for Estonian numbers (thanks Joni Saarinen)
Add validation of country code in BIC (thanks Luuk Gubbels)
Add function to convert a French VAT number into a SIREN (thanks Fabien MICHEL)
Add a function to format a French SIREN (thanks Fabien MICHEL)
Add extra validation of Belgian VAT numbers (thanks Antonio Ginestar)
Add support for nace revision 2.1 (thanks KathrinM)
Support the new Romanian ONRC format (thanks dotbit1)
Support new format for Brazilian CNPJ (thanks Cloves Oliveira)
The stdnum.util.to_unicode() function is now deprecated and will be removed in an upcoming release
Only support Python 3.8 and newer (drop Python 2 support so major version bump)
Include type hints for mypy (thanks David Salvisberg)
Add modules for the following number formats:
Fix Czech RČ check digit validation (thanks Jan Chaloupecky)
Support Ecuador public RUC with juridical format (thanks Leandro)
Allow Uruguay RUT numbers starting with 22
Add missing music industry ISRC country codes (thanks Victor Sordoillet)
Support 16 digit Indonesian NPWP numbers (thanks Chris Smola)
Adjust Swiss uid module to accept numbers without CHE prefix (thanks Jeff Horemans)
Update Irish PPS validator to support new numbers (thanks Olly Middleton)
Add missing vat alias for Thailand VAT number (thanks Leandro Regueiro)
Add more tests for the Verhoeff implementation
Ensure that certificate verification can be configured using the verify
argument when using web services
The check_dgii() and search_dgii() functions from the Dominican Republic Cedula
and RNC modules no longer work due to a change in the DGII online web service
Various small code cleanups (thanks David Salvisberg)
Various small fixes to update scripts
The stdnum.util.to_unicode() function is now deprecated and will be removed
in an upcoming release
Add modules for the following number formats:
Add modules for the following number formats:
Fix typo in German Umsatzsteur Identifikationnummer (thanks Александр Кизеев)
Ensure EU VAT numbers don't accept duplicate country codes
Fix vatin number compacting for "EU" VAT numbers (thanks Davide Walder)
Add check digit validation to French NIF (thanks Kevin Dagostino)
Fix Ukrainian EDRPOU check digit calculation (thanks sector119)
Only support Python 3.8 and newer (drop Python 2 support so major version bump)
Include type hints for mypy (thanks David Salvisberg)
Add modules for the following number formats:
Fix Czech RČ check digit validation (thanks Jan Chaloupecky)
Support Ecuador public RUC with juridical format (thanks Leandro)
Allow Uruguay RUT numbers starting with 22
Add missing music industry ISRC country codes (thanks Victor Sordoillet)
Support 16 digit Indonesian NPWP numbers (thanks Chris Smola)
Adjust Swiss uid module to accept numbers without CHE prefix (thanks Jeff Horemans)
Update Irish PPS validator to support new numbers (thanks Olly Middleton)
Add missing vat alias for Thailand VAT number (thanks Leandro Regueiro)
Add more tests for the Verhoeff implementation
Ensure that certificate verification can be configured using the verify argument when using web services
The check_dgii() and search_dgii() functions from the Dominican Republic Cedula and RNC modules no longer work due to a change in the DGII online web service
Various small code cleanups (thanks David Salvisberg)
Various small fixes to update scripts
The stdnum.util.to_unicode() function is now deprecated and will be removed in an upcoming release
Add modules for the following number formats:
Add modules for the following number formats:
Extend the validation of the Albanian NIPT (NUIS) number (thanks Julien Launois)
Support different date formats in parsing GS1-128 application identifiers
Add get_county() function to Romanian CNP (thanks RaduBorzea)
Add functionality to get gender from Belgian National Number (thanks Jeff Horemans)
Add support for Finland HETU new century indicating signs (thanks Maks Turtiainen)
Add functionality to get (partial) birth date from Belgian National Number
(thanks Jeff Horemans)
Extend validation of Canadian SIN (thanks Marcel Lecker)
Fix Belarusian UNP online validation
Various typo and documentation fixes (thanks valeriko, Dimitri Papadopoulos,
Ali-Akber Saifee and Chales Horn)
Add contribution information to documentation
Test suite improvements (including checking file headers)
Add modules for the following number formats:
Fix typo in German Umsatzsteur Identifikationnummer (thanks Александр Кизеев)
Ensure EU VAT numbers don't accept duplicate country codes
Fix vatin number compacting for "EU" VAT numbers (thanks Davide Walder)
Add check digit validation to French NIF (thanks Kevin Dagostino)
Fix Ukrainian EDRPOU check digit calculation (thanks sector119)
Add modules for the following number formats:
Add modules for the following number formats:
Fix disabling check digit validation of Mexican CURP (thanks guyskk)
Support special validation of La Post SIRET (thanks BIGBen99 and Cédric Krier)
Fix support for "I" and "O" in CUSIP number (thanks Thomas Kavanagh)
Calculate ISO 7064 Mod 97, 10 check digits in the range 02-98 for IBAN
(thanks David Svenson)
Fix German OffeneRegister lookups (change of URL and of data structure)
Add extra court alias for Berlin in German Handelsregisternummer (thanks Romuald R)
Ensure certificate for the Belarus VAT number check_nalog() lookup is included
Support parsing incomplete dates in GS1-128 (thanks Alexis de Lattre)
Improve validation of CAS Registry Number
Typo fixes (thanks Vladimir and Dimitri Papadopoulos)
Add a check_uid() function to the stdnum.ch.uid module
All validation exceptions should now inherit from ValueError
Switch from nose to pytest as test runner
Add modules for the following number formats:
Extend the validation of the Albanian NIPT (NUIS) number (thanks Julien Launois)
Support different date formats in parsing GS1-128 application identifiers
Add get_county() function to Romanian CNP (thanks RaduBorzea)
Add functionality to get gender from Belgian National Number (thanks Jeff Horemans)
Add support for Finland HETU new century indicating signs (thanks Maks Turtiainen)
Add functionality to get (partial) birth date from Belgian National Number (thanks Jeff Horemans)
Extend validation of Canadian SIN (thanks Marcel Lecker)
Fix Belarusian UNP online validation
Various typo and documentation fixes (thanks valeriko, Dimitri Papadopoulos, Ali-Akber Saifee and Chales Horn)
Add contribution information to documentation
Test suite improvements (including checking file headers)
Add modules for the following number formats:
Add modules for the following number formats:
Add ENCF validation support for Dominican Republic NCF (thanks Cristopher Ortega)
Add new e-CF types to Dominican Republic NCF (thanks Frank Roberto Chavez Sosa)
Improve French NIF validation (thanks Dimitri Papadopoulos)
Drop support for Python 2.6 and 3.4
Fix parsing of empty fields in Dominican Republic DGII checking (thanks Andres Rodriguez)
Fix handling of empty worksheet in Belgian bank download (thanks Dimitri Papadopoulos)
Fix detection of natural RUC values (thanks Victor Rodriguez)
Fix Belarus VAT number online lookup again
Fixes for problems with loading IMSI data from Wikipedia and dealing with inconsistencies
Remove South Korean BRN Fair Trade Commission website check due to CAPTCHA
Various code and documentation improvements (thanks Dimitri Papadopoulos and Gaurav Chauhan)
Add modules for the following number formats:
Fix disabling check digit validation of Mexican CURP (thanks guyskk)
Support special validation of La Post SIRET (thanks BIGBen99 and Cédric Krier)
Fix support for "I" and "O" in CUSIP number (thanks Thomas Kavanagh)
Calculate ISO 7064 Mod 97, 10 check digits in the range 02-98 for IBAN (thanks David Svenson)
Fix German OffeneRegister lookups (change of URL and of data structure)
Add extra court alias for Berlin in German Handelsregisternummer (thanks Romuald R)
Ensure certificate for the Belarus VAT number check_nalog() lookup is included
Support parsing incomplete dates in GS1-128 (thanks Alexis de Lattre)
Improve validation of CAS Registry Number
Typo fixes (thanks Vladimir and Dimitri Papadopoulos)
Add a check_uid() function to the stdnum.ch.uid module
All validation exceptions should now inherit from ValueError
Switch from nose to pytest as test runner
Support XI country code for Northern Ireland VAT numbers (thanks Alexis de Lattre)
Add modules for the following number formats:
Add ENCF validation support for Dominican Republic NCF (thanks Cristopher Ortega)
Add new e-CF types to Dominican Republic NCF (thanks Frank Roberto Chavez Sosa)
Improve French NIF validation (thanks Dimitri Papadopoulos)
Drop support for Python 2.6 and 3.4
Fix parsing of empty fields in Dominican Republic DGII checking (thanks Andres Rodriguez)
Fix handling of empty worksheet in Belgian bank download (thanks Dimitri Papadopoulos)
Fix detection of natural RUC values (thanks Victor Rodriguez)
Fix Belarus VAT number online lookup again
Fixes for problems with loading IMSI data from Wikipedia and dealing with inconsistencies
Remove South Korean BRN Fair Trade Commission website check due to CAPTCHA
Various code and documentation improvements (thanks Dimitri Papadopoulos and Gaurav Chauhan)
Add modules for the following number formats:
Add modules for the following number formats:
Make list of EU member states part of public API
Retain RO prefix in Romanian VAT numbers
Support international VAT numbers that are only valid with country prefix
Expanded validation for Belgian VAT numbers
Use ABN as Australian VAT number
Remove GB from EU member states
Add modules for the following number formats:
Add modules for the following number formats:
Fix missing Dominican Republic NCF document types (thanks Gustavo Valverde)
Fix issue with extra plus or minus in Swedish Personnummer (thanks balderman)
Update Dominican Republic DGII endpoint (thanks Gustavo Valverde)
Support validating temporary Finnish personal identity codes (thanks Aleksi Hoffman)
Fix misleading docstring in se.personnummer.get_birth_date() (thanks Leon Sandøy)
Improve birth date validation in Danish CPR (thanks Leon Sandøy)
Add birth date validating in Norwegian Fødselsnummer (thanks Leon Sandøy)
Add missing vat aliases for a number of countries (thanks Leandro Regueiro)
Use HTTPS instead of HTTP fox VIES lookups (thanks grzekru)
Switch to HTTPS URLs where possible
Support 6 as third digit in Ecuadorian CI (thanks Christopher Ormaza)
Add an online check for South Korean BRN
Fix unescaping in Dominican Republic RNC online check (thanks evaldez89)
Support foreign residents for Romanian CNP (thanks dotbit1)
Add modules for the following number formats:
Make list of EU member states part of public API
Retain RO prefix in Romanian VAT numbers
Support international VAT numbers that are only valid with country prefix
Expanded validation for Belgian VAT numbers
Use ABN as Australian VAT number
Remove GB from EU member states
Add modules for the following number formats:
Add modules for the following number formats:
Fix missing Dominican Republic NCF document types (thanks Gustavo Valverde)
Fix issue with extra plus or minus in Swedish Personnummer (thanks balderman)
Update Dominican Republic DGII endpoint (thanks Gustavo Valverde)
Support validating temporary Finnish personal identity codes (thanks Aleksi Hoffman)
Fix misleading docstring in se.personnummer.get_birth_date() (thanks Leon Sandøy)
Improve birth date validation in Danish CPR (thanks Leon Sandøy)
Add birth date validating in Norwegian Fødselsnummer (thanks Leon Sandøy)
Add missing vat aliases for a number of countries (thanks Leandro Regueiro)
Use HTTPS instead of HTTP fox VIES lookups (thanks grzekru)
Switch to HTTPS URLs where possible
Support 6 as third digit in Ecuadorian CI (thanks Christopher Ormaza)
Add an online check for South Korean BRN
Fix unescaping in Dominican Republic RNC online check (thanks evaldez89)
Support foreign residents for Romanian CNP (thanks dotbit1)
Add modules for the following number formats:
Add modules for the following number formats:
Add format function for ISO 11649 numbers (thanks Kurt Keller)
Add support for Python 3.8 (thanks Sergi Almacellas Abellana)
Clarify that the Italian Codice Fiscale can also be the IVA for companies (thanks Nicholas Fiorentini)
Support the new Dutch btw-identificatienummer (thanks Cas Vissers, Jeroen van Heiningen, Jerome Hanke, Nicolas Martinelli, Ronald Portier and Tim Muller)
Extend test for Argentinian CUIT to check first two digits
Add more country codes to ISIN (thanks nocluebutalotofit, Anwar Baroudi and alexbond73)
Add modules for the following number formats:
Add modules for the following number formats:
Support GTIN (EAN-14) validation as part of EAN (thanks Sergi Almacellas Abellana)
Support Dominican Republic e-CF within NCF (thanks Jeffry Jesus De La Rosa)
Fix Dominican Republic DGII lookups of NCF (thanks Jeffry Jesus De La Rosa)
Fix German Handelsregisternummer to not confuse Hamburg with Homburg and to accept shorter numbers (thanks Kevin Kaiser)
Support lookups of German Handelsregisternummer in OffeneRegister.de web service
Handle - and + sign correctly in Swedish Personnummer (thanks Amin Solhizadeh)
Provide various personalid and vat aliases for existing numbers (thanks Andreas Häber)
Improve descriptions of Spanish codes (thanks Gerard Dalmau)
Fix handling and normalisation of various Unicode digit representations (thanks Helge Munk Jacobsen)
Add modules for the following number formats:
Add modules for the following number formats:
Code style improvements
Change Dominican Republic DGII check URL to HTTPS (thanks Gustavo Valverde)
Support Ecuadorian Cedula and RUC of foreigners (thanks Christopher Ormaza)
Add format() function for Argentinian CUIT number (thanks Mario Puntin)
Support passing formatted numbers to all get_birth_date() and similar functions
Handle Dominican Republic DGII lookup returning multiple entities (thanks Andrés R)
Add modules for the following number formats:
Add modules for the following number formats:
Fix a bug in handling of Mexican tax numbers
Improve Spanish CIF and NIF validation
Update Dominican Republic NCF numbers online check
Improve Unicode conversion for bytestrings
Improvements to some corner cases in IBAN validation
Documentation improvements
Add stdnum.ru.vat as an alias for stdnum.ru.inn
Add modules for the following number formats:
Add modules for the following number formats:
Have documentation rebuilt reproducibly (thanks Chris Lamb)
Allow configuring the SOAP request timeout
Support spaces in ISO 9362 (SWIFT) BIC codes
Add check_dgii() to stdnum.do.cedula module
Add validation for "individual" part of hetu (thanks Esa Halsti)
Support new style of Dominican Republic NCF numbers
Fix issue when using PySimpleSOAP for DGII lookups
Fix an issue in splitting certain IMSI values
Support building a universal wheel
Documentation and code style improvements
Fix a packaging issue in the long description
Rename stdnum.iso9362 to stdnum.bic (iso9362 is deprecated but still available for compatibility)
Add modules for the following number formats:
Add functions for using the Dominican Republic DGII web service to validate and search for RNC and NCF numbers
Add/update whitelists for Dominican Republic RNC and Cedula
Support zeep as preferred SOAP library (suds and pysimplesoap are tried as fallback)
Rename stdnum.iso9362 to stdnum.bic (iso9362 is deprecated but still available for compatibility)
Add tests for web services (not normally run to avoid unnecessary load)
Fixes and improvement to the sample online validation service
Development of the NCF format validation and DGII web service validation was funded by iterativo | http://iterativo.do
Add modules for the following number formats:
Add modules for the following number formats:
Fix a bug in the Czech DIČ check digit calculation
Fix conversion of 9 digit ISBN to ISBN13
Fix a bug in the Damm is_valid() function
More validation of 13-digit ISBN values
More validation of ISMN values
Various code and test improvements (100% branch coverage now)
Documentation improvements
Add modules for the following number formats:
Add modules for the following number formats:
Add online check example that finds valid formats for a given number
Fix support for Ñ in Spanish Referencia Catastral
Updates to U.S. Employer Identification Number (thanks Greg Kuwaye)
Various minor improvements
Add modules for the following number formats:
Add modules for the following number formats:
Fix missing Dominican Republic NCF document types (thanks Gustavo Valverde)
Fix issue with extra plus or minus in Swedish Personnummer
(thanks balderman)
Update Dominican Republic DGII endpoint (thanks Gustavo Valverde)
Support validating temporary Finnish personal identity codes
(thanks Aleksi Hoffman)
Fix misleading docstring in se.personnummer.get_birth_date()
(thanks Leon Sandøy)
Improve birth date validation in Danish CPR (thanks Leon Sandøy)
Add birth date validating in Norwegian Fødselsnummer (thanks Leon Sandøy)
Add missing vat aliases for a number of countries (thanks Leandro Regueiro)
Use HTTPS instead of HTTP fox VIES lookups (thanks grzekru)
Switch to HTTPS URLs where possible
Support 6 as third digit in Ecuadorian CI (thanks Christopher Ormaza)
Add an online check for South Korean BRN
Fix unescaping in Dominican Republic RNC online check (thanks evaldez89)
Support foreign residents for Romanian CNP (thanks dotbit1)
Add modules for the following number formats:
The IBAN module now support validating the country-specific part
The Belgian VAT number is now also referenced as businessid
Add a Tox configuration file
Add modules for the following number formats:
Add modules for the following number formats:
Add an implementation of the Damm algorithm
Ensure data files are properly closed
Documentation improvements
Extend test suite
A number of minor bug fixes and improvements
Fix ISO 6346 check digit calculation (thanks Ronald Paloschi)
Add modules for the following number formats:
Add modules for the following number formats:
Add an alternate VIES check (check_vies_approx()) that includes a proof (certificate) that the check was performed
Fall back to pysimplesoap if suds is unavailable
Test and code quality improvements
Add number formats based on the implementation in the vatnumber module:
Add number formats based on the implementation in the vatnumber module:
Add modules for the following number formats:
Add Croatia to list of EU VAT numbers
Update getcnloc script
Various small fixes and additional tests for existing modules
Add modules for the following number formats:
Add modules for the following number formats:
Add support for 2013 extension of Irish PPS Numbers
Update getisbn script
Update getmybp URLs for Malaysian code lists
Various other minor improvements
Add modules for the following number formats:
Add modules for the following number formats:
Try to replace Unicode characters with similar-looking ASCII characters
Update getimsi script (thanks eneq123)
Update getiban script
Add proxy support to the stdnum.eu.vat.check_vies() function (thanks Cédric Krier)
Support newer United Kingdom VAT numbers
Include some files that were missing from the source tarball
Add modules for the following number formats:
Add modules for the following number formats:
All modules now provide a validate() function that throws an exception that contains more information on the failure reason
Documentation improvements
Remove add_check_digit parameter from GRid's format() function
Improvements to the tests
Re-add Python3 support (now tested with Python 2.7, 3.2 and 3.3)
Add modules for the following number formats:
Add modules for the following number formats:
Additional tests for robustness and use introspection to test all modules
Some code refactoring with the introduction of an internal utility module
Improvements to the docstring documentation
Generate API documentation using Sphinx
Fix a problem with handling an ISBN13 with a valid check digit but with an unknown bookland prefix
Add modules for the following number formats:
Add modules for the following number formats:
Refactoring to use the EAN check digit code for ISBN and ISMN checks
Implement a conversion function from ISSN to EAN
Support Python3 with the same codebase
Python 2.5 compatibility improvement
Add modules for the following number formats:
Add modules for the following number formats:
Implement an internal module to store and handle hierarchically organised data structures efficiently
Regional-specific numbers are now in ISO 3166 packages (the BSN module is now in stdnum.nl.bsn)
ISBN module functions now have a convert flag to convert to ISBN-13 on the fly
Add modules for the following number formats:
Add modules for the following number formats:
Add modules for handling the following check digit algorithms:
Added more unit tests
Rename validate() function to is_valid() for all modules
Your coding agent can read these notes before it upgrades. Set up the MCP server →