{"id":46381733,"url":"https://github.com/brainpolo/neutralise-link","last_synced_at":"2026-03-05T06:08:50.729Z","repository":{"id":163626242,"uuid":"639060168","full_name":"brainpolo/neutralise-link","owner":"brainpolo","description":"Validating, cleaning, and compactifying URLs simplified.","archived":false,"fork":false,"pushed_at":"2025-06-19T05:30:22.000Z","size":41,"stargazers_count":1,"open_issues_count":4,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-28T18:27:47.402Z","etag":null,"topics":["url-validation"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/neutralise-link","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brainpolo.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,"zenodo":null}},"created_at":"2023-05-10T17:12:28.000Z","updated_at":"2025-05-09T21:30:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"8c2fe9c0-754e-4517-94ae-1ed4ae82afd4","html_url":"https://github.com/brainpolo/neutralise-link","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/brainpolo/neutralise-link","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brainpolo%2Fneutralise-link","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brainpolo%2Fneutralise-link/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brainpolo%2Fneutralise-link/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brainpolo%2Fneutralise-link/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brainpolo","download_url":"https://codeload.github.com/brainpolo/neutralise-link/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brainpolo%2Fneutralise-link/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30111807,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T03:40:26.266Z","status":"ssl_error","status_checked_at":"2026-03-05T03:39:15.902Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["url-validation"],"created_at":"2026-03-05T06:08:50.601Z","updated_at":"2026-03-05T06:08:50.705Z","avatar_url":"https://github.com/brainpolo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# neturalise-link\n\n## What are the objectives?\n\n- Remove trackers\n- Remove referrers\n- Identify malicious intent\n- Verify URL validity\n- Improve URL load speeds\n\n## How does it work?\n\nHaving imported `neutralise-link` you may use the `neutralise` function which takes a URL string as the argument.\n\nThe function is designed to return either a string URL or None. It is recommended to\nuse the returned URL value in place of the original URL as this is the neutralised\nversion of the URL.\n\nBy default, the function will return `None` in two cases:\n\n1. The link is invalid\n2. The link is deemed malicious\n\n\u003e You may override the 2nd case by calling the function with the optional parameter, `safe=false`.\n\n\u003e You may also skip the validity check by calling the function with the optional parameter, `check_valid=false`. This is recommended if you do not need to check for URL validity as it leads to significantly faster performance, but at the potential risk of returning impure URLs (i.e. URLs that have been redirected).\n\n## Example Code\n\n```python\nfrom neutralise_link import neutralise\n\ndef main(url: str) -\u003e str:\n    \"\"\"Validate user URL input for storing.\"\"\"\n\n    url = neutralise(url=url, safe=True, check_valid=True)\n    if not url:\n        print(\"URL is malformed or malicious.\")\n    print(\"URL is safe and in its pure form.\")\n```\n\n## Contributing\n\n### Prerequisites\n\n- Have python 3.10 installed on system (e.g. using anaconda/homebrew)\n\n### Environment Setup\n\n1. Set up a virtual environment using `python -m venv venv`\n2. Activate the virtual environment using `source venv/bin/activate`\n3. Install development dependencies using `pip install -r requirements.txt`\n\n### Running tests\n\nIt is important to ensure that ALL tests pass before submitting a PR.\n\n```bash\npython -m unittest discover -s tests\n```\n\nIt is also imperative that coverage is above 90% before submitting a PR. Validate this by running:\n\n```bash\ncoverage run -m tests.test_neutralise \u0026\u0026 coverage report \u0026\u0026 coverage html\n```\n\n### Building the package\n\n1. Navigate to root directory of the project and run: `python -m build`\n\n2. Install the package found in `neutralise-link/dist/`\n   in your repo using `pip install` followed by the relative path of the `.tar.gz` package file located in the project. For example:\n\n```bash\npip install dist/neutralise_link-0.1.0.tar.gz\n```\n\n### Uploading to PyPI\n\nEnsure that the package is built and the dist directory is populated. Then run:\n\n```bash\npython -m twine upload dist/*\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrainpolo%2Fneutralise-link","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrainpolo%2Fneutralise-link","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrainpolo%2Fneutralise-link/lists"}