A small Python package to validate Portuguese taxpayer numbers (NIFs)
Project description
NIF-validator
A small Python package to validate Portuguese taxpayer numbers (NIFs). It checks if NIFs are in a correct format and if they do in fact exist.
Installation :package:
From PyPi repository:
pip install NIF-validator
From source code:
git clone https://github.com/spamz23/NIF-validator.git
virtualenv venv
pip install -r requirements.txt
How to use it?
It's very simple! :fire:
import NIF_validator
# Let's try validating "123456789"
NIF_validator.validate("123456789") # Returns True
# Let's try validating "123x56789" (notice the typo 'x')
NIF_validator.validate("123x56789") # Returns False
# Let's try validating "123" (too small, must be 9 digits)
NIF_validator.validate("123") # Returns False
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
NIF-validator-0.0.6.tar.gz
(3.1 kB
view hashes)
Built Distribution
Close
Hashes for NIF_validator-0.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 770469aeedf946f0c238e4302a72d847885b1fb5366b3be9e196f8f8823e22e4 |
|
MD5 | 5bb4895fc5d59c33eb68ab5d7d636ff5 |
|
BLAKE2b-256 | e17e3007a6790f26674b53073aed23eb2d315dcb2ed996a919192808e60bb744 |