I have a python django application. And I need to use some functions from an npm library in my django application.
This is how the javascript code looks like:
const { signLimitOrder } = require("@sorare/crypto");
return JSON.stringify(signLimitOrder(privateKey, limitOrder))
How do I use signLimitOrder function from my django python application? What is the standard procedure to solve this problem?
- Rewrite the JS library in Python
- Run a nodejs server and use API to pass data to Python app
- Is there a python package to run Js libraries inside python?
Thanks