python-based implementation of ninja