Move Rascal API routes to api.py, add Python file creation