Skip to main content

Python SDK for Disposable Email Detection

Project description

ded_sdk

ded_sdk is a Python SDK for detecting disposable email addresses using the Disposable Email Detector API. It provides a simple interface to validate email addresses and determine if they are disposable.

Features

  • Validate email addresses for disposability.
  • Retrieve detailed information about the email domain.
  • Easy integration with Python applications.

Installation

Install the SDK using pip:

pip install ded_sdk

Usage

First, import the DisposableEmailClient and initialize it with your API key:

from ded_sdk import DisposableEmailClient

api_key = "your-api-key"
client = DisposableEmailClient(api_key)

To validate an email address:

email = "example@tempmail.com"
result = client.validate(email)

if result["disposable"]:
    print(f"{email} is disposable.")
else:
    print(f"{email} is not disposable.")

The validate method returns a dictionary with the following keys:

  • disposable: Boolean indicating if the email is disposable.
  • domain: The domain of the email address.
  • source: Source of the information (e.g., "crawled").
  • confidence: Confidence score between 0 and 1.

API Reference

DisposableEmailClient(api_key: str, base_url: str = "https://ded.gossorg.in/v1")

Initializes the client with your API key.

  • api_key: Your API key for authentication.
  • base_url: Base URL of the API (default is https://ded.gossorg.in/v1).

validate(email: str) -> dict

Validates the provided email address.

  • email: The email address to validate.

Returns a dictionary with the validation result.

License

This project is licensed under the MIT License.

Project details


Download files

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

Source Distribution

ded_sdk-0.1.0.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ded_sdk-0.1.0-py2.py3-none-any.whl (3.4 kB view details)

Uploaded Python 2Python 3

File details

Details for the file ded_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: ded_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for ded_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d3799426bdabc2d4f4fad9f398cde032fb472c418b3a7221fae6096ae8c5e4e0
MD5 daf1235c3963ab17bb1d4fe1e551b0e6
BLAKE2b-256 49d884957bfc51ecc0afdba86c510ea8f3090f8c893a3edd788b943b51d277bd

See more details on using hashes here.

File details

Details for the file ded_sdk-0.1.0-py2.py3-none-any.whl.

File metadata

  • Download URL: ded_sdk-0.1.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for ded_sdk-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 8cf2ee7942f536a75f046e3ee65885c3044d787579415bc8efb57ee3c0573b78
MD5 ab6e52f4d7e9d573458b8adc85601f30
BLAKE2b-256 68684de395ba3beb7d05d699030c2e89f0d294c6de6b000537dc22306c454f8b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page