{"id":15472276,"url":"https://github.com/sethmlarson/psl","last_synced_at":"2025-09-11T19:31:37.777Z","repository":{"id":62578206,"uuid":"210907492","full_name":"sethmlarson/psl","owner":"sethmlarson","description":"Mozilla Public Suffix list as a Python package and updated daily.","archived":false,"fork":false,"pushed_at":"2024-04-22T13:04:24.000Z","size":253,"stargazers_count":9,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-05-01T23:06:45.220Z","etag":null,"topics":["http-cookies","iana","icann","public-suffix","public-suffix-list","python"],"latest_commit_sha":null,"homepage":"https://publicsuffix.org","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sethmlarson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-09-25T17:55:34.000Z","updated_at":"2024-05-06T14:39:37.174Z","dependencies_parsed_at":"2023-01-27T19:45:27.321Z","dependency_job_id":"5334a2d4-610e-4d68-aa2e-11ecc9814497","html_url":"https://github.com/sethmlarson/psl","commit_stats":{"total_commits":131,"total_committers":1,"mean_commits":131.0,"dds":0.0,"last_synced_commit":"21d9f1893f10b60eaf8c96792687008dbb8d6c03"},"previous_names":[],"tags_count":155,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sethmlarson%2Fpsl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sethmlarson%2Fpsl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sethmlarson%2Fpsl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sethmlarson%2Fpsl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sethmlarson","download_url":"https://codeload.github.com/sethmlarson/psl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232662504,"owners_count":18557469,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["http-cookies","iana","icann","public-suffix","public-suffix-list","python"],"created_at":"2024-10-02T02:31:05.459Z","updated_at":"2025-01-06T01:44:58.418Z","avatar_url":"https://github.com/sethmlarson.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# psl\n\n[![Version](https://img.shields.io/pypi/v/psl)](https://pypi.org/project/psl)\n[![Downloads](https://pepy.tech/badge/psl)](https://pepy.tech/project/psl)\n![CI](https://img.shields.io/github/workflow/status/sethmlarson/psl/CI/master)\n\nMozilla Public Suffix list as a Python package and updated daily.\n\nInstall via `python -m pip install psl`\n\nSee https://publicsuffix.org for more information regarding the list itself.\n\n## API\n\nThe package provides the following members as an API:\n\n### `domain_suffixes()`\n\n```python\ndef domain_suffixes(dn: str, *, icann_only: bool=False) -\u003e Suffixes: ...\n```\n\nQueries the Public Suffix list for the given domain and returns a named tuple containing\nthe public and private suffixes for the domain.  Either value can be `None` if that\nfield isn't available. (eg `private=None` for the domain `com`)\n\n### `domain_can_set_cookie()`\n\n```python\ndef domain_can_set_cookie(*, http_domain: str, cookie_domain: str) -\u003e bool: ...\n```\n\nDetermines if a user-agent that receives an HTTP response from domain `\u003chttp_domain\u003e`\nwith `Set-Cookie` headers with parameter `Domain=\u003ccookie_domain\u003e` should allow\nthat cookie to be set.  This disallows cookies from being set on public suffixes\nand on domains that the HTTP domain has no authority over.\n\nThis is the same mechanism that modern browsers use to determine whether it's safe\nto set a cookie to prevent 'super-cookies'.\n\n## License\n\nMPL-2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsethmlarson%2Fpsl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsethmlarson%2Fpsl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsethmlarson%2Fpsl/lists"}