webmusic is a small, web-based music player. It consists of a couple parts:

  • a music indexer that uses mutagen to read song metadata and MongoDB to store the index
  • a web interface to your music library using HTML5 <audio>

Although web-based, it's not meant to be a multi-user thing - my use case is replacing native GUI music players, which annoy me only slightly less than console players. It's not designed for over-a-WAN web scenarios.

So why use this? You probably shouldn't, AFAIK I'm the only user.

One of the main features of the web interface is the artist display - artists are shown in columns truncated such that all artists are shown. One advantage of this is that you can learn and remember where on the screen particular artists show up.


webmusic is implemented as a Flask app. My integration looks like so:

from webmusic import app as music_app, DefaultConfig as MusicDefaultConfig

class MusicConfig(MusicDefaultConfig):

music_app.config.from_object(MusicConfig) # has mongo creds, not versioned from .private import WEBMUSIC_MONGO_URI music_app.config["MONGO_URI"] = WEBMUSIC_MONGO_URI music_app.debug = True

app = DispatcherMiddleware(main_app, {
# ... "/music": music_app,



Look at webmusic.DefaultConfig for all configuration values and usage notes.

class DefaultConfig:

# if your music library location isn't /home/user/Music, set this # accordingly. LIBRARY_ROOT = os.path.join(os.path.expanduser("~"), u"Music/")

# Enable if you can set this up behind an X-SendFile-capable # server. SENDFILE = False

# Collection name MONGO_COLLECTION = "music"

# Format: # mongodb://[username:password@]host1[:port1],...[,hostN[:portN]][/[database][?options]] # see http://www.mongodb.org/display/DOCS/Connections for details. MONGO_URI = None