How to use NPM modules inside python?

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?

  1. Rewrite the JS library in Python
  2. Run a nodejs server and use API to pass data to Python app
  3. Is there a python package to run Js libraries inside python?

Thanks