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 PyHacks, Net
if __name__ == "__main__":
net = Net()
def handle_item(item):
host = item.get("host")
url = item.get("url")
replied_to_ping = net.reply_to_ping(host)
ip = net.resolve(host)
item.set("Reply To Ping", replied_to_ping)
item.set("ip", ip)
hacks.logger.green("{} {} {}".format(host, replied_to_ping, ip))
hacks.exporter.put(item)
return True
hacks = PyHacks(handle_item, 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.14.tar.gz
(5.6 kB
view hashes)