Skip to main content

beep-lite 🔊

Python License: MIT PyPI version

A simple, cross-platform notification sound library for Python.

Play the same WAV audio files on Windows / macOS / Linux with a lightweight, low-dependency, and reliable solution.

日本語

✨ Features

  • Cross-platform: Windows / macOS / Linux support
  • Lightweight: No heavy dependencies like numpy (~30KB)
  • Exception-safe: Never crashes your app on playback failure
  • Non-blocking: Asynchronous playback doesn't freeze your UI
  • PyInstaller ready: Bundle into standalone executables

📦 Installation

pip install beep-lite

Optional: High-quality audio backend

pip install beep-lite[audio]

🚀 Usage

import beep_lite as beep

# Basic notifications
beep.ok()       # ✅ Success
beep.ng()       # ❌ Error / Failure
beep.warn()     # ⚠️ Warning
beep.crit()     # 🚨 Critical / Urgent

# Fun notifications
beep.moo()      # 🐄 Low frequency
beep.mew()      # 🐱 High frequency

# Scan results
beep.scan_ok()  # 📗 Scan success
beep.scan_ng()  # 📕 Scan failure

Using Sound enum

from beep_lite import play, Sound

play(Sound.OK)
play(Sound.SCAN_NG)

Preload at startup (optional)

from beep_lite import preload_all

# Call at app startup to reduce latency on first play
preload_all()

🎵 Sound List

Function Sound Enum Use Case Characteristics
ok() Sound.OK Success Bright, short, ascending
ng() Sound.NG Error Descending, slightly longer
warn() Sound.WARN Warning Two-tone alert
crit() Sound.CRIT Critical Three low tones
moo() Sound.MOO Fun (low) Low frequency sweep
mew() Sound.MEW Fun (high) High frequency sweep
scan_ok() Sound.SCAN_OK Scan success Very short, sharp
scan_ng() Sound.SCAN_NG Scan failure Low, short

🔧 Backends

The library automatically selects the best available backend:

Priority Backend OS Dependency
1 winsound Windows None (stdlib)
2 simpleaudio All pip install simpleaudio
3 terminal bell All None (fallback)

📋 Requirements

  • Python 3.10+

Additional Requirements for Linux / Raspberry Pi

To use simpleaudio with the [audio] option, you need the ALSA development library:

# Debian / Ubuntu / Raspberry Pi OS
sudo apt-get install libasound2-dev

# Then install
pip install beep-lite[audio]

Note: If installed without [audio], the library falls back to terminal bell (\a), which requires no additional packages.

🎯 Use Cases

Barcode Scanner

def on_scan(barcode: str) -> None:
    if validate(barcode):
        beep.scan_ok()
        process(barcode)
    else:
        beep.scan_ng()

Long-running Task Completion

def heavy_task() -> None:
    try:
        # Heavy processing...
        result = process_data()
        beep.ok()
    except Exception:
        beep.ng()
        raise

GUI Form Validation

def on_submit() -> None:
    if not validate_form():
        beep.warn()
        show_error("Please check your input")
        return
    save_data()
    beep.ok()

🏭 PyInstaller Usage

pyinstaller --collect-data beep_lite your_app.py

Or in your .spec file:

datas=[('path/to/beep_lite/assets', 'beep_lite/assets')]

## 📄 License

MIT License

## 📬 Links

<!-- - [PyPI](https://pypi.org/project/beep-lite/) -->
- [GitHub](https://github.com/Moge800/beep_lite)

Metadata

Release files for beep-lite 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for beep-lite 0.1.3
File Size Uploaded
beep_lite-0.1.3.tar.gz 26.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for beep-lite 0.1.3
File Interpreter ABI Platform
beep_lite-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 56.2 kB

Release files / beep_lite-0.1.3.tar.gz

Download URL beep_lite-0.1.3.tar.gz
Size 26.3 kB
Tags Source
SHA-256 checksum
How to use checksums
b5d90d7b40a1d4ef7552501c166e5da406421541433898c09b449c3f082bcb44
BLAKE2b-256 checksum
How to use checksums
f530656afd8e8248883aa13fde72a4b3cf7dc43077a50cf1b7d1a9169d9bc37f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 24, 2026.

Transparency log

Release files / beep_lite-0.1.3-py3-none-any.whl

Download URL beep_lite-0.1.3-py3-none-any.whl
Size 29.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2741156c969d5e47e7a37e105ff251cc68cb99f2b998f7b9acc7d23e418e7ca7
BLAKE2b-256 checksum
How to use checksums
63dfbf5cdcea7a62d1ded3c26830b738b042afbcda39d232ef5c2bd5080a9b4c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 24, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page