You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

sendrella

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sendrella

Official Python SDK for the Sendrella API – email validation, bounce checking, and disposable detection.

0.1.1
pipPyPI
Maintainers
1

Sendrella Python SDK

The official Python SDK for Sendrella — a modern infrastructure for secure and intelligent email communication.

Effortlessly integrate the Sendrella API into your Python apps for:

  • ✉️ Email bounce checks
  • 🛡️ Disposable (temporary) email detection
  • 📊 Credit tracking
  • 🔐 API key validation

📦 Installation

pip install sendrella

🧪 Development (local or GitHub):

pip install git+https://github.com/Salman0x01/sendrella-python-sdk.git

Or clone and install locally:

git clone https://github.com/Salman0x01/sendrella-python-sdk.git
cd sendrella-python-sdk
pip install .

🚀 Quick Start

from sendrella import SendrellaClient

client = SendrellaClient(api_key="your_api_key_here")

result = client.bounce.check("hello@example.com")
print(result["status"])

🔑 Authentication

Every API call requires a valid Sendrella API key.

🔐 Get your key:

from sendrella import SendrellaClient

client = SendrellaClient(api_key="your_api_key_here")

🧠 Usage Examples

📬 Check Email Bounce

result = client.bounce.check("hello@example.com")
print(result["status"])          # valid / warn / risky / invalid / error
print(result["bounce_score"])    # Score between 0–100
print(result["confidence_indicators"])

📑 Retrieve Bounce Logs

logs = client.bounce.logs(page=1, status="risky")
for log in logs["logs"]:
    print(log["email"], "-", log["status"], "(", log["bounce_score"], ")")

🛡️ Check Disposable Email

result = client.temp_mail.check("user@mailinator.com")
if result.get("is_disposable"):
    print("❌ Disposable email detected")
else:
    print("✅ Clean email")

📂 View Temp Mail Logs

logs = client.temp_mail.logs(page=1)
for log in logs["logs"]:
    print(log["email"], "-", log["status"], "via", log["detection_method"])

💳 Fetch Credits

credits = client.utils.credits()
print("Available:", credits["available_credits"])
print("Used:", credits["all_time_used"])
print("Total:", credits["all_time_credits"])

🔐 Validate API Key

info = client.utils.validate_key()
if info.get("success"):
    print("Authenticated as:", info.get("name"))
else:
    print("Invalid or expired API key")

🧪 Running Tests

# Run all tests
pytest -v tests/

# Or run one
pytest -v tests/test_bounce.py

Make sure to set your API key:

set SENDRELLA_API_KEY=your_api_key_here   # Windows
export SENDRELLA_API_KEY=your_api_key_here  # Linux/macOS

📚 Supported Endpoints

FeatureMethodPath
Bounce Checkclient.bounce.check()/bounce/check
Bounce Logsclient.bounce.logs()/bounce/logs
Disposable Checkclient.temp_mail.check()/tempmail/check
Temp Logsclient.temp_mail.logs()/tempmail/logs
Get Creditsclient.utils.credits()/utils/credits
Validate API Keyclient.utils.validate_key()/token/validate

🛠️ Error Handling

All errors are wrapped in custom exceptions:

  • SendrellaError (base)
  • AuthenticationError
  • BadRequestError
  • ServerError
  • TimeoutError
  • NotFoundError

Example:

from sendrella.exceptions import AuthenticationError

try:
    result = client.bounce.check("email@example.com")
except AuthenticationError:
    print("Invalid API key or permission denied.")

📄 License

MIT License © 2025 Salman Khan

❤️ Contributing

PRs welcome! Please submit bug fixes, improvements, or new endpoints with test coverage.

Keywords

email

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts