Python module to query data structures