File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change 1
1
# PythonMonkey Examples
2
2
3
3
## What is PythonMonkey
4
- - TODO
4
+ [ PythonMonkey] ( https://pythonmonkey.io/ ) is a Python library for executing JavaScript in Python
5
+ and executing Python in JavaScript. It uses [ Mozilla's SpiderMonkey] ( https://firefox-source-docs.mozilla.org/js/index.html )
6
+ JavaScript Engine and shares memory with Python for fast execution.
7
+
8
+ Check out [ PythonMonkey on GitHub] ( https://github.com/Distributive-Network/PythonMonkey#pythonmonkey ) !
5
9
6
10
## Installation
7
11
- requires Python 3.8 or higher
8
- ` pip install pythonmonkey `
9
- - TODO fill this out when everything is ready
12
+ ``` bash
13
+ pip install pythonmonkey
14
+ ```
15
+
16
+ ## Running Examples
17
+ - Run the examples via ` python3 ` . Refer to the README.md files in each of the directories for more information.
10
18
11
19
## Examples:
12
20
- ` hello-world-eval.py `
13
21
- A "Hello, World" which evaluates a string in JavaScript
22
+ - Run with ` python3 hello-world-eval.py `
14
23
- ` function-call-eval.py `
15
24
- Calling a JavaScript function in Python
25
+ - Run with ` python3 function-call-eval.py `
16
26
- ` function-passing-eval.py `
17
27
- Calling a Python function in a JavaScript function from Python
28
+ - Run with ` python3 function-passing-eval.py `
18
29
- ` require-js-file-from-py/ `
19
30
- Loading a JavaScript module from Python
20
31
- ` require-py-file-from-js/ `
25
36
- Calling JavaScript code that uses NPM modules
26
37
- ` load-wasm-from-py/ `
27
38
- Loading a WebAssembly module in Python and calling WASM function
39
+ - ` promises/ `
40
+ - Using JavaScript promises in Python
28
41
You can’t perform that action at this time.
0 commit comments