Block `pip install` but not pypi search/documentation

Solution for Block `pip install` but not pypi search/documentation
is Given Below:

I have configured a proxy for PyPI (which uses a security service to vet module requests). I want to block direct access to downloads at the network firewall without affecting pypi.org’s usefulness as a search and documentation destination. Is there a way to block just the module download requests generated by pip install?