Execution of code on a server can create some problem, like stolen or destruction of not owned data.
One solution is sandboxing, some python package can be used for that :
Interest stackexchange question https://programmers.stackexchange.com/questions/191623/best-practices-for-execution-of-untrusted-code
There was an error while loading. Please reload this page.