Comparison
publicsuffix2 vs publicsuffixlist vs tldextract
Maintenance, adoption and momentum side by side, from PyPI, GitHub and deps.dev data refreshed every day.
Get a public suffix for a domain name using the Public Suffix List. Forked from and using the same API as the publicsuffix package.
Likely abandoned. No release or commit for years (last release over 6 years ago).
pip install publicsuffix2publicsuffixlist implement
Maintained. Last release 1 day ago, commits in 4 of the last 26 weeks. Weaker on commit activity and contributor spread.
pip install publicsuffixlistAccurately separates a URL's subdomain, domain, and public suffix, using the Public Suffix List (PSL). By default, this includes the public ICANN TLDs and their exceptions. You can optionally support the Public Suffix List's private domains as well.
Maintained. Last release 2 months ago, commits in 5 of the last 26 weeks. Weaker on commit activity and contributor spread.
pip install tldextractIn short
- publicsuffix2 looks abandoned: avoid it for new projects.
- tldextract is the most used: 42M downloads a month, 5.7× more than publicsuffixlist.
- Maintenance is comparable: tldextract 62, publicsuffixlist 61 on Pythie’s Index.
- publicsuffixlist is growing fastest: downloads +89% over the last month.
- Safe default for a new project: tldextract.
Side by side
| Metric | publicsuffix2 | publicsuffixlist | tldextract |
|---|---|---|---|
| Pythie’s Index | Pythie’s Index: 21 | 61 |