A python-based retrieval toolkit