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.3.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vatvalidate-0.0.3-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: vatvalidate-0.0.3.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.8

File hashes

Hashes for vatvalidate-0.0.3.tar.gz
Algorithm Hash digest
SHA256 b1988963beef1b37e4b03295beb6ee3c2de5846b86e45429c0ebdf4c466f3ec0
MD5 635ac587410d1adc6007f968ba3652ef
BLAKE2b-256 db545cb391d4633260ff9341c15815579c98288aeea13f49be998e35c81f4086

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vatvalidate-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ea0902968997c8f44ea4a2ad497f52db9da69332a64588d5ea807cc40d6cc45d
MD5 05b226a99d23da20768e80fb38fe2e95
BLAKE2b-256 e3f9938bf106b1f9ca540683a82183001b3b9dbf9f3b4511d5e7529eab36d557

See more details on using hashes here.

Supported by

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