Skip to content

Some other python library shares the same objective ? #159

Closed

Description

@GabCores

Describe your feature request here.

Hi , I have beeb working with this library for a while
https://pypi.org/project/javascript/

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?

Thanks in advance

Code example

No response

Activity

  1. wiwichips commented on Aug 3, 2023

    @wiwichips
    Collaborator

    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 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!!! (:

  2. locked and limited conversation to collaborators on Aug 3, 2023
  3. converted this issue into a discussion #160 on Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions