Skip to content

Serverless-Devs/Serverless-Devs-Python

Repository files navigation

Serverless Devs - Python Package

PyPI version Python Versions License GitHub stars

简体中文 | English

Install Serverless Devs developer tools via Python pip (automatically installs the latest version).

Features

  • ✅ Automatically installs the latest version of Serverless Devs
  • ✅ Automatically handles Node.js environment dependencies
  • ✅ Supports Windows, Linux, macOS
  • ✅ One-click installation, ready to use
  • 🌍 Supports domestic mirror acceleration

Installation

Install via pip

pip install serverless-devs

Use domestic mirror for acceleration

# China mirror
pip install serverless-devs -i https://pypi.tuna.tsinghua.edu.cn/simple

The installation process will automatically:

  1. Download and run the official Serverless Devs installation script
  2. Detect and install Node.js (if needed)
  3. Install the latest version of Serverless Devs

Usage

After installation, you can use the s command directly:

# Check version
s --version

# View help
s --help

# Configure credentials
s config add

# Initialize project
s init

# Deploy project
s deploy

Manual Installation/Reinstallation

If automatic installation fails or you need to reinstall the latest version:

s-install

Use domestic mirror:

# Linux/macOS
export USE_MIRROR=1
s-install

# Windows CMD
set USE_MIRROR=1
s-install

# Windows PowerShell
$env:USE_MIRROR=1
s-install

Uninstallation

pip uninstall serverless-devs

Note: This only uninstalls the Python wrapper, not Serverless Devs itself. To completely uninstall, manually delete Serverless Devs:

  • Linux/macOS: rm -rf ~/.s
  • Windows: Delete C:\Users\<username>\.s directory

Supported Platforms

  • ✅ Windows (x64)
  • ✅ Linux (x64)
  • ✅ macOS (x64/arm64)

Requirements

  • Python 3.7+
  • Internet connection (for downloading installation script)

How It Works

After installing via pip, this package executes the official Serverless Devs installation script:

curl -o- -L https://cli.serverless-devs.com/install.sh | bash

The script will:

  1. Detect system environment
  2. Automatically install Node.js (if needed)
  3. Install the latest version of Serverless Devs via npm

Troubleshooting

Q: Installation failed?

A: Try these solutions:

# 1. Run installation manually
s-install

# 2. Use domestic mirror
export USE_MIRROR=1  # Linux/macOS
s-install

# 3. Use official installation script directly
curl -o- -L https://cli.serverless-devs.com/install.sh | bash

Q: How to update to the latest version?

A: Rerun the installation command:

s-install

Or use npm:

npm update -g @serverless-devs/s

Q: How to check the installed version?

A: Run:

s --version

Q: PowerShell execution policy issue on Windows

A: Run PowerShell as administrator and execute:

Set-ExecutionPolicy RemoteSigned -Scope CurrentUser

Links

License

MIT License

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages