A Python library for generating realistic, human-like email addresses from names and surnames. The generator applies various transformations and patterns to create diverse email variations that appear natural and authentic.
Please, note: this is actually code from a spaghetti coded script of mine that I fastly wrote in an afternoon for another side project. But since it's actually really useful, I decided to make a minimal refactoring for functional usage.
Needs big optimizations, statistical analysis and further refactor but right now it serves its purpose.
Sample output for "John Doe" (50 generated emails. This classification was done afterwards, the code won't discriminate on those!):
- Human-like Output: Generates authentic emails rather than bot-generated
- Multiple Transformations: Applies various mutations including leetspeak, vowel dropping, random separators, and digit insertion
- Configurable Settings: Customizable generation parameters through settings, though I recommend leaving as they are
from src.generate_rd_email import generate_email
# Generate a single email
email = generate_email("john", "doe")
print(email) # Example: john.doe92@gmail.com- Name Processing: Normalize and prepare input names
- Separator Selection: Choose joining characters (., _, etc.)
- Mutation Application: Apply random transformations:
- Leetspeak conversion (e → 3, a → 4)
- Vowel dropping
- Random symbol insertion
- Digit/s prepending/appending
- Letter duplication
- Domain Assignment: Select from realistic domain pool with determined probability weights
- Validation: Ensure output meets heuristic standards
This generator prioritizes quality over quantity, producing emails that consistently pass the "human test" while acknowledging the inherent trade-off with uniqueness at scale. The structured approach ensures reliable, realistic output suitable for testing, demos, and applications where authentic-looking email addresses are more valuable than unlimited uniqueness.