tinytag
Read audio file metadata
What it is and what it does
tinytag is a lightweight Python library for reading metadata from audio files. It extracts common fields like artist, album, title, track number, duration, bitrate, and sample rate from MP3, MP4, FLAC, OGG, WAV, ASF (WMA), and AIFF files using a single consistent API. The library is pure Python with no external dependencies, making it simple to embed in any project.
The package is designed for reading metadata only—it explicitly does not support writing or modifying tags. It provides both a Python API and a command-line interface for quick inspection of audio files. It returns metadata as simple attributes on a TinyTag object, with additional or format-specific fields available through an `other` dictionary.
Use it for:
- Extract duration and bitrate from audio files in a media player or streaming application.
- Build a music library cataloger that reads artist, album, and title from files in bulk.
- Validate audio file properties (channels, sample rate, MIME type) before processing.
- Populate a database with metadata from a folder of mixed audio formats.
- Implement a command-line tool to inspect or report on audio file properties.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Reads metadata (artist, title, duration, bitrate, and more) from audio files in formats including MP3, MP4, FLAC, OGG, WAV, and others, without writing or modifying tags.
Yes. tinytag is actively maintained, has zero known vulnerabilities, no dependencies, and a permissive license. It solves a narrow, well-defined problem (reading audio metadata) reliably across common formats. Install it if you need to extract metadata from audio files without the overhead of a heavier library.
Install
tinytag on PyPI
pip
pip install tinytaguv
uv add tinytagpoetry
poetry add tinytagInstalling tinytag
Before you install
Low friction: pure Python with no runtime dependencies, distributed as a wheel, and actively maintained with a recent release.
License in practice
MIT license (permissive) means you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install tinytag
from tinytag import TinyTag
tag = TinyTag.get('/path/to/music.mp3')
print(f'{tag.artist} - {tag.title} ({tag.duration:.2f}s)')
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 15 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 5,450,739/month — #2,098 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: tinytag-2.3.0-py3-none-any.whl
Keywords: metadata, audio, music, mp3, m4a, wav, ogg, opus, flac, wma, aiff
Tags
More WWW/HTTP packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
h11h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
httpxHTTPX is a fully featured HTTP client library…
permissive · top 100 on PyPI
httpcoreA minimal low-level HTTP client library that…
permissive · top 100 on PyPI
aiohttpaiohttp is an async HTTP client and server…
permissive · top 100 on PyPI
audiofileReads and writes audio files across formats…
permissive · top 15,000 on PyPI
eyeD3eyeD3 reads, edits, and displays ID3 metadata…
copyleft · top 15,000 on PyPI
mutagenMutagen reads and writes audio metadata (tags)…
copyleft · top 5,000 on PyPI
soundfileReads and writes audio files in formats like…
permissive · top 1,000 on PyPI
miniaudioMiniaudio provides Python bindings for…
permissive · top 15,000 on PyPI
mediafileMediaFile reads and writes metadata tags across…
permissive · top 15,000 on PyPI
spotipyFreeProvides a Spotipy-compatible interface to…
unclear · top 15,000 on PyPI
audioreadDecode audio files using whichever backend is…
permissive · top 5,000 on PyPI
audiolabaudiolab loads, processes, and saves audio…
permissive · top 15,000 on PyPI
syncedlyricsFetches synchronized lyrics in LRC format for…
permissive · top 15,000 on PyPI