How To Install python3-stdnum on Debian 9

In this tutorial we learn how to install python3-stdnum on Debian 9. python3-stdnum is Python module to handle standardized numbers and codes (Python3 version)

Introduction

In this tutorial we learn how to install python3-stdnum on Debian 9.

What is python3-stdnum

python3-stdnum is:

A Python module to parse, validate and reformat standard numbers and codes in different formats.

Currently this package supports the following formats:

  • NIPT (Numri i Identifikimit p?r Personin e Tatuesh?m, Albanian VAT number)
  • CUIT (C?digo ?nico de Identificaci?n Tributaria, Argentinian tax number)
  • UID (Umsatzsteuer-Identifikationsnummer, Austrian VAT number)
  • BTW, TVA, NWSt (Belgian VAT number)
  • EGN (???, ?????? ?????????? ?????, Bulgarian personal identity codes)
  • PNF (???, ????? ????? ?? ????????, Bulgarian number of a foreigner)
  • VAT (???????????????? ????? ?? ???, Bulgarian VAT number)
  • CPF (Cadastro de Pessoas F?sicas, Brazillian national identifier)
  • Swiss social security number (“Sozialversicherungsnummer”)
  • RUT (Rol ?nico Tributario, Chilean national tax number)
  • RIC No. (Chinese Resident Identity Card Number)
  • NIT (N?mero De Identificaci?n Tributaria, Colombian identity code)
  • ??????? ???????? ?.?.?. (Cypriot VAT number)
  • DI? (Da?ov? identifika?n? ??slo, Czech VAT number)
  • R? (Rodn? ??slo, the Czech birth number)
  • Ust ID Nr. (Umsatzsteur Identifikationnummer, German VAT number)
  • CPR (personnummer, the Danish citizen number)
  • CVR (Momsregistreringsnummer, Danish VAT number)
  • Cedula (Dominican Republic national identification number)
  • RNC (Registro Nacional del Contribuyente, Dominican Republic tax number)
  • EAN (International Article Number)
  • CI (C?dula de identidad, Ecuadorian personal identity code)
  • RUC (Registro ?nico de Contribuyentes, Ecuadorian company tax number)
  • KMKR (K?ibemaksukohuslase, Estonian VAT number)
  • CIF (Certificado de Identificaci?n Fiscal, Spanish company tax number)
  • DNI (Documento nacional de identidad, Spanish personal identity codes)
  • NIE (N?mero de Identificaci?n de Extranjeros, Spanish foreigner number)
  • NIF (N?mero de Identificaci?n Fiscal, Spanish VAT number)
  • SEPA Identifier of the Creditor (AT-02)
  • VAT (European Union VAT number)
  • ALV nro (Arvonlis?veronumero, Finnish VAT number)
  • HETU (Henkil?tunnus, Finnish personal identity code)
  • SIREN (a French company identification number)
  • n? TVA (taxe sur la valeur ajout?e, French VAT number)
  • VAT (United Kingdom (and Isle of Man) VAT registration number)
  • FPA, ???, ??? (??????? ??????????? ???????, the Greek VAT number)
  • GRid (Global Release Identifier)
  • OIB (Osobni identifikacijski broj, Croatian identification number)
  • ANUM (K?z?ss?gi ad?sz?m, Hungarian VAT number)
  • IBAN (International Bank Account Number)
  • PPS No (Personal Public Service Number, Irish personal number)
  • VAT (Irish VAT number)
  • IMEI (International Mobile Equipment Identity)
  • IMSI (International Mobile Subscriber Identity)
  • Kennitala (Icelandic personal and organisation identity code)
  • VSK number (Vir?isaukaskattsn?mer, Icelandic VAT number)
  • ISAN (International Standard Audiovisual Number)
  • ISBN (International Standard Book Number)
  • ISIL (International Standard Identifier for Libraries)
  • ISMN (International Standard Music Number)
  • ISO 6346 (International standard for container identification)
  • ISO 9362 (Business identifier codes)
  • ISSN (International Standard Serial Number)
  • Codice Fiscale (Italian tax code for individuals)
  • Partita IVA (Italian VAT number)
  • PVM (Prid?tin?s vert?s mokestis mok?tojo kodas, Lithuanian VAT number)
  • TVA (taxe sur la valeur ajout?e, Luxembourgian VAT number)
  • PVN (Pievienot?s v?rt?bas nodok?a, Latvian VAT number)
  • MEID (Mobile Equipment Identifier)
  • VAT (Maltese VAT number)
  • NRIC No. (Malaysian National Registration Identity Card Number)
  • Brin number (Dutch number for schools)
  • BSN (Burgerservicenummer, Dutch national identification number)
  • BTW-nummer (Omzetbelastingnummer, the Dutch VAT number)
  • Onderwijsnummer (Dutch student school number)
  • Postcode (Dutch postal code)
  • MVA (Merverdiavgift, Norwegian VAT number)
  • Orgnr (Organisasjonsnummer, Norwegian organisation number)
  • NIP (Numer Identyfikacji Podatkowej, Polish VAT number)
  • NIF (N?mero de identifica??o fiscal, Portuguese VAT number)
  • CF (Cod de ?nregistrare ?n scopuri de TVA, Romanian VAT number)
  • CNP (Cod Numeric Personal, Romanian Numerical Personal Code)
  • Orgnr (Organisationsnummer, Swedish company number)
  • VAT (Moms, Merv?rdesskatt, Swedish VAT number)
  • ID za DDV (Dav?na ?tevilka, Slovenian VAT number)
  • I? DPH (I? pre da? z pridanej hodnoty, Slovak VAT number)
  • R? (Rodn? ??slo, the Slovak birth number)
  • COE (Codice operatore economico, San Marino national tax number)
  • ATIN (U.S. Adoption Taxpayer Identification Number)
  • EIN (U.S. Employer Identification Number)
  • ITIN (U.S. Individual Taxpayer Identification Number)
  • PTIN (U.S. Preparer Tax Identification Number)
  • RTN (Routing transport number)
  • SSN (U.S. Social Security Number)
  • TIN (U.S. Taxpayer Identification Number)

