Skip to main content

Returns IDN restriction level of a string.

Project description

# IDNCheck

IDNcheck performs safety checks on international domain names.
This might be useful if you want to see how likely a given domain
is to be used for nefarious purposes such as phishing.
It returns the unicode restriction level passed by a string, as described
in Unicode Technical Standard #39, Unicode Security Mechanisms (see References).

Note: On first run, it will automatically download a file if it doesn't exist:

## How to use

Typical usage might look something like this:

>>> import idncheck
>>> idncheck.idncheck("hello")
>>> idncheck.idncheck("φilosoφia")
>>> idncheck.idncheck("φilosoφia", 3) # FIXME
>>> idncheck.idncheck("paypal")
>>> idncheck.idncheck("paypаl")
>>> idncheck.idncheck("раура1")


#!/usr/bin/env python

import idncheck

idncheck.idencheck("φilosoφia", 3): # FIXME
print("I see what you're doing there")

## References

This tool serves as an implementation of the Restriction-Level detection described
in Unicode Technical Standard #39, Unicode Security Mechanisms:

- [TR 39](

Additional use cases and details are available in these blog posts:

- [Gmail post](
- [Another Google post](


- Create a web service on a Gandi Python Simple Hosting instance

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

idncheck-0.1.0.tar.gz (3.8 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page