Skip to main content

I2P socket module

Project description

Requirements:

  • Python 2.7 or >= 3.4

  • Java I2P 0.9.14 and higher or i2pd 2.17.0 and higher

Installing:

pypi:

pip install i2p.socket

git:

git clone https://github.com/majestrate/i2p.socket/
cd i2p.socket
python setup.py install

Usage:

from i2p import socket

# i2p socket
sock = socket.socket()
sock.connect(("i2p-projekt.i2p", 80))
sock.send(b"GET /\r\n\r\n")
print (sock.recv(1024))
sock.close()

# also works as 'regular' socket
sock = socket.socket(socket.AF_INET)
sock.connect(("geti2p.net", 80))
sock.send(b"GET /\r\n\r\n")
print (sock.recv(1024))
sock.close()

Caveats:

  • Probably contains bugs

Project details


Download files

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

Source Distribution

i2p.socket-0.4.0.tar.gz (20.8 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page