Automatically updated list of valid top-level domains (TLDs) sourced directly from IANA. The package provides a simple set and list of all current TLDs. Version 2026041800 is a date-based version reflecting the IANA update date. Released approximately daily.
pip install tldsVerified import paths — ran on the pinned version, not inferred.
Check if a domain extension is a valid TLD according to IANA.
Pin the version in requirements.txt: tlds==2026041800
Use: domain_extension.lower() in tlds_set
Use idna package: from idna import encode; encode('münchen').decode() in tlds_setNo dependency data recorded yet.