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.2.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.2-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for vatvalidate-0.0.2.tar.gz
Algorithm Hash digest
SHA256 3d69e73b919eabae293f514a957d6e264ddcbdabe3ae401f14497bf59e8f330b
MD5 57e364b7471df2979e68521cd16270da
BLAKE2b-256 95de520d1a89b516f4f92c7456205a1daede3ee8c4ec9c11c12887fd350154b6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vatvalidate-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b75678eccb32cd235900d9725851a761f82647a89f6d82013a55a102f5c475c8
MD5 b3cea86fc0be9d75bc4c23d2373748eb
BLAKE2b-256 249680877df95e026fd4bdeeebda9523c22164feddb2778656c5f6b8eb161c09

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