ayzal-guard
Official Python client for Ayzal Guard — the Email Risk & IP Intelligence API.
Score email, IP, and velocity before your payment gateway so disposable addresses and botnets never reach Stripe, PayPal, or Adyen.
Install
pip install ayzal-guard
Quick start
import os
from ayzal_guard import AyzalGuard
guard = AyzalGuard(api_key=os.environ["AYZAL_GUARD_KEY"])
result = guard.check("user@example.com", client_ip="1.2.3.4")
if result.verdict in ("disposable", "invalid"):
raise ValueError("Please use a real email address")
# Proceed to Stripe / PayPal / Adyen
Fail-open in a checkout flow
Never block sales because a risk API is down. is_safe() returns True on network errors, timeouts, and 429s.
python
safe = guard.is_safe(email, client_ip=client_ip)
if not safe:
return {"error": "Please use a real email address"}, 400
What you get back
check() returns a CheckResult dataclass:
python
result = guard.check("test@mailinator.com")
print(result.verdict) # 'disposable'
print(result.reason) # 'blocklist_hit'
print(result.mx.has_mx) # False
print(result.ip_risk) # IpRisk(...) or None
Sync and async
Both clients are provided. Pick the one that matches your app.
python
# Sync (Flask, Django, scripts)
from ayzal_guard import AyzalGuard
guard = AyzalGuard(api_key="ag_live_...")
result = guard.check("user@example.com")
# Async (FastAPI, aiohttp, asyncio)
from ayzal_guard import AsyncAyzalGuard
guard = AsyncAyzalGuard(api_key="ag_live_...")
result = await guard.check("user@example.com")
Error handling
python
from ayzal_guard import AyzalGuard, AyzalGuardError
try:
result = guard.check(email)
except AyzalGuardError as e:
print(e.status, e.code, e.message)
Integration examples
Full checkout examples for Stripe, PayPal, Flask, FastAPI, Express, PHP, Rails, and custom gateways are in the Knowledge Base.
License
MIT
Metadata
Release files for ayzal-guard 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 |
|---|---|---|---|---|
| ayzal_guard-0.1.0.tar.gz | 5.9 kB | Without provenance | Details for ayzal_guard-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ayzal_guard-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for ayzal_guard-0.1.0-py3-none-any.whl |
Total release size: 12.3 kB
Release files / ayzal_guard-0.1.0.tar.gz
| Download URL | ayzal_guard-0.1.0.tar.gz |
|---|---|
| Size | 5.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ff9e9b28fd90381bc0fe57cff5df587359e149afe0b4361b646e5d18f37ba166
|
|
BLAKE2b-256 checksum How to use checksums |
fbb7a4c7b7d5432699b878ce32a0e291f5ee0eacec6a1ed093ed06148aedf67f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / ayzal_guard-0.1.0-py3-none-any.whl
| Download URL | ayzal_guard-0.1.0-py3-none-any.whl |
|---|---|
| Size | 6.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
59a36bb22d91ac7689c466bf2fad1771f5dcc7292f5a1059d955e4da98861874
|
|
BLAKE2b-256 checksum How to use checksums |
3c92085f1c3f0e4e00862de399f579ea4bb4ee2e2472f1f2947ea6bd3b46a314
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Security for ayzal-guard 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.