libmunin manual


libmunin is a versatile python library that can do music recommendations based on datamining algorithms. You give it your music collection, some time to learn in the background and in return it will give you some clever recommendations.

If you wonder what ravens have to do with this: Go to wikipedia.

In Norse mythology, Hugin (from Old Norse “thought”)
and Munin (Old Norse “memory” or “mind”)
are a pair of ravens that fly all over the world Midgard,
and bring information to the god Odin.


This library is under heavy developement and therefore far away from being usable. It probably won’t work, and if it does it might eat your kittens.

Key Features

Ability to…

  • …recommend songs to a certain song.
  • …find uninion recommendations for two songs.
  • …recommend any song from using habits.
  • …do mood-analysis and keyword-extraction.
  • …create and honor Rules mined from the listening history.
  • …extend the API to fit your custom project.

Minimal Example

from munin.easy import EasySession

    # Artist:            Album:               Title:             Genre:
    ('Akrea'          , 'Lebenslinie'      , 'Trugbild'       , 'death metal'),
    ('Vogelfrey'      , 'Wiegenfest'       , 'Heldentod'      , 'folk metal'),
    ('Letzte Instanz' , 'Götter auf Abruf' , 'Salve te'       , 'folk rock'),
    ('Debauchery'     , 'Continue to Kill' , 'Apostle of War' , 'brutal death')

session = EasySession()
with session.transaction():
    for idx, (artist, album, title, genre) in enumerate(MY_DATABASE):
             'artist': artist,
             'album': album,
             'title': title,
             'genre': genre
         })] = idx

for munin_song in session.recommend_from_seed(session[0], 2):


('Vogelfrey'  , 'Wiegenfest'       , 'Heldentod'      , 'folk metal'),
('Debauchery' , 'Continue to Kill' , 'Apostle of War' , 'brutal death')

Table Of Contents

Related Topics

This Page

Useful links: