skip to navigation
skip to content

Not Logged In

hallucination 0.2.15

A Python library for proxy server list management

Latest Version: 0.2.16

Prerequisites

Usage

Python invocation

To create database tables:

proxy_factory = ProxyFactory(config=dict(db_uri='sqlite:///test.db'))
proxy_factory.create_db()

To import a text file containing a proxy server list:

proxy_factory = ProxyFactory(config=dict(db_uri='sqlite:///test.db'))
proxy_factory.import_proxies('proxylist.txt')

Hallucination supports multiple database backends, as long as supported by SQLAlchemy.

proxy_factory = ProxyFactory(config=dict(db_uri='postgres://user:password@host/database'))

To make a request:

r = proxy_factory.make_request('http://github.com/suminb/hallucination')
print r.text

You may specify timeout in seconds:

r = proxy_factory.make_request('http://github.com/suminb/hallucination', timeout=5)
print r.text

Shell frontend

To create an SQLite database file:

python frontend.py -d proxy.db -c

To import a text file containing a proxy server list:

python frontend.py -d proxy.db -i proxylist.txt

To export the proxy server list to a text file:

python frontend.py -d proxy.db -x proxylist.txt

An exported file may look like the following:

http://84.42.3.3:3128
http://77.94.48.5:80
http://209.62.12.130:8118
http://159.255.160.23:8080
http://50.57.170.105:80
 
File Type Py Version Uploaded on Size
hallucination-0.2.15.tar.gz (md5) Source 2013-10-11 4KB
  • Downloads (All Versions):
  • 26 downloads in the last day
  • 239 downloads in the last week
  • 1362 downloads in the last month