I created LfmPy, a simple command line tool to retrieve locally your Libre.fm data (what music you played), and allow you to get a few stats (like «what is my favourite artist for the last two weeks»). It requires Python 3 and was tested on Ubuntu.
Currently, the website Libre.fm provides only a limited set of stats (last song played, favourite artist/song/album all time). It also can not recognise two names as the same artist (for example «Taku Iwasaki» and «岩崎琢»). So I wrote this tool. It’s hosted on Github.
The Sqlite DB is absolutely not optimized, but given the number of records it’s not a need.