$npx skillfedfor your agent

python-hosts

A hosts file manager library written in python

With conditionsPyPI SystemReleased Jun 2025184.1K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — python_hosts-1.1.2-py2-none-any.whl
v1.1.2 · released 2025-06-24

Yes, if you need programmatic hosts file management. The package is stable (Production/Stable status), has no dependencies, and carries a permissive MIT license. However, the aging maintenance status (416 days since last release) means you should verify compatibility with your Python version before relying on it for critical automation.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Low install friction with no runtime dependencies.
  • Maintenance status is aging—last release was 416 days ago, though the repository remains active with a recent commit on 2025-08-11.

License · maintenance · safety

MIT (permissive) — MIT license (permissive) means you can use, modify, and distribute this package freely with minimal restrictions.

last release 2025-06-24 (416 days) · last repo commit 2025-08-11 · 133 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 184,078 downloads/mo, #10,046 on PyPI

Verify before relying

pip install python-hosts

from python_hosts import Hosts, HostsEntry
hosts = Hosts(path='hosts_test')
entry = HostsEntry(entry_type='ipv4', address='1.2.3.4', names=['www.example.com'])
hosts.add([entry])
hosts.write()
  • Whether the package still works reliably on modern Python 3 versions given the aging maintenance status and lack of explicit requires_python specification.
Same gist for agents: .md · .json

What it is and what it does

python-hosts is a library for programmatic manipulation of the system hosts file. It lets you create, add, remove, and query hostname-to-IP mappings without manually editing the file, and supports importing entries from files or URLs. The library has no runtime dependencies and works as a pure Python module.

It's designed for system administrators and automation scripts that need to manage network hostname resolution at the OS level. You instantiate a Hosts object pointing to a hosts file, manipulate entries using HostsEntry objects, and write changes back to disk. The package remains compatible with Python 2.7 and modern Python 3 releases, though it has not seen a release in over a year.

Use it for

  • Automate adding or removing hostname entries in CI/CD pipelines or deployment scripts.
  • Bulk import hosts from a remote URL or file to synchronize local DNS resolution.
  • Query the hosts file programmatically to check if a hostname or IP already exists before making changes.
  • Merge new hostname aliases with existing entries without overwriting the entire hosts file.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need programmatic hosts file management.

The package is stable (Production/Stable status), has no dependencies, and carries a permissive MIT license. However, the aging maintenance status (416 days since last release) means you should verify compatibility with your Python version before relying on it for critical automation.

Install

python-hosts on PyPI

Before you install

Low install friction with no runtime dependencies. Maintenance status is aging—last release was 416 days ago, though the repository remains active with a recent commit on 2025-08-11.

License in practice

MIT license (permissive) means you can use, modify, and distribute this package freely with minimal restrictions.

Quickstart

pip install python-hosts

from python_hosts import Hosts, HostsEntry
hosts = Hosts(path='hosts_test')
entry = HostsEntry(entry_type='ipv4', address='1.2.3.4', names=['www.example.com'])
hosts.add([entry])
hosts.write()

Verify before relying

  • Whether the package still works reliably on modern Python 3 versions given the aging maintenance status and lack of explicit requires_python specification.

Package facts

LicenseMIT permissive
Python supportNot specified
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceAging 416 days since the last release
Last repo commit
First released
Downloads184,078 / month, #10,046 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: System AdministratorsLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: PythonTopic :: System :: NetworkingTopic :: System :: Operating System

Evidence: python_hosts-1.1.2-py2-none-any.whl

Tags

Capabilities
hosts file managementadd remove hosts entrieshosts file parsernetwork hostname mappinghosts file automation
Topics
system-administrationnetwork-configuration
PyPI keywords
hostspythonnetwork

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “hosts file management”

  • python-hostsManages hosts file entries programmatically—add, remove, import, and…
  • sshconfsshconf reads and modifies SSH config files while preserving their…
  • tinynetrcRead, parse, and write .netrc credential files with dictionary-style…

Give your agent the search over MCP, or paste the wish link into any chat.

More System packages

filelock Worth it
PyPI · Libraries · released Aug 2026

Provides a platform-independent file locking mechanism to coordinate access to files across processes and threads.

MITpure Python · 3.10+
717.1Mdownloads / mo
distro Worth it
PyPI · Python Modules · released Dec 2023

Distro provides a reliable, machine-readable API to query the Linux or BSD distribution name, version, codename, and other OS platform details, replacing Python's deprecated `platform.linux_distribution` function.

Install it if you need to detect or report the Linux/BSD distribution your code runs on.

Apache-2.0pure Python · 3.6+
417.9Mdownloads / mo
psutil Worth it
PyPI · Libraries · released Jan 2026

psutil retrieves real-time information about running processes and system resources (CPU, memory, disks, network, sensors) across multiple operating systems, enabling system monitoring, process profiling, and resource management.

permissive licensecompiled wheel · 3.6+
387.6Mdownloads / mo
pexpect With conditions
PyPI · Software Development · released Nov 2023

Pexpect spawns and controls interactive console applications by sending input and matching output patterns, automating tasks that would otherwise require manual interaction.

ISCpure Pythonaging
200.8Mdownloads / mo
aiofile Worth it
PyPI · Libraries · released Aug 2026

Provides asynchronous file I/O operations for asyncio programs, with automatic selection of the best available backend (io_uring, libaio, thread-based, or pure Python) depending on your system.

Apache-2.0pure Python · 3.11+
75.4Mdownloads / mo
portalocker Worth it
PyPI · Libraries · released Aug 2026

Portalocker provides cross-platform file locking with support for exclusive and shared locks, plus Redis-based distributed locks and process-aware PID file locking.

Install it if you need file or process coordination; the optional extras (pywin32, redis) are only required for specific lock types.

BSD-3-Clausepure Python · 3.10+
65.1Mdownloads / mo

See also aiodiscover · netaddr · ipaddress · contentful_management · IP2Location · ipaddr · multiping · dnslib · icmplib · IPy