arthurdejong / python-stdnum

A Python library to provide functions to handle, parse and validate standard numbers.
https://arthurdejong.org/python-stdnum/
GNU Lesser General Public License v2.1
498 stars 206 forks source link

List of EU member states #238

Closed kvdb closed 3 years ago

kvdb commented 3 years ago

I'm looking to replace the no longer maintained package https://github.com/al45tair/vat with python-stdnum. I've been using vat.member_states in the past to obtain a list of EU member states. This is also available in stdnum through: stdnum.eu.vat._country_codes. However, that data isn't meant to be used this way, given the marked private variable. It'd nice if the list of EU member states was available as a public property.

arthurdejong commented 3 years ago

HI @kvdb,

I've added stdnum.eu.vat.MEMBER_STATES to the API in 19d3f70 which should go in the next release. Note that Greece is listed as "gr" and not "el" which is the prefix used in the VAT number.

kvdb commented 3 years ago

Thanks!