vatverify-rates
Offline VAT number validation and VAT rates for 44 countries. Real checksum algorithms (MOD97, MOD11, Luhn, HMRC 97-55), not just regex. Zero runtime dependencies, pure Python, fully type-annotated.
For live validation (VIES / HMRC / CH UID / Brønnøysund), use this package as the format/checksum pre-check in front of the hosted vatverify API.
Install
pip install vatverify-rates
Usage
Look up a rate
from vatverify_rates import get_standard_rate, get_rate
get_standard_rate("DE") # 19.0
get_standard_rate("FR") # 20.0
rate = get_rate("DE")
# Rate(country_code='DE', country='Germany', standard=19.0, reduced=(7.0,), ...)
Validate a VAT number
from vatverify_rates import validate
result = validate("IE6388047V")
if result.valid:
print("valid")
else:
print("invalid:", result.errors)
Country utilities
from vatverify_rates import country_name, is_eu_member, get_flag
country_name("DE") # 'Germany'
is_eu_member("CH") # False
is_eu_member("DE") # True
get_flag("FR") # '🇫🇷'
Types
from vatverify_rates import Rate, ValidateResult, CountryCode
Rate and ValidateResult are @dataclass(frozen=True, slots=True). CountryCode and EUMemberCode are Literal unions of ISO-2 codes.
API
| Function | Returns |
|---|---|
get_rate(code) |
Rate | None |
get_standard_rate(code) |
float | None |
get_all_rates() |
dict[str, Rate] |
country_name(code) |
str | None |
country_name_local(code) |
str | None |
is_eu_member(code) |
bool |
is_known_country(code) |
bool |
get_flag(code) |
str (emoji or "") |
validate_format(vat, country=None) |
bool |
validate_checksum(vat, country=None) |
bool |
validate(vat, country=None) |
ValidateResult |
data_version |
str (ISO date of latest refresh) |
Supported countries
| Group | Codes |
|---|---|
| EU-27 | AT, BE, BG, CY, CZ, DE, DK, EE, EL, ES, FI, FR, HR, HU, IE, IT, LT, LU, LV, MT, NL, PL, PT, RO, SE, SI, SK |
| UK & protocol | GB, XI |
| EFTA | CH, LI, NO, IS |
| Micro-states | AD |
| Candidate / other | AL, BA, ME, MK, RS, TR, MD, UA, XK, GE |
Greece uses EL per VIES convention. XI is Northern Ireland under the Brexit protocol.
Offline vs live
Offline checks (format + checksum) catch typos and fraudulent-looking numbers, but cannot confirm a number is registered with a tax authority. That requires a live registry call. The hosted vatverify API handles VIES, HMRC, BFS, and Brønnøysund, with freshness-aware responses so a registry outage never breaks your checkout.
Other languages
Same data, same functions, idiomatic per language:
- JavaScript / TypeScript:
@vatverify/vat-rates(source: vat-rates-js)
License
MIT. See LICENSE.
Metadata
Release files for vatverify-rates 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| vatverify_rates-0.1.0.tar.gz | 17.3 kB | With provenance | Details for vatverify_rates-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vatverify_rates-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for vatverify_rates-0.1.0-py3-none-any.whl |
Total release size: 47.9 kB
Release files / vatverify_rates-0.1.0.tar.gz
| Download URL | vatverify_rates-0.1.0.tar.gz |
|---|---|
| Size | 17.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c31d5e1d7a2801ff55a5a158b52de8a3f0176ea828691daddda279ea14b1dec8
|
|
BLAKE2b-256 checksum How to use checksums |
75f97fef0687d4a776e06129187beca322e0b541125c6cfbaaee27d9b5a1e60d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 24, 2026.
Transparency logRelease files / vatverify_rates-0.1.0-py3-none-any.whl
| Download URL | vatverify_rates-0.1.0-py3-none-any.whl |
|---|---|
| Size | 30.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
991791ea4d17f65050e5891d0972766cc51c33d8e6652db7c3f2cc3e33e1770c
|
|
BLAKE2b-256 checksum How to use checksums |
dd5f46df03ede94eb424e5f328f0f47637704280d5dba32d97d2a9377188ba7b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 24, 2026.
Transparency logSecurity for vatverify-rates 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for vatverify_rates-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 24, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.