Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (testpypi.python.org).
Help us improve Python packaging - Donate today!

A tool to manage hosts file

Project Description

### hoste

add, remove or list mappings in hosts file

Installation

You can use pip to install this tool.

Run pip install hoste

Usage

$ running hoste without any arguments will print out the help doc.

usage: hoste [-h] [-l | -c HOSTNAME [HOSTNAME ...] | -i HOSTNAME[:IP]
               [HOSTNAME[:IP] ...] | -r HOSTNAME [HOSTNAME ...]]

add, remove or list mappings in hosts file

optional arguments:
  -h, --help            show this help message and exit
  -l, --list            Show the content of hosts file
  -c HOSTNAME [HOSTNAME ...], --check HOSTNAME [HOSTNAME ...]
                        Check if the host name existed in the host file
  -i HOSTNAME[:IP] [HOSTNAME[:IP] ...], --insert HOSTNAME[:IP] [HOSTNAME[:IP] ...]
                        Insert HOSTNAME[:IP] mappings
  -r HOSTNAME [HOSTNAME ...], --remove HOSTNAME [HOSTNAME ...]
                        Remove mapping for HOSTNAME from hosts file.

$ list content of host file

hoste -l

$ check if hostname is configured in hosts file

  • check one hostname

hoste -c hostname

  • check multiple hostnames

host -c hostname1 hostname2

it will print out the mappings for given hostnames

$ insert new mapping

  • Add single mapping

hoste -i my.local:192.1.1.3 # will insert 192.1.1.3 my.local

  • If the ip not given, it will use 127.0.0.1 by default:

hoste -i my.local # will insert 127.0.0.1 my.local

  • You can also add multiple mappings in one go.

hoste -r my.local my.local2:192.1.1.3

$ remove mapping

hoste -r my.local

A backup file will be created for every removal operation(when the hostname is existed)

Release History

Release History

This version
History Node

1.0.9

History Node

1.0.8

History Node

1.0.7

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
hoste-1.0.9-py2.py3-none-any.whl (3.9 kB) Copy SHA256 Checksum SHA256 3.5 Wheel Oct 1, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting