Python run js
Project description
pyrunjs
安装
pdm
pdm add pyrunjs
pip
pip install pyrunjs
使用示例
import pyrunjs
js_script = """function HelloWorld() { return 'Hello World!'; } """
result = pyrunjs.run_js(js_script, "HelloWorld()")
print(result) # output: Hello World!
import pyrunjs
result = pyrunjs.run_js('', "1 + 2")
print(result) # output: 3
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyrunjs-0.1.3.tar.gz
(3.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyrunjs-0.1.3.tar.gz.
File metadata
- Download URL: pyrunjs-0.1.3.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: pdm/2.21.0 CPython/3.12.7 Linux/6.5.0-1025-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
77ee288dd41759317fe4a85d2eb0c87ec4c5892ec902fdf8832d164a8f6fb484
|
|
| MD5 |
864c51177f02a0fb64bb10c2b7c69575
|
|
| BLAKE2b-256 |
ed7aad20d9a2a471f3e38bd2f75258a8acb1ca68a68ac04c682bb46d3160d00d
|
File details
Details for the file pyrunjs-0.1.3-py3-none-any.whl.
File metadata
- Download URL: pyrunjs-0.1.3-py3-none-any.whl
- Upload date:
- Size: 2.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: pdm/2.21.0 CPython/3.12.7 Linux/6.5.0-1025-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81a2a6505380aec56d66c342f04081d2b25c45f594010b8e0a7df2fdef7c2cf1
|
|
| MD5 |
b7e428e481df4d2b745d0be59523cf12
|
|
| BLAKE2b-256 |
3160b80ad9c6b4a7941fb67a7d39f2275bf739377e9d9cbf7a9fbb0c1af4a387
|