Registry / devops / salt
library3007.14pypypi✓ verified 84d ago

Salt (also known as SaltStack) is a Python-based open-source configuration management and remote execution system. Current version: 3007.14. Release cadence: approximately every 6 months with long-term support (LTS) releases every 2-3 years. It supports parallel execution of commands, state management, and event-driven automation across thousands of systems.

pip install salt
INSTALL
IMPORT
SIG · SALT
S
salt
devopspythonv3007.14
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

client
import salt.client
from salt import client
salt.client is a module, not a direct import; use 'import salt.client' then access salt.client.LocalClient
config
import salt.config
from salt.config import opts
Use import for namespacing; avoid importing internal attributes directly
wheel
import salt.wheel
from salt import wheel
wheel is a submodule, import with full path

Basic usage: load configuration and execute a remote command on all minions.

import salt.client import salt.config # Load minion config (replace with your own config path) opts = salt.config.minion_config('/etc/salt/minion') # Create a local client for running commands client = salt.client.LocalClient() # Run a test.ping on all minions result = client.cmd('*', 'test.ping') print(result)
salt --version
Debug
Known issues
deprecatedsalt.client.LocalClient() without arguments defaults to loading minion config from default locations, which may cause issues. Pass opts explicitly.
fix
Load config with salt.config.minion_config('/etc/salt/minion') or minion_config(None) and pass to LocalClient.
affects: >=3000
breakingStarting from Salt 3006, the 'salt.runner' and 'salt.wheel' APIs changed. Direct use of run() or wheel() may fail.
fix
Use salt.runner.RunnerClient or salt.wheel.WheelClient with explicit client initialization.
affects: >=3006
gotchaSalt's 'grains' and 'pillar' are lazy-loaded. Accessing them before minion startup may yield incomplete data.
fix
Ensure minion is fully connected before querying grains/pillar, or use the ready grain.
affects: all
deprecatedThe 'salt.cloud' module is deprecated in favor of salt-kubevirt and cloud plugins. Direct import of salt.cloud may stop working.
fix
Use salt-cloud CLI or install cloud provider-specific packages.
affects: >=3007
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'salt'
Salt is not installed or the environment is misconfigured.
fix
Run 'pip install salt' and ensure your Python interpreter includes the installed package.
AttributeError: module 'salt' has no attribute 'client'
Importing 'salt' alone does not load submodules; need explicit import.
fix
Use 'import salt.client' instead of 'import salt'.
salt.client.LocalClient() TypeError: __init__() got an unexpected keyword argument 'mopts'
Old API usage with keyword argument 'mopts' (deprecated).
fix
Use 'opts' parameter: LocalClient(opts=...).
Failed to load pillar: pillar_roots not defined
Missing or misconfigured pillar_roots in master config.
fix
Add 'pillar_roots: {base: /srv/pillar}' to /etc/salt/master.
Upgrade
Version history
3007.14latest on PyPI · released Apr 29, 2026
Audit
Dependencies
msgpackrequiredRequired for message serialization
PyYAMLrequiredParsing YAML configuration files
Jinja2requiredTemplate rendering for state files
Agent activity
35 hits · last 30 days
node
30
OpenAI (training)
1
Resources
salt — pip install salt · libregistry