GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Distributive-Network/pythonmonkey-examples

BranchesTags
Open more actions menu

Latest commit

 

History

18 Commits
18 Commits

Folders and files

NameName
Last commit message
Last commit date
load-wasm-from-py
load-wasm-from-py
 
 
promises
promises
 
 
require-js-file-from-py
require-js-file-from-py
 
 
require-npm-package-from-py
require-npm-package-from-py
 
 
require-npm-packages
require-npm-packages
 
 
require-py-file-from-js
require-py-file-from-js
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
function-call-eval.py
function-call-eval.py
 
 
function-passing-eval.py
function-passing-eval.py
 
 
hello-world-eval.py
hello-world-eval.py
 
 

Repository files navigation

PythonMonkey Examples

What is PythonMonkey

PythonMonkey is a Python library for executing JavaScript in Python and executing Python in JavaScript. It uses Mozilla's SpiderMonkey JavaScript Engine and shares memory with Python for fast execution.

Check out PythonMonkey on GitHub!

Installation

  • requires Python 3.8 or higher
pip install pythonmonkey

Running Examples

  • Run the examples via python3. Refer to the README.md files in each of the directories for more information.

Examples:

  • hello-world-eval.py
    • A "Hello, World" which evaluates a string in JavaScript
    • Run with python3 hello-world-eval.py
  • function-call-eval.py
    • Calling a JavaScript function in Python
    • Run with python3 function-call-eval.py
  • function-passing-eval.py
    • Calling a Python function in a JavaScript function from Python
    • Run with python3 function-passing-eval.py
  • require-js-file-from-py/
    • Loading a JavaScript module from Python
  • require-py-file-from-js/
    • Loading a Python module from JavaScript
  • require-npm-package-from-py/
    • Using an NPM package directly from Python
  • require-npm-packages/
    • Calling JavaScript code that uses NPM modules
  • load-wasm-from-py/
    • Loading a WebAssembly module in Python and calling WASM function
  • promises/
    • Using JavaScript promises in Python

Fullstack Example using CryptoJS

For a more in depth example using the CryptoJS NPM package, refer to https://github.com/Distributive-Network/PythonMonkey-Crypto-JS-Fullstack-Example.

About

No description, website, or topics provided.

Resources

Readme

Code of conduct

Code of conduct

Contributing

Contributing
Activity
Custom properties

Stars

11 stars

Watchers

2 watching

Forks

3 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.