Let's Throw Caution to the Wind...

I am not a pro at this, but I am trying to figure things out.

I implemented this library in my free time as a way to get familiar with Python. I'm still trying to get a handle on how to structure a project in a way that makes setuptools happy and I don't have to import mymodule.mymodule to use it.

I will get there eventually. Until then, you will have to put up with this.

Use

Tagfriendly uses id3 to parse ID3 tags from remotely hosted MP3 files:

	from id3 import getRemoteTags, CrapId3
	
	tags =  getRemoteTags("http://www.example.com/path/to/some.mp3")
	
	if isinstance(tags, CrapId3):
		print "You can get values out of this object, but it contains no useful information."
	else:
		print "%s %s %s" % (tags.artist, tags.album, tags.title)
	
	# see if there is image data:
	if tags.picture:
		mime_type = tags.picture.get("mime")
		bits = tags.picture.get("data")
		# you can decide what do do with the rest.

Maybe you have a local file you want to read:

	from id3 import PathId3
	
	tags = PathId3("/path/to/my/file.mp3")
	print "%s %s %s" % (tags.artist, tags.album, tags.title)

Future

The main thing I would like to do is to make the library extensible. Part of the original library design was the core library code would remain light, and the programmer would be able to add parsing support for arbitrary tags (text tags especially), and be able to access those values using object-dot notation after the tag is processed.

Since I was mainly interested in something I could use in Tagfriendly, this goal was never fully realized.

Compressed tags are not supported.

License

I hereby release this code into the public domain with no license whatsoever. Slap on whatever you want if that makes you comfortable.

Download

These links will always point to the latest code and egg.

And this table will contain the history:
DateVersionCodeEggMisc.
14 Sep 2009 1.0 svn 343 id3-1.0-r343.tar.gz id3-1.0_r343-py2.5.egg Initial package release. Be gentle, cruel world.