Skip to main content

介绍

调用 node 执行 js ,可指定编码格式
支持异步调用,只要你调用的函数会返回结果就会正常返回

安装

pip install -U gexecjs

示例

    # run_js = RunJs(filepath='test.js')
    run_js = RunJs(content='''
        function getCookie(){
            return arguments
        }
    ''')
    result = run_js.run('getCookie', 'Gk')
    print(result)

Metadata

Release files for gexecjs 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gexecjs 0.0.5
File Size Uploaded
gexecjs-0.0.5.tar.gz 3.1 kB Details

Release files / gexecjs-0.0.5.tar.gz

Download URL gexecjs-0.0.5.tar.gz
Size 3.1 kB
Tags Source
SHA-256 checksum
How to use checksums
3275102e0a73a769c25a01261ae7f7a7b8816a2a64cb59e4f2b331d3989f2c91
BLAKE2b-256 checksum
How to use checksums
570d9dbdb44fac08df02ea01dff74898a3d6fb4bdcd7a6a15ae8a6fc0687bea1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.10

Release history Release notifications | RSS feed

This release

0.0.5 This release

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page