skillfed

tinytag

Read audio file metadata

tinytag v2.3.0 5.5M downloads/30d#2,098 on PyPI832
Permissive license Active released

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 tinytag

uv

uv add tinytag

poetry

poetry add tinytag

Installing 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

Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Free Threading :: 4 - ResilientTopic :: Internet :: WWW/HTTPTopic :: MultimediaTopic :: Multimedia :: Sound/AudioTopic :: Multimedia :: Sound/Audio :: AnalysisTyping :: Typed

Tags

read audio metadatamp3 tag readeraudio file propertiesextract music metadataaudio duration bitrateflac ogg wav metadatapure python audio parser
audio-metadatapure-pythoncli-tool

More WWW/HTTP packages