Meta tags:
description= Hi, Thank you for creating this excellent library. Would you accept a PR that adds async methods for deliverability checking? A quick look suggest it would entail a new validate_email_deliverability function, with some duplicated logic, ...;
Headings (most frequently used words):
commented, on, joshdata, 2024, mar, 2025, 16, jan, navigation, zaczero, 11, metadata, footer, apr, 2023, may, umarbutler, async, deliverability, checking, 104, menu, repository, description, activity, issue, actions, 13, mrdeveloperdude, 12, 25, tamird, 10, 17, dreamsorcerer, jul, assignees, labels, projects, milestone, relationships, development,
Text of the page (most frequently used words):
the (34), and (28), joshdata (21), actions (20), that (19), async (19), with (19), you (18), for (18), more (17), #commented (16), 2024 (16), this (15), github (15), not (13), code (12), 2025 (12), mar (12), from (11), jan (10), work (10), email (8), #deliverability (8), owner (8), zaczero (8), dns (8), import (8), resolver (7), are (7), but (7), rdatatype (7), rrset (7), all (6), just (6), success (6), security (5), copilot (5), issue (5), one (5), sign (5), have (5), branch (5), will (5), asyncio (5), use (5), validator (5), there (5), features (5), python (5), out (5), your (5), support (5), apr (5), 2023 (5), time (4), projects (4), could (4), would (4), function (4), look (4), last (4), edited (4), end (4), see (4), package (4), now (4), umarbutler (4), some (4), try (4), other (4), may (4), reacted (4), react (4), future (4), working (4), task (4), aaaa (4), answer (4), domain (4), except (4), checking (4), new (4), share (3), navigation (3), open (3), requests (3), none (3), labels (3), get (3), also (3), resolve (3), def (3), non (3), checks (3), sync (3), probably (3), change (3), which (3), think (3), dependency (3), dreamsorcerer (3), way (3), won (3), don (3), add (3), such (3), standards (3), higher (3), completing (3), good (3), when (3), doesn (3), thanks (3), return (3), only (3), trio (3), implementation (3), has (3), start_soon (3), exchange (3), null (3), validate_email (3), records (3), started (3), logic (3), copy (3), link (3), 104 (3), quality (3), another (3), tab (3), window (3), refresh (3), session (3), reload (3), developers (3), changelog (3), customer (3), enterprise (3), grade (3), build (3), can (2), perform (2), community (2), status (2), footer (2), pull (2), development (2), milestone (2), metadata (2), free (2), back (2), testing (2), our (2), changes (2), _validate_email (2), defined (2), here (2), something (2), should (2), avoid (2), calls (2), generally (2), high (2), performance (2), feedback (2), quick (2), jul (2), risk (2), tree (2), who (2), widely (2), used (2), seems (2), example (2), how (2), becoming (2), too (2), idealistic (2), prevents (2), doing (2), meaningful (2), able (2), any (2), test (2), make (2), might (2), tamird (2), maybe (2), needed (2), method (2), both (2), await (2), know (2), platform (2), anyio (2), although (2), mrdeveloperdude (2), parallel (2), though (2), octomy (2), cancel (2), true (2), treat (2), tasks (2), rrset_by_preference (2), preference (2), attrgetter (2), error (2), exception (2), logging (2), dnsexception (2), timeout (2), nonameservers (2), skip (2), nxdomain (2), noanswer (2), create_task_group (2), false (2), info (2), actually (2), aled (2), treharne (2), really (2), duplicated (2), insights (2), repository (2), signed (2), universe (2), training (2), integrations (2), stories (2), center (2), documentation (2), learn (2), business (2), fixes (2), products (2), secret (2), action, personal, information, manage, cookies, contact, docs, privacy, terms, 2026, inc, app, branches, yet, relationships, assigned, assignees, comment, already, account, join, conversation, create, pre, release, pypi, start, project, these, likely, type, errors, encountered, validate_email_sync, validate_email_async, likewise, validate_email_sync_or_async, closer, simplified, awkward, fallback, leave, users, blocking, without, their, knowledge, acceptable, applications, better, fail, force, user, fix, config, preferable, aiodns, native, included, extras, installed, similar, pip, install, bit, taking, through, commit, exactly, making, life, harder, sympathise, josh, unnecessary, dependencies, stack, very, fragile, breaking, away, destroying, everything, hold, dear, added, ridiculously, complex, often, duplicative, api, langchain, shoot, yourself, foot, introducing, battle, hardened, enough, causing, mayhem, someone, maintains, somewhat, certainly, racking, lot, goes, into, maintaining, ensure, million, downloads, month, hard, help, unexpected, breakage, uses, insight, expect, merged, happy, myself, necessary, need, scripts, frameworks, happen, soon, interesting, kamil, monicz, fwiw, instead, collections, abc, awaitable, contributor, makes, sense, take, aside, looks, object, let, handle, cases, _async, small, chance, box, haven, tested, read, taken, thing, stands, many, people, prefer, libraries, agnostic, decision, day, nice, lets, once, sure, case, supports, appreciate, anyone, before, merge, bump, sharing, currently, run, queries, curious, improves, real, world, scenarios, cancel_scope, else, str, reverse, key, sorted, sort, answers, descending, order, implicit, log, proceed, gracefully, wrong, side, raise, does, exist, further, nonlocal, ascii_domain, check_deliverability, email_validator, asyncresolver, operator, spdx, license, identifier, 0bsd, cc0, contrast, check, spf, opinion, assumptions, incorrect, first, performs, request, optimistically, assuming, happens, two, feel, inspired, realized, didn, fixed, tried, bring, date, did, since, state, while, ago, complete, set, tests, clear, documented, over, want, having, separate, functions, yes, those, caveats, https, com, activity, odw, umar, butler, accept, adds, methods, suggest, entail, almost, existing, validate_email_deliverability, thank, creating, excellent, library, body, opened, magnuswatn, description, items, wiki, issues, message, dismiss, alert, switched, accounts, appearance, settings, search, pricing, event, talks, workshops, what, next, partners, about, company, forum, events, webinars, blog, resource, connect, resources, premium, advanced, ons, trust, why, evaluate, industries, government, manufacturing, financial, services, healthcare, industry, nonprofits, startups, team, enterprises, stage, businesses, source, latest, improvements, across, place, developer, articles, sponsors, trending, repos, explore, customize, certifications, scanning, leak, prevention, protection, vulnerability, detection, remediation, secure, cloud, environments, codespaces, analysis, enforcement, automation, ship, coding, agent, automated, hosting, review, collaboration, menu, content,
Text of the page (random words):
async deliverability checking issue 104 joshdata python email validator github skip to content navigation menu sign in products platform github repository hosting code review and collaboration copilot ai coding agent for tasks projects and automated work build ship actions ci cd and automation code quality quality analysis fixes and enforcement codespaces cloud development environments secure code security vulnerability detection and remediation secret protection secret scanning and leak prevention all features developers learn documentation training certifications build build with copilot customize copilot integrations explore trending repos github sponsors developer articles changelog changelog your source for the latest features improvements and fixes across github products all in one place businesses by stage enterprises team startups nonprofits by industry healthcare financial services manufacturing government see all industries evaluate github why github customer stories business insights trust center add ons github advanced security enterprise grade code security copilot for business enterprise grade ai features premium support enterprise grade 24 7 support resources learn connect documentation resource center blog events webinars community forum customer stories integrations support customer support training github status company about partners changelog github universe github universe the event for developers by developers talks workshops and what s next for github pricing search sign in sign up appearance settings you signed in with another tab or window reload to refresh your session you signed out in another tab or window reload to refresh your session you switched accounts on another tab or window reload to refresh your session dismiss alert message joshdata python email validator repository navigation code issues 12 12 pull requests 5 5 actions projects wiki security and quality insights more items async deliverability checking 104 new issue copy link new issue copy link open open async deliverability checking 104 copy link description magnuswatn opened on apr 13 2023 issue body actions hi thank you for creating this excellent library would you accept a pr that adds async methods for deliverability checking a quick look suggest it would entail a new validate_email_deliverability function with some duplicated logic and a new validate_email function which could probably share almost all logic with the existing one thanks react with 4 reacted by aled treharne octomy co odw and umar butler activity joshdata commented on apr 13 2023 joshdata on apr 13 2023 last edited by joshdata owner more actions i actually started working on that a while ago in https github com joshdata python email validator tree async but my standards are higher now for completing the work there has to be a complete set of tests and the code has to be clear and documented and if the work is started over i also really really want to avoid duplicated logic by not having separate functions so yes but with those caveats react with 1 reacted by aled treharne joshdata commented on apr 16 2023 joshdata on apr 16 2023 owner more actions i just realized the branch didn t actually have my async work on it i ve fixed it now and tried to bring it up to date with other changes that i did since i started working on it it s not in a working state though zaczero commented on mar 4 2024 zaczero on mar 4 2024 last edited by zaczero more actions i will share with you my async implementation feel free to use it or get inspired by it the method first performs one dns request for mx records optimistically assuming it won t be a null mx if it happens to be a null mx it will perform two dns requests in parallel for a aaaa records in contrast to python email validator it doesn t check for spf records in my opinion such assumptions are incorrect spdx license identifier 0bsd or cc0 1 0 import logging from operator import attrgetter from anyio import create_task_group from dns asyncresolver import resolver from dns exception import dnsexception timeout from dns rdatatype import rdatatype from dns resolver import nxdomain noanswer nonameservers from email_validator import validate_email resolver resolver info validate_email email check_deliverability false domain info ascii_domain success false async with create_task_group as tg async def task rd rdatatype nonlocal success try answer await resolver resolve domain rd rrset answer rrset except noanswer rrset none except nxdomain return domain does not exist skip further checks except nonameservers timeout raise something s wrong on our side except dnsexception some other error log and proceed gracefully logging exception dns error for r r domain rd rrset none if rd rdatatype mx if not rrset on implicit mx try a aaaa tg start_soon task rdatatype a tg start_soon task rdatatype aaaa return mx treat not null answer as success sort answers by preference in descending order rrset_by_preference sorted rrset key attrgetter preference reverse true exchange str rrset_by_preference 0 exchange success exchange else a aaaa treat any answer as success and cancel other tasks if rrset success true tg cancel_scope cancel tg start_soon task rdatatype mx react with 1 reacted by octomy joshdata commented on mar 5 2024 joshdata on mar 5 2024 owner more actions thanks for sharing the branch currently has an async implementation that seems to be working it doesn t run dns queries in parallel though i d be curious to see if it improves performance in real world scenarios i might try it although i don t know when i ll have time to mrdeveloperdude commented on mar 11 2024 mrdeveloperdude on mar 11 2024 more actions bump joshdata commented on mar 11 2024 joshdata on mar 11 2024 owner more actions i d appreciate anyone testing out the async branch before i merge it zaczero commented on mar 12 2024 zaczero on mar 12 2024 last edited by zaczero more actions i have taken a look at the code and the only thing that stands out is that this async implementation only supports asyncio and not trio i know that there are many people who prefer to use trio and libraries should generally be async platform agnostic but it s your decision at the end of the day anyio is a nice package that lets you support both at once although i am not sure if it will work with this future use case there is also a small chance that asyncio future will work out of the box with trio i haven t tested the code i just read it but maybe the future dependency is not needed at all maybe just return an object and let the _async method handle both cases and only await if needed aside of that looks good joshdata commented on mar 25 2024 joshdata on mar 25 2024 owner more actions thanks for the feedback makes sense i ll take a look tamird commented on may 9 2024 tamird on may 9 2024 contributor more actions fwiw you might be able to use collections abc awaitable instead of asyncio future react with 1 reacted by kamil monicz joshdata commented on may 10 2024 joshdata on may 10 2024 owner more actions oh interesting i need to make time to make some test scripts and try some of the other frameworks probably won t happen soon umarbutler commented on jan 16 2025 umarbutler on jan 16 2025 more actions joshdata any insight on when we can expect the async branch to be merged i m happy to test it out myself if that s necessary joshdata commented on jan 16 2025 joshdata on jan 16 2025 owner more actions it s hard to see a time when i would be able to get back to this and it doesn t help that it s a high risk change i e unexpected breakage in non async uses zaczero commented on jan 16 2025 zaczero on jan 16 2025 more actions but my standards are higher now for completing the work i think this is a good example of how becoming too idealistic prevents you from doing meaningful work umarbutler commented on jan 16 2025 umarbutler on jan 16 2025 more actions but my standards are higher now for completing the work i think this is a good example of how becoming too idealistic prevents you from doing meaningful work as someone who maintains a somewhat widely used python package but certainly not as widely used as this package which seems to be racking in 24 million downloads a month there is a lot that goes into maintaining a package to ensure you don t shoot yourself in the foot by introducing features that are not battle hardened enough and end up causing mayhem the features you add are added in such a way as to not end up with a ridiculously complex and often duplicative api see eg langchain you don t add unnecessary dependencies to the stack such that you end up with a very fragile dependency tree that s one breaking change away from destroying everything you hold dear so i sympathise with josh joshdata commented on jan 17 2025 joshdata on jan 17 2025 owner more actions exactly there s no way to do it in a way that won t be have a risk of making my life harder dreamsorcerer commented on jul 11 2025 dreamsorcerer on jul 11 2025 last edited by dreamsorcerer more actions a bit of feedback from taking a quick look through the async commit i think it d be preferable to use aiodns as a native asyncio high performance resolver this could be included as an extras dependency so it could be installed with pip install email validator async or similar the resolve code should be simplified to avoid the awkward sync calls as a fallback this will just leave users with blocking sync calls without their knowledge which is generally not acceptable to asyncio applications better to just fail and force the user to fix the resolver config likewise for the validate_email_sync_or_async i d probably just change the code something closer to def validate_email_sync email _validate_email non deliverability checks defined in this function sync deliverability code here async def validate_email_async email _validate_email non deliverability checks defined in this function async deliverability code here these changes would likely also resolve all the type errors you ve encountered in that branch if you get back to this and create a pre release on pypi we could start testing this in our project sign up for free to join this conversation on github already have an account sign in to comment metadata metadata assignees no one assigned labels no labels no labels projects no projects milestone no milestone relationships none yet development no branches or pull requests issue actions open in github copilot app footer 2026 github inc footer navigation terms privacy security status community docs contact manage cookies do not share my personal information you can t perform that action at this time
|