From Python-I2P.
Install:
python setup.py install
Use:
>>> from i2p import socket >>> s = socket.socket('Alice', socket.SOCK_STREAM) >>> s.connect('duck.i2p') >>> s.send('GET / HTTP/1.0\r\n\r\n') >>> s.recv(1000) (HTTP response from duck.i2p)
See the src/examples/ directory for more code examples.
The following modules are available:
i2p (Container package) i2p.BaseHTTPServer (Emulate Python BaseHTTPServer module) i2p.CGIHTTPServer (Emulate Python CGIHTTPServer module) i2p.eep (Retrieve eepsites) i2p.router (Manage the I2P router) i2p.select (Emulate Python select module) i2p.SimpleHTTPServer (Emulate Python SimpleHTTPServer module) i2p.socket (Send and receive across the I2P network) i2p.SocketServer (Emulate Python SocketServer module) i2p.tunnel (Exchange data between I2P and regular sockets)