psl
Mozilla Public Suffix list as a Python package and updated daily.
Install via python -m pip install psl
See https://publicsuffix.org for more information regarding the list itself.
API
The package provides the following members as an API:
domain_suffixes()
def domain_suffixes(dn: str, *, icann_only: bool=False) -> Suffixes: ...
Queries the Public Suffix list for the given domain and returns a named tuple containing
the public and private suffixes for the domain. Either value can be None if that
field isn't available. (eg private=None for the domain com)
domain_can_set_cookie()
def domain_can_set_cookie(*, http_domain: str, cookie_domain: str) -> bool: ...
Determines if a user-agent that receives an HTTP response from domain <http_domain>
with Set-Cookie headers with parameter Domain=<cookie_domain> should allow
that cookie to be set. This disallows cookies from being set on public suffixes
and on domains that the HTTP domain has no authority over.
This is the same mechanism that modern browsers use to determine whether it's safe to set a cookie to prevent 'super-cookies'.
License
MPL-2.0
Metadata
Release files for psl 2025.5.26
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| psl-2025.5.26.tar.gz | 51.9 kB | Without provenance | Details for psl-2025.5.26.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| psl-2025.5.26-py3-none-any.whl | Python 3 | none | any | Details for psl-2025.5.26-py3-none-any.whl |
Total release size: 102.5 kB
Release files / psl-2025.5.26.tar.gz
| Download URL | psl-2025.5.26.tar.gz |
|---|---|
| Size | 51.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
00b3b655f659af77056b620d4cce790107b5b57003821ac0552854791b65ac91
|
|
BLAKE2b-256 checksum How to use checksums |
3144d653ff4db4dbae634d90db1d80673d1432c0f26876d5c6a962ba20b16725
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.18
|
Release files / psl-2025.5.26-py3-none-any.whl
| Download URL | psl-2025.5.26-py3-none-any.whl |
|---|---|
| Size | 50.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
753bbd03d19599f308763f8686aa0555bd53217f6bb2b5327bb46685df58141d
|
|
BLAKE2b-256 checksum How to use checksums |
326621058520004aa55c73faa477a987257a8bd565a1c7bed264dd1aeb437f7b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.18
|
Security for psl 2025.5.26
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.