Registry / serialization / vat-utils

vat-utils

JSON →
library0.3.1pypypi✓ verified 81d ago

vat-utils is a Python library for working with VAT (Value Added Tax) numbers, including validation and formatting. Version 0.3.1 requires Python >=3.6,<4.0. Release cadence is irregular.

pip install vat-utils
INSTALL
IMPORT
SIG · VAT-UTILS
V
vat-utils
serializationpythonv0.3.1
Install
4.0s avg
Import
Disk
49MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.3.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 51MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 4.0s · import 0.000s · 51MB
49MB installed
● package 49MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

vat_utils
import vat_utils
import vatutils

Validate a VAT number using VatNumber class.

import vatutils # Validate a VAT number vat = vatutils.VatNumber('GB123456789') print(vat.is_valid())
Debug
Known issues
deprecatedThe function `vatutils.validate_vat` is deprecated and may be removed in future versions. Use `VatNumber.is_valid()` instead.
fix
Replace `vatutils.validate_vat(vat_number)` with `vatutils.VatNumber(vat_number).is_valid()`.
affects: >=0.3.0,<0.4.0
breakingVersion 0.3.0 changed the return type of `VatNumber.is_valid()` from a tuple `(bool, str)` to a boolean. This breaks code expecting a tuple.
fix
Update code to check only the boolean: `if vat.is_valid():` instead of `valid, msg = vat.is_valid()`.
affects: >=0.3.0
gotchaThe library does not perform live checks against official VAT databases (e.g., VIES). It only validates the format. This may be misunderstood.
fix
Use additional services like vies for live validation.
affects: all
Upgrade
Version history
0.3.1latest on PyPI · released Oct 10, 2023
Audit
Dependencies

No dependency data recorded yet.

Agent activity
28 hits · last 30 days
node
24
OpenAI (training)
1
Resources
vat-utils — pip install vat-utils · libregistry