pulsectl
Python high-level interface and ctypes-based bindings for PulseAudio (libpulse)
What it is and what it does
pulsectl is a ctypes-based wrapper around PulseAudio's libpulse C library, exposing mixer-like controls and introspection operations through a blocking, synchronous Python API. It lets you query and manipulate audio devices (sinks, sources, cards), adjust per-channel volume, set default devices, and listen for server state changes—all without submitting audio samples or managing playback directly.
The module represents audio objects as thin wrappers around C structs (e.g., PulseSinkInfo, PulseVolumeInfo) and exposes most operations as methods on a Pulse client instance. Volume is handled as a list of per-channel floats in a 0–65536 range, with 1.0 representing normal level and >1.0 for software boost. For async use cases, the maintainer recommends pulsectl-asyncio instead.
Use it for:
- Build a volume control CLI or GUI tool that adjusts sink/source levels and switches default devices.
- Monitor PulseAudio server events (device additions, removals, property changes) in a synchronous event loop.
- Automate audio routing and profile switching across multiple sound cards and HDMI outputs.
- Integrate PulseAudio control into a larger audio application without managing low-level C bindings.
- Query audio device properties and capabilities (channel maps, profiles, proplist metadata) for diagnostics.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides a high-level Python interface to PulseAudio's libpulse library for synchronous control of audio devices, sinks, sources, and volume management.
Yes, if you need synchronous PulseAudio control on Linux and can accept dormant maintenance. The package is stable (MIT licensed, no known vulnerabilities, low install friction), but has not been actively developed for over 1.5 years. Use it for straightforward mixer tasks; for async patterns or active development, evaluate pulsectl-asyncio or direct libpulse bindings instead.
Install
pulsectl on PyPI
pip
pip install pulsectluv
uv add pulsectlpoetry
poetry add pulsectlInstalling pulsectl
Before you install
Low friction installation with no runtime dependencies. Maintenance is dormant (596 days since last release), though the repository remains active with a recent commit on 2024-12-26 and modest community interest (180 stars).
License in practice
MIT license permits unrestricted use, modification, and distribution with minimal restrictions—suitable for both open-source and proprietary projects.
Quickstart
import pulsectl
with pulsectl.Pulse('my-app') as pulse:
for sink in pulse.sink_list():
pulse.volume_change_all_chans(sink, 0.1)
Requires PulseAudio server running and libpulse library installed on the system; Linux/POSIX only.
Verify before relying
- Whether Python 2 support (listed in classifiers) is actively maintained or tested in recent releases.
- Current state of async support via pulsectl-asyncio and whether it is the recommended path for new projects.
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | dormant — 596 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 164,916/month — #10,535 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pulsectl-24.12.0-py2.py3-none-any.whl
Keywords: pulseaudio, libpulse, pulse, pa, bindings, sound, audio, ctypes, control, mixer, volume, mute, source, sink
Tags
More Multimedia packages
MoviePy is a Python library for video editing…
permissive · top 5,000 on PyPI
tinytagReads metadata (artist, title, duration,…
permissive · top 5,000 on PyPI
xhtml2pdfConverts HTML and CSS to PDF documents using…
permissive · top 5,000 on PyPI
ffmpyffmpy is a Python wrapper around FFmpeg that…
permissive · top 5,000 on PyPI
piexifPiexif reads, writes, and manipulates EXIF…
permissive · top 5,000 on PyPI
torch-audiomentationsProvides PyTorch-native audio data augmentation…
permissive · top 5,000 on PyPI
pycawPycaw provides programmatic control of Windows…
unclear · top 15,000 on PyPI
sonos-websocketAsync Python library for communicating with…
permissive · top 15,000 on PyPI
python-oscpython-osc implements Open Sound Control (OSC)…
unclear · top 15,000 on PyPI
pydubPydub provides a high-level Python interface…
permissive · top 5,000 on PyPI
python-songpalPython library for controlling Sony audio…
copyleft · top 15,000 on PyPI
SoundCardSoundCard plays and records audio across Linux,…
permissive · top 15,000 on PyPI
pyfmodexPyfmodex provides Python bindings to the FMOD…
permissive · top 15,000 on PyPI
miniaudioMiniaudio provides Python bindings for…
permissive · top 15,000 on PyPI
python-vlcPython ctypes-based bindings to libvlc that let…
copyleft · top 15,000 on PyPI