Does IPython have a web server mode to run code submitted through REST APIs? I couldn't find any info on this. Are there any alternatives to this?
My use case is similar to an online interpreter, but I want the code to run on the machine where the server is running (to be able to import packages and modules, and use file that are in the server's PATH).
If not, how do I get started on building one? The places where I need help are:
- How to execute the python code I get through the API in the server? Do I just use
exec
or is there a better way to do this? - How do I isolate different scripts? If two scripts are running in the server, they should not interfere with each other (for example, if both scripts have a variable with the same name, they should be isolated and should not be considered as the same variable which not be the case if I use
exec
).