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 📦
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! 🔥
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
Metadata
Release files for NIF-validator 0.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| NIF-validator-0.0.6.tar.gz | 3.1 kB | Without provenance | Details for NIF-validator-0.0.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| NIF_validator-0.0.6-py3-none-any.whl | Python 3 | none | any | Details for NIF_validator-0.0.6-py3-none-any.whl |
Total release size: 6.4 kB
Release files / NIF-validator-0.0.6.tar.gz
| Download URL | NIF-validator-0.0.6.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e549fc4edfd6f7bc10712be0e833123db4fd61efe0e86b154145c22e2f540107
|
|
BLAKE2b-256 checksum How to use checksums |
588d94a0ef9b66797ed00d11acfd7abe06fa5a3bf2235b220273dad8d779d2ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.9.0
|
Release files / NIF_validator-0.0.6-py3-none-any.whl
| Download URL | NIF_validator-0.0.6-py3-none-any.whl |
|---|---|
| Size | 3.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
770469aeedf946f0c238e4302a72d847885b1fb5366b3be9e196f8f8823e22e4
|
|
BLAKE2b-256 checksum How to use checksums |
e17e3007a6790f26674b53073aed23eb2d315dcb2ed996a919192808e60bb744
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.9.0
|
Security for NIF-validator 0.0.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.