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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for vatvalidate-0.1.0.tar.gz
Algorithm Hash digest
SHA256 13f3107009ac346b8a6dfa42fc6fbfa875646347153ec01486bb9e132ee22172
MD5 b1b8ae5dbe86d22b408308bf816c740c
BLAKE2b-256 9a9802c5b54a4fca579f7184baa7cf850589667a0095553281b2dc9327e48ff8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vatvalidate-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1c9466bbe5757b8b0eb345ebe97bf1edc916f29a1757a2774db848c72c5b4e17
MD5 40f1c32f63ff985a0a8dbaebba5a9cc9
BLAKE2b-256 55382f2a63eb8230624b40a54ee613b3cfcab5b6b5ab97f4823f895a20abacea

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