uploadkit-audio
Audio validators, policies, and metadata for UploadKit.
What problem does this solve?
Codec, duration, and structural checks for audio uploads that plug into
UploadPolicy.validators without modifying UploadKit Core.
When to use it
Use for MP3, WAV, FLAC, OGG/Opus, M4A/AAC, and WebM audio uploads.
When not to use it
- Do not transcode, normalize, or generate waveforms here.
- Do not put generic MIME/filename checks here (see
uploadkit-security).
Installation
Requires Python 3.10+.
pip install uploadkit-audio
Quick Start
from uploadkit import Uploader
from uploadkit_audio import AudioPolicy
uploader = Uploader(
AudioPolicy(max_duration_sec=600, allowed_codecs=frozenset({"mp3", "wav"})),
storage=my_storage,
)
Public API
| Symbol | Kind |
|---|---|
AudioPolicy |
Public |
AudioMetadata / inspect_audio |
Public |
AudioStructureValidator / AudioCodecValidator / AudioLimitsValidator |
Public |
default_audio_validators / default_async_audio_validators |
Public |
| Async validator equivalents | Public |
Coverage
The coverage badge is a measured total from
coverage report --include='src/*', not an aspirational 100%. CI enforces
--fail-under=80.
Most of the gap is defensive and format-variant code in metadata.py
(non-WAV codecs, mutagen edge cases). Validators and policies are largely
covered. Unlike Core / framework adapters, this package does not claim 100%
yet — fixtures for those branches are welcome.
Changelog
See CHANGELOG.md.
Contributing
See CONTRIBUTING.md.
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 uploadkit_audio-0.1.0.tar.gz.
File metadata
- Download URL: uploadkit_audio-0.1.0.tar.gz
- Upload date:
- Size: 11.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1baec7a8b8ead14176af0fa8c35086acd21d29029022f143cdb7d51775a0b950
|
|
| MD5 |
d7e127dcf018cf691bf62b9bed1538c0
|
|
| BLAKE2b-256 |
acb910039276b6e5065931cea4bc268243e5aa7d5eb3b93efb4be8f03a4576bd
|
File details
Details for the file uploadkit_audio-0.1.0-py3-none-any.whl.
File metadata
- Download URL: uploadkit_audio-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dfb30ba243df1234dbee54a60ae8e19be24f82a231ed4030b92dd291ecce67c4
|
|
| MD5 |
5278c0dd81aad3c6a7ff73957a8983e9
|
|
| BLAKE2b-256 |
1b41b69d48a51c7f5b2b37e07126b274a7f26c4b15d91ff87eee5f706052418e
|