We're generating MP3 files on the fly in Python, and need to edit the ID3 headers in-memory using a file-like object.
All the ID3 libraries on PyPI appear to require you to pass a filesystem path as a string. I find this rather frustrating!
Writing our generated MP3 out to disk (or ramdisk) just to add ID3 tags is unacceptable for a number of reasons, especially performance.
Given the plentitude of ID3 libraries, is there an ID3 library that simply works with file-like objects?
Does StringIO help? http://docs.python.org/library/stringio.html
Well, the answer seems to be that no such animal exists. The advantages of programming to an interface are apparently lost on the python MP3 frame hackers. We solved the problem by modifying an existing library.
AFAIR tags are appended to the end of file. You might want to study the format and make a simple library yourself, that should not be very difficult.
Also, you could consider storing them temporary on a filesystem like tmpfs (ramdisk).