dnsrobot
Python client for the DNS Robot API — 53 free online DNS and network tools.
No API key required. Zero external dependencies.
Install
pip install dnsrobot
Quick Start
from dnsrobot import DNSRobot
dr = DNSRobot()
# DNS lookup
result = dr.dns_lookup("example.com")
for ip in result["resolvedIPs"]:
print(ip)
# WHOIS lookup
whois = dr.whois_lookup("example.com")
print(f"Registrar: {whois['registrar']['name']}")
print(f"Expires: {whois['expiresOn']}")
# SSL certificate check
ssl = dr.ssl_check("github.com")
print(f"Valid: {ssl['leafCertificate']['isValid']}")
print(f"Days left: {ssl['leafCertificate']['daysToExpire']}")
Available Methods
| Method | Description | Tool Page |
|---|---|---|
dns_lookup(domain) |
DNS record lookup (A, AAAA, MX, TXT, etc.) | DNS Lookup |
whois_lookup(domain) |
WHOIS registration data | WHOIS Lookup |
ssl_check(domain) |
SSL/TLS certificate check | SSL Checker |
spf_check(domain) |
SPF record validation | SPF Checker |
dkim_check(domain) |
DKIM record check | DKIM Checker |
dmarc_check(domain) |
DMARC record validation | DMARC Checker |
mx_lookup(domain) |
MX record lookup | MX Lookup |
ns_lookup(domain) |
Nameserver lookup | NS Lookup |
ip_lookup(ip) |
IP geolocation | IP Lookup |
http_headers(url) |
HTTP header analysis | HTTP Headers |
port_check(host, port) |
TCP port check | Port Checker |
Examples
Email authentication check
dr = DNSRobot()
spf = dr.spf_check("gmail.com")
print(f"SPF: {spf['grade']} ({spf['score']}/100)")
dkim = dr.dkim_check("gmail.com", selector="google")
print(f"DKIM found: {dkim['found']}")
dmarc = dr.dmarc_check("gmail.com")
print(f"DMARC policy: {dmarc['policy']}")
MX and NS records
dr = DNSRobot()
mx = dr.mx_lookup("gmail.com")
for rec in mx["mxRecords"]:
print(f"{rec['priority']} {rec['exchange']}")
ns = dr.ns_lookup("google.com")
for srv in ns["nameservers"]:
print(srv["nameserver"])
Port scanning
dr = DNSRobot()
for port in [22, 80, 443, 8080]:
result = dr.port_check("example.com", port)
print(f"Port {port}: {result['status']}")
Error Handling
from dnsrobot import DNSRobot
dr = DNSRobot()
try:
result = dr.dns_lookup("example.com")
except RuntimeError as e:
print(f"API error: {e}")
except ValueError as e:
print(f"Invalid input: {e}")
Links
- Homepage: dnsrobot.net
- DNS Lookup: dnsrobot.net/dns-lookup
- SSL Checker: dnsrobot.net/ssl-checker
- WHOIS Lookup: dnsrobot.net/whois-lookup
- All 53 Tools: dnsrobot.net/all-tools
Metadata
Release files for dnsrobot 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dnsrobot-0.1.0.tar.gz | 6.2 kB | Without provenance | Details for dnsrobot-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dnsrobot-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for dnsrobot-0.1.0-py3-none-any.whl |
Total release size: 12.0 kB
Release files / dnsrobot-0.1.0.tar.gz
| Download URL | dnsrobot-0.1.0.tar.gz |
|---|---|
| Size | 6.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
678f64472bb31d3e0908f9ec1341dfc156bfcc6b48be07a8abbf6582434b6366
|
|
BLAKE2b-256 checksum How to use checksums |
cd9889bd6efed6b5872536a9eb888007482a10ecae68743c7031160da9e61f55
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Release files / dnsrobot-0.1.0-py3-none-any.whl
| Download URL | dnsrobot-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a6b741a3fd40d46fb580fc592a0483e1a46c32c2ee636cd98441a9a28572342a
|
|
BLAKE2b-256 checksum How to use checksums |
dd106408e5e3f9a00fcb5ab0dde0a8af0f9d92d7cbeafe8d6d2a55d51d4ce202
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Security for dnsrobot 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.