Official Python SDK for Vatify — EU VAT validation, rates, and calculation.
Project description
Vatify – Official Python SDK
EU VAT validation, rates, and calculation with one API.
- Website: https://vatifytax.app
- Docs: https://vatifytax.app
Install
pip install vatify
Set your API Key
export VATIFY_API_KEY="your_api_key"
Quickstart (sync)
from vatify import Vatify
client = Vatify(api_key="YOUR_API_KEY")
# 1) Validate VAT number
res = client.validate_vat("DE123456789")
print(res.valid, res.country_code, res.name)
# 2) Calculate VAT rate (by country, type, date)
res = client.calculate(amount=100, basis="net", rate_type="reduced", supply_date=str(date.today().isoformat()),
supplier={"country_code": "DE", "vat_number": "DE811907980"},
customer={"country_code": "FR", "vat_number": "FR40303265045"},
supply_type="services", b2x="B2B", category_hint="ACCOMMODATION")
print(res)
# 3) Get rates for a country
rates = client.rates("DE")
print(rates)
client.close()
Quickstart (async)
import asyncio
from vatify import VatifyAsync
async def main():
client = VatifyAsync(api_key="YOUR_API_KEY")
res = await client.validate_vat("DE123456789")
print(res.valid)
await client.aclose()
asyncio.run(main())
Quickstart (cli)
vatify validate DE123456789
vatify rates DE
Error Handling
All API/network issues raise VatifyError with optional status_code and details.
from vatify import Vatify, VatifyError
try:
Vatify(api_key="x").validate_vat("DE123")
except VatifyError as e:
print("Failed:", e, e.status_code)
Contributing
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]" # (optional if you add dev deps)
pytest -q
Build and upload
pipx run build
python -m pip install --upgrade build twine
python -m build
twine upload dist/*
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
vatify-0.1.5.tar.gz
(6.7 kB
view details)
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 vatify-0.1.5.tar.gz.
File metadata
- Download URL: vatify-0.1.5.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9296aca358f2ae4d7736a0cb9a329efa1f93fbd995cf050d2b0055810cbd945
|
|
| MD5 |
116707380d1c648003dd3333f5f1029b
|
|
| BLAKE2b-256 |
880fde04aca93e573ab732fd41dbfc5473fe1797ccde5cee9be2cdc052300daf
|
File details
Details for the file vatify-0.1.5-py3-none-any.whl.
File metadata
- Download URL: vatify-0.1.5-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67174ef415377e5cc316c53f614cf0d1d09a1559b153f5cb95f8c535d40c804c
|
|
| MD5 |
0cba521f7f811de3d3943fae12137d66
|
|
| BLAKE2b-256 |
31fa30da73d709db8d342f55e3e31374bc11d6d5b17e752fb30da0241bd884e6
|