Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pycjs, the python caller of js based on node_vm2 #1498

Merged
merged 4 commits into from
Jan 16, 2024

Conversation

birdflyi
Copy link
Contributor

@birdflyi birdflyi commented Jan 14, 2024

Fix #1463

Purpose

  • Add a more low maintenance costs and safer python kernel to replace the old kernel python and python_v2.

Changes

  • Add Func: Add the python caller of js 'pycjs' with the node_vm2 sandbox environment.
  • Add a python kernel ipynb to call functions in the open_digger module as a simple example.

Notes

  • pycjs_node_vm.py is the core of pycjs. It can be used for other projects similar to the js2py type.
  • The parameter kwargs of function get_export_module offer many display options for the variable df_export_module, which is useful when you want to know if a function is available or to lookup the call path of the functions.
  • We need no migration of the changes to Python kernel as metioned in OpenDigger Biweekly Meeting: 2024-01-10 #1478 (comment) anymore:This kernel uses a virtual machine to run JavaScript functions, and only exposes function call handles in the sandbox.

@frank-zsy
Copy link
Contributor

All looks good, I will merge the PR first and we should encourage developers to use this new kernel lib to find out if it works fine as well.

@frank-zsy frank-zsy merged commit 6ac584f into X-lab2017:master Jan 16, 2024
1 check passed
@birdflyi
Copy link
Contributor Author

I completely agree~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Solution of implementing the Python kernel
2 participants