If you want to develop an application that incorporates information about movies, do we have a tool for you. IMDbPY is a Python package that can retrieve and manage the huge amount of data available from IMDb.com, the Internet Movie Database. IMDb data is free for personal and non-commercial use; IMDbPY is free software. The tool is widely used by video collection managers, multimedia players, and media centers, says its creator, Italian developer Davide Alberani.
Alberani began writing IMDbPY in 2004 to help him organize his own movie collection. Six years and 20,000 lines of code later, version 4.5.1, released this month, is included in every major Linux and Unix distributions and is used by more than 20 other software projects. It has been publicly praised by Col Needham, the founder of IMDb.
Alberani wrote IMDbPY in Python “because of its clearness and simplicity: using a high-level interpreted language, you can greatly speed up the development cycle. Moreover, it has a large user base, and countless libraries were already available.” Thanks to its use of Python and its libraries, along with certain fall-back functions and platform-specific patches, IMDbPY works out of the box on a huge variety of platforms, including mobile devices.
On the back end, IMDbPY interfaces with SQL databases via the SQLObject object-relational mapping (ORM) and SQLAlchemy. “When we decided to switch to the SQLAlchemy ORM, we didn’t drop SQLObject support; instead, I wrote an adapter layer so that IMDbPY can now work with both.”
IMDbPY has been used in a variety of high-profile projects, Alberani says. In academia it’s been used to produce papers about cinema and also in an in-depth course about optimization of a MySQL database. A few years ago it was used by some of the contestants for the Netflix prize (“but they did not win”). “One of the most awesome thing IMDbPY was used for was research about automatic generation of teasers using ontologies. I don’t even try to pretend that I understand it!”
With the software essentially feature-complete, Alberani is concentrating on making it more robust and bulletproof. “We’re working with user-supplied data, and part of our work is to follow a moving target – the imdb.com site. This also means that we need to release a new version every few months. For the future, I’d like to see improvements in our ability to do more complex queries on the SQL database, and it would be wonderful if we could have a working and up-to-date version for mobile devices (Symbian, iPhone, Nexus, Maemo, and so on), but every new idea is welcome! The best way to present your ideas is on the imdbpy-devel mailing list.”