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

Uploaded Python 3

File details

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

File metadata

  • Download URL: vatvalidate-0.1.1.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for vatvalidate-0.1.1.tar.gz
Algorithm Hash digest
SHA256 1371ae66eb68603333acd58c88e265cff1662db0f0d05f90eba93a12d1d41613
MD5 51771fc998b1ab0b8ececb8f8e96f4b1
BLAKE2b-256 95eaba66c9c68db8d840802aa0edb2a3a477e6c3ee479866a90f434e07914570

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vatvalidate-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for vatvalidate-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c3e6c0db7fe104535aa4d2e2f387a6215a116eea6218d5838b95007ab080bedb
MD5 056ab3a128a632c7a98b8218eb2fe2c8
BLAKE2b-256 7a274d8b1e9123b122d4efd96d926ecb5fea322720b7499a99a529ede542afb7

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