Python integration
Block disposable emails in Python
You're running a Python app and fake signups keep getting through. Add one request to your signup code and Fidro checks the email and IP before the account exists.
How it works
Send the user's email and IP to Fidro with requests. Fidro checks the address, the network and what it has already seen from them, then answers allow, challenge or block in a single JSON response. No SDK needed.
One fake signup can look perfectly normal. Five from the same IP in an hour don't. Send event and user_id with each call and Fidro remembers, so it catches the pattern as well as the person. You get a score from 0 to 100 and one answer: allow, challenge or block.
1. Install what you need
pip install requests
You'll also need an API key. Sign up free and you'll have one in a minute, no card needed.
2. Check every signup
Send the email and IP to POST /api/validate. Fidro checks for disposable domains, missing mail servers, VPNs, proxies and Tor, and answers allow, challenge or block. Let the allows straight in, ask the challenges to confirm their email, and turn the blocks away.
import os
import requests
FIDRO_API_KEY = os.environ["FIDRO_API_KEY"]
def check_signup(email: str, ip: str) -> dict:
response = requests.post(
"https://fidro.io/api/validate",
headers={"Authorization": f"Bearer {FIDRO_API_KEY}"},
json={"email": email, "ip": ip, "event": "signup"},
timeout=5,
)
response.raise_for_status()
return response.json()
# Usage
result = check_signup("test@example.com", "8.8.8.8")
print("Risk score:", result["risk_score"]) # 0 to 100
print("Recommendation:", result["recommendation"]) # allow, challenge or block
if result["recommendation"] == "block":
pass # Refuse the signup
3. Look up an IP
Just want to know where a request came from? GET /api/ip/{ip} returns the country, city, ISP and network, without scoring. The VPN, proxy and Tor flags come from /api/validate, under data.checks.
import os
import requests
FIDRO_API_KEY = os.environ["FIDRO_API_KEY"]
def lookup_ip(ip: str) -> dict:
response = requests.get(
f"https://fidro.io/api/ip/{ip}",
headers={"Authorization": f"Bearer {FIDRO_API_KEY}"},
timeout=5,
)
response.raise_for_status()
return response.json()
# Usage
result = lookup_ip("8.8.8.8")
print("Country:", result["location"]["country_name"])
print("ISP:", result["location"]["isp"])
Want to see real results first? Try any address in the free IP checker.
Next steps
The API reference has every field. The free checker shows you real results. And if you're weighing up alternatives, the comparisons are honest about where others fit.
Frequently Asked Questions
How do I add fraud detection to Python?
Does Fidro have a Python SDK?
Is Fidro free to use with Python?
What should I do when Fidro says challenge?
Start catching bad signups in the next 5 minutes
Create your account, grab your API key, and send your first request. Free plan with 200 validations/month. No credit card. Cancel anytime.