Block
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.
Installing
It is possible to install Block using the Python package manager, pip:
$ pip install block-hosts
Usage
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-hosts block-all
and to unblock, run:
$ block-hosts unblock-all
To block a profile of web sites, such as "social" or "news", run:
$ block-hosts block-profile PROFILE_NAME
and to unblock, run:
$ block-hosts unblock-profile PROFILE_NAME
To block a single web site, run:
$ block-hosts 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-hosts 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.
Metadata
Release files for block-hosts 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| block_hosts-0.0.3.tar.gz | 5.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| block_hosts-0.0.3-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 10.7 kB
Release files / block_hosts-0.0.3.tar.gz
| Download URL | block_hosts-0.0.3.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4f5c6f9e246093d0f0f4cf12b7688c2fc5abe66c1467d4677e3a57fea922cfa1
|
|
BLAKE2b-256 checksum How to use checksums |
1640402aac2e7136f653d590b06fc86a0414dcdaa3908e68545332ab1e6f2f9b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.3
|
Release files / block_hosts-0.0.3-py2.py3-none-any.whl
| Download URL | block_hosts-0.0.3-py2.py3-none-any.whl |
|---|---|
| Size | 5.5 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
759bfba4695408a437b792c86ac181c4e75cd958ecae8dfef2c717ca19738d7c
|
|
BLAKE2b-256 checksum How to use checksums |
ccea4def73795ecf94d6d5b691d13f73468e4e7780c2735b2627ccf7033b1b5c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.3
|
Security for block-hosts 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.