Total rewrite of GBE original PHP into Python with Django