Serverless Devs 开发者工具 - Python 安装包(自动安装最新版本)
Project description
Serverless Devs - Python 安装包
通过 Python pip 安装 Serverless Devs 开发者工具(自动安装最新版本)。
特性
- ✅ 自动安装最新版 Serverless Devs
- ✅ 自动处理 Node.js 环境依赖
- ✅ 支持 Windows、Linux、macOS
- ✅ 一键安装,开箱即用
安装
使用 pip 安装
pip install serverless-devs
使用国内镜像加速
pip install serverless-devs -i https://pypi.tuna.tsinghua.edu.cn/simple
安装过程会自动:
- 下载并安装 Serverless Devs 官方安装脚本
- 自动检测并安装 Node.js(如果需要)
- 安装最新版本的 Serverless Devs
使用
安装完成后,可以直接使用 s 命令:
# 查看版本
s --version
# 查看帮助
s --help
# 配置密钥
s config add
# 初始化项目
s init
# 部署项目
s deploy
手动安装/重新安装
如果自动安装失败,或需要重新安装最新版本:
s-install
卸载
pip uninstall serverless-devs
注意:这只会卸载 Python 包装器,不会卸载 Serverless Devs 本身。 如需完全卸载,请手动删除 Serverless Devs:
- Linux/macOS:
rm -rf ~/.s- Windows: 删除
C:\Users\<用户名>\.s目录
支持的平台
- ✅ Windows (x64)
- ✅ Linux (x64)
- ✅ macOS (x64/arm64)
环境要求
- Python 3.7+
- 互联网连接(用于下载安装脚本)
工作原理
本包通过 pip 安装后,会执行 Serverless Devs 官方安装脚本:
curl -o- -L https://cli.serverless-devs.com/install.sh | bash
该脚本会:
- 检测系统环境
- 自动安装 Node.js(如果需要)
- 通过 npm 安装最新版 Serverless Devs
常见问题
Q: 安装失败怎么办?
A: 请尝试以下方法:
# 1. 手动运行安装
s-install
# 2. 使用国内镜像
export NPM_REGISTRY=https://registry.npmmirror.com
s-install
# 3. 直接使用官方安装脚本
curl -o- -L https://cli.serverless-devs.com/install.sh | bash
Q: 如何更新到最新版本?
A: 重新运行安装命令:
s-install
或使用 npm:
npm update -g @serverless-devs/s
Q: 如何查看安装的版本?
A: 运行:
s --version
Q: Windows 下 PowerShell 执行策略问题
A: 如果遇到执行策略限制,请以管理员身份运行 PowerShell 并执行:
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
相关链接
- 官方网站: https://www.serverless-devs.com/
- GitHub: https://github.com/Serverless-Devs/Serverless-Devs
- 文档中心: https://docs.serverless-devs.com/
- 应用中心: https://registry.serverless-devs.com/
- 钉钉交流群: 33947367
License
MIT License
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
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 serverless_devs-1.0.2.tar.gz.
File metadata
- Download URL: serverless_devs-1.0.2.tar.gz
- Upload date:
- Size: 10.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
05c6211ee4bb886f9d009e51725eda1c95f1745e113d40cd0b1968cfa42f1490
|
|
| MD5 |
7082c9ca658c9f78ea155762e5909573
|
|
| BLAKE2b-256 |
79fe44cbaa17677094127c4d53818bdd5b1a37380c3cf64790ad8a27d67d3fd1
|
File details
Details for the file serverless_devs-1.0.2-py3-none-any.whl.
File metadata
- Download URL: serverless_devs-1.0.2-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e04aa3ef4f068542682c2ff0e6c620571b8d6b2f53eb230f6304a1e2bf84c599
|
|
| MD5 |
34d006f4b5350f941a2617883158cfca
|
|
| BLAKE2b-256 |
d6b73ee5f7a7f63c2000c59823f2eeaa52d6326271e59f6ff45a4c565c6e12c3
|