Ensure Node.js to be installed.
Project description
ensure-node
ensure-node 是一个轻量 Python 工具库,用来确保指定版本的 Node.js 发行包就绪。
from ensure_node import ensure_node
import subprocess
# 安装指定版本的 Node.js
npx, node, npm = ensure_node("https://nodejs.org/dist/latest/node-v25.8.2-win-x64.zip")
# 使用相关工具
completed_process = subprocess.run([
str(npx),
"--version"
], capture_output=True)
print(completed_process.stdout.decode())
目前仅在 Windows 平台上测试过,可能支持 Linux 平台,不支持 MacOS 平台。
只支持 .zip / .tar.gz / .tar.xz 格式的文件。
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ensure_node-0.0.0.tar.gz
(2.1 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 ensure_node-0.0.0.tar.gz.
File metadata
- Download URL: ensure_node-0.0.0.tar.gz
- Upload date:
- Size: 2.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
942116bfdb7fc0e5c8e410e740f3cc66eb7491554940e599e145f27769232dde
|
|
| MD5 |
4250ba241085d76e34faec2a7951a961
|
|
| BLAKE2b-256 |
373873737abb3f15ca62a94b30c9dc73b6bd6e26aaf9ab0ee6a69542a89582f8
|
File details
Details for the file ensure_node-0.0.0-py3-none-any.whl.
File metadata
- Download URL: ensure_node-0.0.0-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f46745807301c5ff72c2e7fbc3b84dbae587fd82afce748140628a58050b87e6
|
|
| MD5 |
1078a8341c9d7c05c2b83d2b99a394fd
|
|
| BLAKE2b-256 |
41c9a48f06747e8ff5ab7505b0fc3fcce602ef6594fd46548adbd1b546271de1
|