Using PyMiniRacer, I would be able to use Python objects in Javascript; using the PyV8 library:
import PyV8 class Scop