Download of squid-icap-client-1.2.1-src.tgz (squid-icap-client-1.2.1-src.tgz ( external link: SF.net): 1,438,730 bytes) will begin shortly. If not so, click link on the left.
This has a Python ICAP (Internet Content Adaptation Protocol) server and IRML parser. Using this, a web proxy can do rule-based adaptation of content before delivery to clients. Has a Python proxylet API and squid-icap-client code too.