A list of EU country codes following the ISO 3166-1 / Alpha-2 code.
pip install pyeucountrycodes
>>> from eu_country_codes import COUNTRY_CODES
>>> "FR" in COUNTRY_CODES
True
It is intended to keep this package very simple.
If you need to access the names of the countries, maybe even in different languages, please refer to the excellent pycountry:
https://pypi.org/project/pycountry/
Please note, that although Great Britain left the EU, e.g. Northern Ireland is still treated - partly - as if it would still belong to the EU.
Please use https://github.com/jugmac00/pyeucountrycodes
$ python3 -m venv .venv
$ . .venv/bin/activate
$ pip install -U pip
$ pip install flit pytest
$ git clone [email protected]:jugmac00/pyeucountrycodes.git
$ cd pyeucountrycodes/
$ flit install
$ pytest .
Add support for Python 3.11.
Remove support for Python 3.6.
Add support for Python 3.10.
Update development documentation.
Do not use Travis CI any more.
Add badge for supported Python versions.
Update readme for release.
Test with GitHub actions.
Add support for Python 3.7, 3.8 and 3.9.
Drop support for Python 2.
Update usage example.
Remove GB from the list of EU countries.
Initial release.
List of countries:
https://en.wikipedia.org/wiki/Member_state_of_the_European_Union (visited on 04.01.2021)
Iso codes:
https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes (visited on 15.01.2019)