Skip to main content

Async dnsbl lists checker based on asyncio/aiodns.

Project description

Async dnsbl lists checker based on asyncio/aiodns. Checks if ip is listed in anti-spam dns blacklists. Multiple dns blacklists supported. Use aiodns for async dns requests. Usually ip check run for 60+ lists takes less than one second.


pip intall pydnsbl


python >= 3.5, aiodns


>>> from pydnsbl import DNSBLChecker
>>> checker = DNSBLChecker()
>>> result = checker.check_ip('')
>>> result
<DNSBLResult:  (0/62)> # google is clean
>>> result = checker.check_ip('')
>>> result
<DNSBLResult: [BLACKLISTED] (12/62)>  # this is just for example
>>> result.blacklisted
# detected_by dnsbl providers and their category tag for this ip
>>> result.detected_by
{'': ['unknown'], ...
'': ['spam', 'exploits']}

Extending/overriding providers


>>> from pydnsbl import DNSBLChecker, providers
>>> providers = BASE_PROVIDERS + [providers.Provider(''), ...]
>>> checker = DNSBLChecker(providers=providers)
# in providers parameter you can pass providers dnsbl host or Provider class object (see Advanced topic below)


Take a look into file.

  • Use Provider class to create your custom providers.
  • Override process_response method of Provider class to map providers response codes (127.0.0.x) to DNSBLChecker categories.


Feel free to contact me: ippolitov87 at

Project details

Download files

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

Files for pydnsbl, version 0.6.3
Filename, size & hash File type Python version Upload date
pydnsbl-0.6.3.tar.gz (5.0 kB) View hashes Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page