Furthermore a number of generic check digit algorithms are available:

  • the Verhoeff algorithm
  • the Luhn and Luhn mod N algorithms
  • some algorithms described in ISO/IEC 7064: Mod 11, 2, Mod 37, 2, Mod 97, 10, Mod 11, 10 and Mod 37, 36

This package contains the Python 3 version of the library.

There are three methods to install python3-stdnum on Debian 9. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install python3-stdnum Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install python3-stdnum using apt-get by running the following command:

sudo apt-get -y install python3-stdnum

Install python3-stdnum Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install python3-stdnum using apt by running the following command:

sudo apt -y install python3-stdnum

Install python3-stdnum Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Debian. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install python3-stdnum using aptitude by running the following command:

sudo aptitude -y install python3-stdnum

How To Uninstall python3-stdnum on Debian 9

To uninstall only the python3-stdnum package we can use the following command:

sudo apt-get remove python3-stdnum

Uninstall python3-stdnum And Its Dependencies

To uninstall python3-stdnum and its dependencies that are no longer needed by Debian 9, we can use the command below:

sudo apt-get -y autoremove python3-stdnum

Remove python3-stdnum Configurations and Data

To remove python3-stdnum configuration and data from Debian 9 we can use the following command:

sudo apt-get -y purge python3-stdnum

Remove python3-stdnum configuration, data, and all of its dependencies

We can use the following command to remove python3-stdnum configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge python3-stdnum

Dependencies

python3-stdnum have the following dependencies:

References

Summary

In this tutorial we learn how to install python3-stdnum package on Debian 9 using different package management tools: apt, apt-get and aptitude.