Python SDK for the EuroValidate API — validate EU VAT, IBAN, EORI, and company data
Project description
EuroValidate Python SDK
Official Python SDK for the EuroValidate API -- validate EU VAT numbers, IBANs, EORI numbers, and look up company data in one unified API.
Installation
pip install eurovalidate
Requires Python 3.9+.
Quick start
from eurovalidate import EuroValidate
client = EuroValidate("ev_live_your_key_here")
# Validate a VAT number
result = client.validate_vat("NL820646660B01")
print(result.valid) # True
print(result.company_name) # "COOLBLUE B.V."
print(result.company_address)
print(result.meta.confidence) # "HIGH"
Get your free API key at eurovalidate.com.
Usage
VAT validation
result = client.validate_vat("DE123456789")
print(result.valid, result.company_name, result.country_code)
IBAN validation
result = client.validate_iban("DE89370400440532013000")
print(result.valid, result.bank_name, result.bic)
EORI validation
result = client.validate_eori("DE328169180000040")
print(result.valid, result.company_name)
Company lookup (by LEI)
result = client.lookup_company_by_lei("724500Y6DUVHQD6OXN27")
print(result.company_name, result.registered_address)
VAT rates
rates = client.get_vat_rates("DE")
print(rates.standard_rate) # 19.0
for rate in rates.rates:
print(f"{rate.type}: {rate.rate}%")
# All EU countries
all_rates = client.get_all_vat_rates()
Unified validation (multiple checks, one call)
result = client.validate(
vat="NL820646660B01",
iban="DE89370400440532013000",
eori="DE328169180000040",
)
print(result.vat.valid, result.iban.valid, result.eori.valid)
Account info
account = client.get_account()
print(f"Plan: {account.plan}, Used: {account.calls_used}/{account.calls_limit}")
Async client
Every method is also available as an async version:
from eurovalidate import AsyncEuroValidate
async with AsyncEuroValidate("ev_live_your_key_here") as client:
result = await client.validate_vat("NL820646660B01")
print(result.valid, result.company_name)
Error handling
The SDK raises typed exceptions for API errors:
from eurovalidate import EuroValidate, AuthError, RateLimitError, ValidationError
client = EuroValidate("ev_live_your_key_here")
try:
result = client.validate_vat("INVALID")
except AuthError:
print("Invalid API key")
except RateLimitError as e:
print(f"Rate limited. Retry after {e.retry_after}s")
print(f"Limit: {e.rate_limit.limit}, Remaining: {e.rate_limit.remaining}")
except ValidationError as e:
print(f"Bad input: {e.detail}")
Rate-limited requests (HTTP 429) are automatically retried up to 3 times using the Retry-After header.
Exception hierarchy
EuroValidateError-- base class for all API errorsAuthError-- 401 UnauthorizedRateLimitError-- 429 Too Many RequestsValidationError-- 400 / 422 invalid inputNotFoundError-- 404 Not FoundServerError-- 5xx server errors
All exceptions include status_code, detail, request_id, and rate_limit attributes.
Response metadata
Every result includes a meta field with data freshness information:
result = client.validate_vat("NL820646660B01")
print(result.meta.confidence) # "HIGH", "MEDIUM", "LOW", or "UNKNOWN"
print(result.meta.source) # "vies_live", "cache", etc.
print(result.meta.cached) # True/False
print(result.meta.response_time_ms)
print(result.meta.last_verified) # ISO 8601 timestamp
Configuration
client = EuroValidate(
"ev_live_your_key_here",
base_url="https://api.eurovalidate.com", # default
timeout=30.0, # seconds, default
)
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file eurovalidate-0.1.0.tar.gz.
File metadata
- Download URL: eurovalidate-0.1.0.tar.gz
- Upload date:
- Size: 10.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
793943b937a9c005f54b29143026ae9836aecff09dcfcae0101a0f5b4cd0bd6f
|
|
| MD5 |
c07529a9c9bb36bc45e1a4630be7ea03
|
|
| BLAKE2b-256 |
d72b3a1b672b103ff15fc980a28143dd394982bab5c8624cc06a2703cb873ea4
|
Provenance
The following attestation bundles were made for eurovalidate-0.1.0.tar.gz:
Publisher:
publish-sdk.yml on Nitrych/eurovalidate
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
eurovalidate-0.1.0.tar.gz -
Subject digest:
793943b937a9c005f54b29143026ae9836aecff09dcfcae0101a0f5b4cd0bd6f - Sigstore transparency entry: 1198263132
- Sigstore integration time:
-
Permalink:
Nitrych/eurovalidate@48e861c6cfa50f19b655cd141436a4992fe80000 -
Branch / Tag:
refs/tags/sdk-python-v0.1.0 - Owner: https://github.com/Nitrych
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-sdk.yml@48e861c6cfa50f19b655cd141436a4992fe80000 -
Trigger Event:
push
-
Statement type:
File details
Details for the file eurovalidate-0.1.0-py3-none-any.whl.
File metadata
- Download URL: eurovalidate-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2987c54c6624987e050ddeb893515bd1a0a43726010ca98decfe7eb0b3dc1ed5
|
|
| MD5 |
4003742f3e5fdff50d4c42e64ba557e4
|
|
| BLAKE2b-256 |
2542ff5b5e12f2ff3a391b93a938564d3cd673130966bff64d0e00305a5e52d7
|
Provenance
The following attestation bundles were made for eurovalidate-0.1.0-py3-none-any.whl:
Publisher:
publish-sdk.yml on Nitrych/eurovalidate
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
eurovalidate-0.1.0-py3-none-any.whl -
Subject digest:
2987c54c6624987e050ddeb893515bd1a0a43726010ca98decfe7eb0b3dc1ed5 - Sigstore transparency entry: 1198263382
- Sigstore integration time:
-
Permalink:
Nitrych/eurovalidate@48e861c6cfa50f19b655cd141436a4992fe80000 -
Branch / Tag:
refs/tags/sdk-python-v0.1.0 - Owner: https://github.com/Nitrych
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-sdk.yml@48e861c6cfa50f19b655cd141436a4992fe80000 -
Trigger Event:
push
-
Statement type: