Skip to main content
File added late

1 file was added to this release more than 14 days after its initial publication. Inspect the release files before installing.

# pytld

Refer to `http://mxr.mozilla.org/mozilla/source/netwerk/dns/src/effective_tld_names.dat?raw=1`. The top-level domain analysis of the URL or domain name.

## Installation

```bash
$ pip install pytld
```

## Usage example

It can be from the URL or domain name analysis top-level domain:

```python
from pytld import get_tld
from pytld import get_full_domain
from pytld import get_hostname


def test_get_tld():
assert get_tld('team.develop.google.hk.', strict=False) == 'develop.google.hk'
assert get_tld('team.develop.google.hk.') == 'google.hk'
assert get_tld('google.hk.') == 'google.hk'
assert get_tld('http://www.example.com:8080/admin.php/afaf?13123') == 'example.com'
assert get_tld('www.google.com') == 'google.com'
assert get_tld('mail.google.com.hk') == 'google.com.hk'
assert get_tld('apps.google.com.hk.') == 'google.com.hk'
assert get_tld('blog.google.hk.') == 'google.hk'


def test_get_full_domain():
assert get_full_domain('http://www.example.com.cn:8080/admin.php/afaf?13123') == 'www.example.com.cn'


def test_get_hostname():
assert get_hostname('http://www.example.com.cn:8080/admin.php/afaf?13123') == 'www'

```

## License

MPL 1.1/GPL 2.0/LGPL 2.1

## Support

For any issues contact me at the e-mail given in the `Author` section.

## Author

mykings <xsseroot@gmail.com>

Metadata

Release files for pytld 0.1.0

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

File added late

1 file was uploaded more than 14 days after the first file in this release.

While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.

We recommend inspecting the release files before installing.

Source distribution (sdist)

Source distribution for pytld 0.1.0
File Size Uploaded Provenance Actions
pytld-0.1.0.tar.gz 76.3 kB File added late: Without provenance Details for pytld-0.1.0.tar.gz

Release files / pytld-0.1.0.tar.gz

File added late

This file was uploaded more than 14 days after the first file in this release.

While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.

We recommend inspecting the release file before installing.

Download URL pytld-0.1.0.tar.gz
Size 76.3 kB
Tags Source
SHA-256 checksum
How to use checksums
3b4f7dd5e29d62731a28074a6eda1f4a6c8a4850571755f0143603059202d176
BLAKE2b-256 checksum
How to use checksums
c93048e1897e028373b5d94a109bb22b3027193a1045cf9b7f178af4fb273fa7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for pytld 0.1.0

Upload timing

File added late

1 file was uploaded more than 14 days after the first file in this release.

While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.


Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

1 release file No provenance

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