Skip to main content

Block helps you stop procrastinating, since you can't do it by yourself. It is a simple command-line utility that relies on modifying the hosts file.

Project description


PyPI Code style: black

Block is a simple Python-based command line utility for blocking access to web-sites in order to stop you from procrastinating, because you can't do it by yourself. Relies on modifying the hosts file.


Under construction.


The simplest and most common usage of Block is to block all sites in a curated list. To do this, run the following command in the console:

$ block curated

and to unblock, run:

$ block unblock

To block a single web site, run:

$ block website_url

where website_url refers to, you guessed it, the URL of the website you want to block. To reverse the action, run

$ block unblock website_url

Note: modifying the hosts file requires administrator privileges, so make sure that the terminal is in elevated mode.

Another note: you might need to restart the browser for changes to take effect.

Project details

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
block_hosts-0.0.2-py2.py3-none-any.whl (4.3 kB) Copy SHA256 hash SHA256 Wheel py2.py3
block_hosts-0.0.2.tar.gz (3.9 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page