r/Python • • 20d ago

Showcase Showcase Thread

Post all of your code/projects/showcases/AI slop here.

Recycles once a month.

29 Upvotes

147 comments sorted by

View all comments

1

u/patryk_builds 3d ago

https://github.com/getpylaunch/vies-check

What My Project Does

vies-check checks EU VAT numbers in VIES, the EU's official register, from async Python. It normalizes and format-checks numbers from every EU country, asks VIES, and returns one of three results: valid, invalid, or unavailable.

The third result is the reason it exists. VIES forwards each request to a national register, and those are often down or throttling. Then it can answer "valid": false together with an error such as MS_UNAVAILABLE, which says nothing about the number. Treating that as invalid tells a real company its VAT number is wrong, so the library reports it as unavailable and you retry later.

pip install vies-check

Python 3.11+, one dependency (httpx), MIT, fully typed.

Target Audience

Anyone billing EU businesses from an async app (FastAPI, Starlette, aiohttp) who has to decide whether reverse charge applies.

Comparison

python-stdnum also talks to VIES and additionally verifies check digits. It is synchronous and uses the SOAP interface. vies-check is async, uses the REST API, and checks format only, no check digits.

I extracted it from a larger FastAPI project of mine and wrote it with heavy use of an AI coding agent. 95 tests, mypy strict. Feedback on the per-country format rules is very welcome, that's where mistakes are most likely.