Ease developers to use queue/threads functions to handle big amount of data
Project description
pyhacks
Python module to ease writing scripts go over big amount of data in order to perform the same actions. A simple preconfigured threads and queue management and more hacking utils
Will elaborate more when it will get mature enough :)
code example
from pyhacks import Net, PyHacks
if __name__ == "__main__":
net = Net()
def handleItem(item):
try:
host = item.get("host")
repliedToPing = net.replyToPing(host)
ip = net.resolve(host)
item.set("Reply To Ping", repliedToPing)
item.set("ip", ip)
hacks.logger.green("{} {} {}".format(host, repliedToPing, ip))
hacks.exporter.put(item)
except:
pass
return True
hacks = PyHacks(handleItem, 25, "output.csv")
hosts = hacks.parse.csv("ips.csv")
for host in hosts:
hacks.qt.put(host)
hacks.finish()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyhacks-1.0.10.tar.gz
(5.2 kB
view hashes)