{"id":21482508,"url":"https://github.com/jonhadfield/python-hosts","last_synced_at":"2025-04-04T16:15:19.087Z","repository":{"id":32117533,"uuid":"35689983","full_name":"jonhadfield/python-hosts","owner":"jonhadfield","description":"a hosts file manager library written in python","archived":false,"fork":false,"pushed_at":"2024-07-27T20:22:03.000Z","size":542,"stargazers_count":130,"open_issues_count":4,"forks_count":32,"subscribers_count":7,"default_branch":"devel","last_synced_at":"2025-03-28T15:09:07.886Z","etag":null,"topics":["hosts","hostsfile","python"],"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/jonhadfield.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","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":"2015-05-15T18:28:17.000Z","updated_at":"2025-03-20T22:25:59.000Z","dependencies_parsed_at":"2023-11-20T21:29:15.083Z","dependency_job_id":"62608243-f3d9-4849-a7b2-182c754ee2c5","html_url":"https://github.com/jonhadfield/python-hosts","commit_stats":{"total_commits":333,"total_committers":11,"mean_commits":"30.272727272727273","dds":0.06306306306306309,"last_synced_commit":"230978ea930c59ac5be01d9f1864fbabc9b82350"},"previous_names":[],"tags_count":37,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonhadfield%2Fpython-hosts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonhadfield%2Fpython-hosts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonhadfield%2Fpython-hosts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonhadfield%2Fpython-hosts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonhadfield","download_url":"https://codeload.github.com/jonhadfield/python-hosts/tar.gz/refs/heads/devel","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247208151,"owners_count":20901570,"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":["hosts","hostsfile","python"],"created_at":"2024-11-23T12:33:58.981Z","updated_at":"2025-04-04T16:15:19.071Z","avatar_url":"https://github.com/jonhadfield.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"python-hosts\n========\n[![codecov](https://codecov.io/gh/jonhadfield/python-hosts/branch/devel/graph/badge.svg)](https://codecov.io/gh/jonhadfield/python-hosts) [![Docs](https://img.shields.io/badge/docs-latest-brightgreen.svg?style=flat)](http://python-hosts.readthedocs.org/en/latest/)\n\n\nThis is a python library for managing a hosts file. \nIt enables you to add and remove entries, or import them from a file or URL.\n\nDocumentation\n-------------\nThe docs are hosted on RTD (Read The Docs) here:  \n\u003chttp://python-hosts.readthedocs.org/en/latest/index.html\u003e.\n\nChangelog available [here](CHANGELOG.md).\n\nInstallation\n------------\npip install python-hosts\n\nExample usage\n------------\nAdding an entry to a hosts file\n\n    from python_hosts import Hosts, HostsEntry\n    hosts = Hosts(path='hosts_test')\n    new_entry = HostsEntry(entry_type='ipv4', address='1.2.3.4', names=['www.example.com', 'example'])\n    hosts.add([new_entry])\n    hosts.write()\n\nImporting a list of host entries by URL\n\n    from python_hosts import Hosts\n    hosts = Hosts(path='hosts_test')\n    hosts.import_url(url='https://gist.githubusercontent.com/jonhadfield/5b6cdf853ef629f9b187345d89157280/raw/ddfa4a069fb12bf3c1f285249d44922aeb75db3f/hosts')\n    hosts.write()\n\nCLI\n---\nA command line client using python-hosts can be found here: https://github.com/jonhadfield/hostman\n\n\nRequirements\n------------\n\nTested on python 2.7, 3.5, 3.6, 3.7, 3.8, 3.9, pypy and pypy3\n\n\nLicense\n-------\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonhadfield%2Fpython-hosts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonhadfield%2Fpython-hosts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonhadfield%2Fpython-hosts/lists"}