A collection of validators to check data against french formats.
The package is published on PyPI. Install with :
pip install frformat
from frformat import Departement
print(Departement.description())
Departement.is_valid("Haute-Vienne")
# True
Departement.is_valid("Canyon Cosmo")
# False
For better performance on big amounts of data, use in conjunction with numpy.
Check out this file for a list of available formats.