lowmanio.co.uk title image

Articles with the tag: SQLAlchemy

Script to put your music in a database

Fri, 28 Aug 2009 12:24PM

I made this script a while back now to populate a database with all the music on my computer (so excuse any poor Python!). It assumes you are on Windows and have all your music in one folder, arranged by artist with sub folder albums with songs in them. It also assumes you'll use PostgreSQL, but it's trivial to change this to mySQL or even SQLite which comes with Python2.5 or higher. You can tell it to ignore certain folders by adding to the ignorables set. It will automatically grab any album art it finds and try and get the genre, track number and composer etc from MP3 meta data (I couldn't find a way of doing any other kind of music type).

Read full article

PostgreSQL full text search and SQLAlchemy

Sun, 16 Aug 2009 02:37PM

With 1 comment

You may have noticed I have added a search bar at the top of the website. Here is how to make use of PostgreSQL's full text search facility with SQLAlchemy, a Python SQL Toolkit and Object Relational Mapper. 

Read full article