Skip to main content

Generator_emails - Unique Email Address Generator 🚀

Project description

Generator emails 📧

A Python module for generating unique email addresses with customizable options. Supports both public and anonymous email domains, keyword-based usernames, and history tracking to avoid duplicates.

Installation

You can install the package via PyPi:

pip install generator-emails

Or clone the repository:

git clone https://github.com/Triram-2/generator-emails.git
cd generator-emails
pip install -r requirements.txt

Usage

Import the module and create an instance:

from generator_emails import GeneratorEmails

generator = GeneratorEmails()
email = generator.generate_email()
print(email)  # Example output: johndoe123@gmail.com

Built-in Domain Databases

generator-emails includes two built-in lists of domains:

  • Public domains – Popular email providers such as Gmail, Yahoo, Outlook, and Yandex.
  • Anonymous domains – Temporary and privacy-focused email services like Guerrilla Mail, Mailinator, and 10MinuteMail.

These domains are used when selecting 'random' (for public) or 'anonim' (for anonymous) as the domain parameter.

Parameters

GeneratorEmails(save_history=True)

  • save_history (bool) – Whether to store generated emails to prevent duplicates.

generate_email(range_len=(10, 18), domain='gmail.com', keywords=None, format='{username}')

Generates a unique email address.

Arguments:

  • range_len (tuple, optional) – Min and max length of the username.
  • domain (str or list, optional) – Email domain. Can be a string, list of domains, 'random' for a random public domain, or 'anonim' for an anonymous domain.
  • keywords (str or list, optional) – A keyword or list of keywords to include in the username.

Returns:

  • str – A generated unique email address.

Example Usage

email1 = generator.generate_email()
email2 = generator.generate_email(domain='yahoo.com', keywords='testuser')
email3 = generator.generate_email(range_len=(8, 12), keywords=['test', 'Mirukha'])

print(email1)
print(email2)
print(email3)

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

generator_emails-0.1.0.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

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

generator_emails-0.1.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for generator_emails-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6d1351881eb40d2de457b1e75db0fa28f2118c1c131064600833c0cd75fe671d
MD5 7d352aa97fd9e070db7890594f3ed94c
BLAKE2b-256 ef2bac0d4905943d773a2294288d4c2a4b5d96ef3127dbfc258d05bb502d1ceb

See more details on using hashes here.

File details

Details for the file generator_emails-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for generator_emails-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ec7f30c35a763e77b7904b7805ac909261ed8ba0e3a180c1858961a19d4cd7c9
MD5 2a7b39340a37a70075eafaad93e2d427
BLAKE2b-256 f8f47da348c66b3058914aabd42e53933bff25fb1efc9a1b8c5016e798b23c39

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