pydub-stubs
Stub-only package containing type information for pydub
What it is and what it does
Pydub-stubs is a type stub package that adds static type information to Pydub, the Python audio processing library. It works alongside Pydub to enable type checkers and IDEs to understand Pydub's API, providing autocompletion and catching type errors at development time rather than runtime. The stubs cover Pydub's public interface and some undocumented functions, including AudioSegment methods, effects, generators, and utility modules.
You install it as a companion to Pydub itself—it contains no runtime code, only type definitions. It depends only on typing-extensions and supports Python 3.9 through 3.13. The package is maintained to track Pydub releases, with recent fixes addressing function signatures and method availability on AudioSegment.
Use it for:
- Add type checking to audio processing scripts that use Pydub, catching parameter mismatches before runtime.
- Enable IDE autocompletion and inline documentation for Pydub methods while editing code.
- Validate Pydub usage in a typed codebase that enforces strict type checking.
- Document expected parameter types and return values for Pydub operations in team projects.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides type stubs for Pydub, enabling static type checking and IDE autocompletion when working with Pydub's audio processing library.
Yes, if you use Pydub and want static type checking. Install it alongside Pydub to gain IDE support and type safety with minimal friction. The aging maintenance status is a minor concern but acceptable for a stable type stub that tracks a mature library. No security vulnerabilities and permissive licensing make it a low-risk addition.
Install
pydub-stubs on PyPI
pip
pip install pydub-stubsuv
uv add pydub-stubspoetry
poetry add pydub-stubsInstalling pydub-stubs
Before you install
Low install friction with a single lightweight runtime dependency (typing-extensions). Repository shows aging maintenance but remains active with no archived status; suitable for projects already using Pydub that need type safety.
License in practice
ISC license is permissive and poses no restrictions on use, modification, or distribution in commercial or private projects.
Quickstart
pip install pydub-stubs
from pydub import AudioSegment
audio = AudioSegment.from_file("file.mp3")
Requires Pydub itself to be installed separately; type stubs alone do not provide audio functionality.
Verify before relying
- Whether type coverage extends to all Pydub modules or only the public API as stated
- Compatibility guarantees with Pydub versions other than 0.25.1
- How frequently the stubs are updated relative to new Pydub releases
Package facts
| License | ISC (permissive) |
| Python support | supports the current Python release (<4.0,>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — typing-extensions |
| Maintenance | aging — 490 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 109,940/month — #12,492 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pydub_stubs-0.25.1.6-py3-none-any.whl
Keywords: pydub, types, typing, stubs
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
pydubPydub provides a high-level Python interface…
permissive · top 5,000 on PyPI
pymupdf-stubsProvides type stubs for PyMuPDF to enable…
permissive · top 15,000 on PyPI
types-pyaudioProvides type hints for the pyaudio library,…
permissive · top 15,000 on PyPI
types-pikaProvides type stubs for the Pika RabbitMQ…
permissive · top 15,000 on PyPI
grpc-stubsProvides type stubs for gRPC Python, enabling…
permissive · top 5,000 on PyPI
homeassistant-stubsProvides PEP 484 type stubs for Home Assistant…
permissive · top 15,000 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
miniaudioMiniaudio provides Python bindings for…
permissive · top 15,000 on PyPI
google-api-python-client-stubsProvides type stubs for…
permissive · top 5,000 on PyPI
sqlalchemy-stubsProvides type stubs and a mypy plugin to enable…
permissive · top 5,000 on PyPI