Skip to main content

TagLib bindings for python 2.x/3.x, written using cython

Project description

Overview

pytaglib is a package of Python (2.x/3.x) bindings for TagLib. To my knowledge this so far is the only full-featured audio metadata library that supports python3.x.

Also, the package gives you complete freedom over the tag names – you are not limited to common tags like ARTIST, ALBUM etc.; instead you may use any string as key as long as the underlying metadata format supports it (most of them do, including mp3, ogg, and FLAC). Moreover, you can even use multiple values of the same tag, to e.g. store two artists, several genres, and so on.

Requirements

To compile the bindings you need need the Cython compiler for your version of python. Note that some distributions do not yet ship Cython compiled for python3, but you can easily get it by typing:

sudo easy_install3 cython

into a console.

pytaglib uses TagLib features that have been added only in version 1.8-BETA, so you need at least that version along with development headers.

Installation

python3 setup.py build
python3 setup.py test  # optional
sudo python3 setup.py install

Replace 3 by whatever Python version you use.

Usage

$ python3
Python 3.2.2rc1 (default, Aug 14 2011, 19:02:04)
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import taglib
>>> f = taglib.File("x.ogg")
>>> f.tags
{'ALBUM': ['omgwtf', 'lol'], 'ARTIST': ['öätrnüö']}
>>> f.length
472
>>> f.sampleRate
44100
>>> f.tags["ARTIST"] = ["A new artist"]
>>> del f.tags['ALBUM']
>>>
>>> f.save()
True
>>>

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

pytaglib-0.2.4.tar.gz (5.7 kB view details)

Uploaded Source

File details

Details for the file pytaglib-0.2.4.tar.gz.

File metadata

  • Download URL: pytaglib-0.2.4.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pytaglib-0.2.4.tar.gz
Algorithm Hash digest
SHA256 372f9dc97b8d8c665ba37cc6fbfba9c48b657dc1885d029be3ad16ddd9a23423
MD5 d734b4c07d37a04ea25b895fa065e74b
BLAKE2b-256 96819569e908cdb257ebb8a5e9dbe7b5ba72a264f6bed8212c755a852ae48698

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page