{"id":34072856,"url":"https://github.com/y-bar/netcleanser","last_synced_at":"2026-04-02T01:02:01.045Z","repository":{"id":51096222,"uuid":"366351497","full_name":"y-bar/netcleanser","owner":"y-bar","description":"The library makes parsing and manipulation of URL🌐 and  Email address📧 easy.","archived":false,"fork":false,"pushed_at":"2021-05-24T07:06:56.000Z","size":41,"stargazers_count":3,"open_issues_count":3,"forks_count":1,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-12-16T09:24:31.825Z","etag":null,"topics":["data-preprocessing","email-to-domain","python","url-parsing","url-verifier"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/y-bar.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}},"created_at":"2021-05-11T11:04:09.000Z","updated_at":"2023-03-03T01:00:23.000Z","dependencies_parsed_at":"2022-09-26T16:30:56.163Z","dependency_job_id":null,"html_url":"https://github.com/y-bar/netcleanser","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/y-bar/netcleanser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/y-bar%2Fnetcleanser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/y-bar%2Fnetcleanser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/y-bar%2Fnetcleanser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/y-bar%2Fnetcleanser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/y-bar","download_url":"https://codeload.github.com/y-bar/netcleanser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/y-bar%2Fnetcleanser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31293631,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T21:15:39.731Z","status":"ssl_error","status_checked_at":"2026-04-01T21:15:34.046Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["data-preprocessing","email-to-domain","python","url-parsing","url-verifier"],"created_at":"2025-12-14T08:26:26.403Z","updated_at":"2026-04-02T01:02:01.007Z","avatar_url":"https://github.com/y-bar.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# netcleanser\n\nThe library makes parsing and manipulation of URL🌐 and Email address📧 easy.\n\n[![ci](https://github.com/y-bar/netcleanser/actions/workflows/ci.yml/badge.svg)](https://github.com/y-bar/netcleanser/actions/workflows/ci.yml)\n[![license](https://img.shields.io/github/license/y-bar/netcleanser.svg)](https://github.com/y-bar/netcleanser/blob/master/LICENSE)\n[![release](https://img.shields.io/github/release/y-bar/netcleanser.svg)](https://github.com/y-bar/netcleanser/releases/latest)\n[![python-version](https://img.shields.io/pypi/pyversions/netcleanser.svg)](https://pypi.org/project/netcleanser/)\n[![pypi](https://img.shields.io/pypi/v/netcleanser?color=%2334D058\u0026label=pypi%20package)](https://pypi.org/project/netcleanser)\n\n## Install\n\n```bash\npip install netcleanser\n```\n\n## How to use\n\n### Email \n\n```python\n\u003e\u003e\u003e from netcleanser import Email\n\u003e\u003e\u003e email = Email('shinichi.takayanagi@gmail.com')\n\u003e\u003e\u003e email.domain\n'gmail.com'\n\u003e\u003e\u003e email.local_part\n'shinichi.takayanagi'\n\u003e\u003e\u003e email.is_valid\nTrue\n\u003e\u003e\u003e email.value\n'shinichi.takayanagi@gmail.com'\n```\n\nThis `Email` class is `settable` and `dictable`\n```python\n# As a dict key\n\u003e\u003e\u003e x = {email: 1}\n\u003e\u003e\u003e x[email]\n1\n# As elemtns of set\n\u003e\u003e\u003e email2 = Email(\"nakamichiworks@gmail.com\")\n\u003e\u003e\u003e {email, email, email, email2, email2}\n{Email(value='nakamichiworks@gmail.com)', Email(value='shinichi.takayanagi@gmail.com)'}\n```\n\n`Email.build()` allows you to create dummy email address specifing the only part of `local_part` or `domain`\n\n```python\n\u003e\u003e\u003e Email.build(local_part = \"hoge\")\nEmail(value='hoge@dummy.com)'\n\u003e\u003e\u003e Email.build(domain = \"hoge.com\")\nEmail(value='dummy@hoge.com)'\n```\n\n### Url\n\n```python\n\u003e\u003e\u003e from netcleanser import Url\n\u003e\u003e\u003e url = Url('https://www.google.com/search?q=auhuhe')\n\u003e\u003e\u003e url.scheme\n'https'\n\u003e\u003e\u003e url.host\n'www.google.com'\n\u003e\u003e\u003e url.domain\n'www.google.com'\n\u003e\u003e\u003e url.registered_domain\n'google.com'\n\u003e\u003e\u003e url.netloc\n'www.google.com'\n\u003e\u003e\u003e url.path\n'/search'\n\u003e\u003e\u003e url.query\n'q=auhuhe'\n\u003e\u003e\u003e url.is_valid\nTrue\n\u003e\u003e\u003e url.is_accessible\nTrue\n\u003e\u003e\u003e url.value\n'https://www.google.com/search?q=auhuhe'\n\u003e\u003e\u003e str(url)\n'https://www.google.com/search?q=auhuhe'\n\u003e\u003e\u003e url.contains_www\nTrue\n\u003e\u003e\u003e url.remove_query()\nUrl(host='www.google.com', username='None', password='None', scheme='https', port='None', path='/search', query='', fragment='')\n\u003e\u003e\u003e url.remove_www()\nUrl(host='google.com', username='None', password='None', scheme='https', port='None', path='/search', query='q=auhuhe', fragment='')\n```\n\nThis `Url` class is `settable` and `dictable`\n```python\n\u003e\u003e\u003e x = {url: 123}\n\u003e\u003e\u003e x[Url('https://www.google.com/search?q=auhuhe')]\n123\n\u003e\u003e\u003e {url, url, Url('https://google.com'), url}\n{Url(host='www.google.com', username='None', password='None', scheme='https', port='None', path='/search', query='q=auhuhe', fragment=''), Url(host='google.com', username='None', password='None', scheme='https', port='None', path='', query='', fragment='')}\n```\n\n## Thanks\n`Url` class strongly depends on awesome [purl](https://github.com/codeinthehole/purl) package, thanks!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fy-bar%2Fnetcleanser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fy-bar%2Fnetcleanser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fy-bar%2Fnetcleanser/lists"}