You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Some other python library shares the same objective ? #159
it is stable and wide open functional project
Is there anyone else who knows about it, and what are the ways in which this project surpasses or adds to the functions of the other already established project?
Most notably, under the hood JsPyBridge runs a separate nodejs process which is communicates with between the user's Python process. This comes with a severe performance penalty as data is copied whenever passed. PythonMonkey passes data by reference whenever possible meaning the cost of transferring information between Python and JavaScript is almost zero. Since references are copied, modifying data passed from Python into JavaScript (or vice versa) will not change the original reference.
Here is a snippet relating to the interprocess communication from their README for reference:
On the bridge to call JavaScript from Python, due to the limiatations of Python and cross-platform IPC, we currently communicate over standard error which means that JSON output in JS standard error can interfere with the bridge. The same issue exists on Windows with python. You are however very unlikely to have issues with this.
Regarding API, PythonMonkey works nicely with Python's asyncio library for running JavaScript promises giving developers a familiar experience using async and await keyword in Python whereas JsPyBridge implements its own method for this by decorating functions.
JsPyBridge is an impressive project but PythonMonkey takes a different approach and therefore has different pros and cons. For instance, at the moment PythonMonkey lacks the Node.js support JsPyBridge has out of the box (but that will change in the future as it is just in Alpha at the moment)!
Hope this helps! Thanks for checking our our project and asking this question!!! (:
Activity
wiwichips commentedon Aug 3, 2023
Hey @GabCores,
JsPyBridge (or "javascript" on pypi) is a similar project to PythonMonkey but has several differences in its implementation and API:
Most notably, under the hood
JsPyBridgeruns a separate nodejs process which is communicates with between the user's Python process. This comes with a severe performance penalty as data is copied whenever passed. PythonMonkey passes data by reference whenever possible meaning the cost of transferring information between Python and JavaScript is almost zero. Since references are copied, modifying data passed from Python into JavaScript (or vice versa) will not change the original reference.Here is a snippet relating to the interprocess communication from their README for reference:
Regarding API, PythonMonkey works nicely with Python's
asynciolibrary for running JavaScript promises giving developers a familiar experience usingasyncandawaitkeyword in Python whereas JsPyBridge implements its own method for this by decorating functions.JsPyBridge is an impressive project but PythonMonkey takes a different approach and therefore has different pros and cons. For instance, at the moment PythonMonkey lacks the Node.js support JsPyBridge has out of the box (but that will change in the future as it is just in Alpha at the moment)!
Hope this helps! Thanks for checking our our project and asking this question!!! (: