Skip to main content

vatvalidate is a Python library for validating UK VAT numbers.

Project description

vatvalidate

Ever wondered if that VAT number is valid? Well, now you can find out thanks to this simple Python library.

vatvalidate implements the modulus 97 and modulus 9755 used to check the validity of VAT numbers in the United Kingdom. For more info on these algorithms, see this link.

Installation

To install vatvalidate, simply:

$ pip install vatvalidate

Usage

Using validate_vat_number, you can simply check the validity of vat number strings.

from vatvalidate.validate import validate_vat_number

# Validate a vat number using validate_vat_number
vat_numbers = [
    "GB424807302",
    "424807302",
    "VAT NUMBER: 424807302",
    "GB279238956",
    "1234",
]

print(
    [validate_vat_number(number) for number in vat_numbers]
)
#> [True, True, True, False, 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

vatvalidate-0.0.1.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

vatvalidate-0.0.1-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file vatvalidate-0.0.1.tar.gz.

File metadata

  • Download URL: vatvalidate-0.0.1.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.8.18 Linux/5.15.0-1041-azure

File hashes

Hashes for vatvalidate-0.0.1.tar.gz
Algorithm Hash digest
SHA256 42736539240b2dd4d1ac76c1edf29ff6b1e8bdfcf9fea16718c5865f19503178
MD5 20a2dc3f7e73f7636a2786415045d485
BLAKE2b-256 745d34c0df56668b439d76a7cec3119c6cb1c08387a47527ef8432b1264c38f8

See more details on using hashes here.

File details

Details for the file vatvalidate-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: vatvalidate-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.8.18 Linux/5.15.0-1041-azure

File hashes

Hashes for vatvalidate-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0ff5c994d12e88e886be4963af9d4dd797aa73c2008777ab5584eaeaee9a8a0c
MD5 8bf5e2a51e0ff5386c21f66cf6024280
BLAKE2b-256 f19194a2117344e98f5ee998ef58d24dd6b7b14ce620c17828b606e595cb5964

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page