Check if a user is covered by GDPR. Compare IP address to list of EEA/EU countries.
This module is designed to make it easier to look up if a user appears to be a resident covered by the GDPR based on IP address.
This is only a best-effort guess, no guarantee or claim is made that this information will always be accurate or reliable.
pip install gdpr_check maxminddb-geolite2
from gdpr_check import Checker # default uses bundled GeoLite2 DB: c = Checker() # optional: pass path to local maxmind GeoIP2 database c = Checker('/path/to/GeoLite2-Country_20180501/GeoLite2-Country.mmdb') # check IPs c.is_gdpr_resident_ip('188.8.131.52') # returns True - Czech Republic IP c.is_gdpr_resident_ip('184.108.40.206') # returns False - Canadian IP
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
gdpr_check-0.8.tar.gz (2.5 kB view hashes)