Drop-in replacement for Pythons wave.py
Project description
newwave - drop-in replacement for wave.py
wave.py is part of python stdlib and is used for handling WAVE audio files.
I started newwave because I wanted to fix an issue where it can read
wave files which are not 'PCM Audio' such as having more than 2 channels
or more than 24 bits, but not write them with correct headers.
Also, it provides newer wave features for use with older python versions:
- Add support for bytes and path-like paths in wave.open() (python 3.15)
- fix wave.Wave_write emitting unraisable when open raises (python 3.15)
- remove deprecated setmark, getmark, getmarkers interfaces (python 3.15)
- Support for reading WAVE_FORMAT_EXTENSIBLE (python 3.12)
You can install newwave on python 3.10 or later.
This module is a drop-in replacement for wave.py - any code that works
with wave can be upgraded to use newwave by simply modifying your import.
So instead of:
import wave
f = wave.open(file, 'w')
it is now:
import newwave as wave
f = wave.open(file, 'w')
...
What is more, I will try to upstream any modification in newwave to cpython so in future python versions you can enjoy the same improvements there.
TL;DR: newwave will be a great way to have these enhancements now,
on your existing python, just by installing it from pypi using pip or uv.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file newwave-0.1.1.tar.gz.
File metadata
- Download URL: newwave-0.1.1.tar.gz
- Upload date:
- Size: 8.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d1fff4e4553af7492e5291e1872f9c98a998d2b2c04d0bfe1f7643b49f1f11dd
|
|
| MD5 |
6850a2f75cf4eb803ee5872477e4bf15
|
|
| BLAKE2b-256 |
d21d41a7cdd4100fcfdd5efc30dbae8556ecddff4ba94de3df6e9c47cf1c8d7f
|
File details
Details for the file newwave-0.1.1-py3-none-any.whl.
File metadata
- Download URL: newwave-0.1.1-py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17a04ac48c109e29ff96e809c9f0449b3d9b66d66d5bcbd1c102c4c966896947
|
|
| MD5 |
600a95e5b0311db8e9f16aad219ac383
|
|
| BLAKE2b-256 |
466db11c45ee6b803039e815269851467e8eae6be3a07488b9d93c1cb21755ae
|