Skip to main content

Python domain-parser

Parse domains using the TLD list maintained by publicsuffix.org.

Domains are parsed into their TLD, SLD, and subdomains. TLDs like ‘co.uk’ are handled properly. The list of possible TLDs is generated from publicsuffix.org. The first time the library is run, an HTTP request is made and a .tld.pickle file is created. Subsequent runs don’t make an HTTP request. Rather, they load the pickle file. If you want to refresh the list, simply delete the pickle file.

TODO

There are tests, but not enough. I’m hoping that if people find this useful they’ll contribute test cases to the projects.

New in version 0.0.4

  • Use pylru and TLD_CACHE to speed up parsing in long-running programs

Release files for domain_parser 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for domain_parser 0.0.5
File Size Uploaded
domain_parser-0.0.5.tar.gz 3.3 kB Details

Release files / domain_parser-0.0.5.tar.gz

Download URL domain_parser-0.0.5.tar.gz
Size 3.3 kB
Tags Source
SHA-256 checksum
How to use checksums
a33bf7c6a712c5b894a89689a2bc200f007388a8b67e777b673d26ca214f433a
BLAKE2b-256 checksum
How to use checksums
287f73f47d710fc0e6cbd9ac2cb1d2b9eeb58661df6608b01f98a66f77f01437
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.0.5 This release

1 release file

0.0.4

1 release file

0.0.3.4

1 release file

0.0.3.3

1 release file

0.0.3.2

1 release file

0.0.3.1

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page