worldveil / dejavu

Audio fingerprinting and recognition in Python
MIT License
6.36k stars 1.43k forks source link

Add sqlite database adapter #175

Open ategt opened 5 years ago

ategt commented 5 years ago

I really like this project and found reading the code to be simple and pleasant. Currently, I am using dejavu on multiple computers, which can not always communicate, and so while PostgreSQL is my database of choice, using SQLite seems like the right solution for me at the moment.

I am not sure what the goals of this project are and I know that SQLite is going to run slower than MySQL and be a challenge to use at scale, but it works for me, and I thought that perhaps it may be useful for someone else, too.

I further realize that my current solution, add an import to use this implementation, may not be the best way to handle the scenario, but I also do not want to force other users, who do not want SQLite, into installing sqlite3 dependencies and my attempts to devise a more elegant solution to that problem seemed to complicate the code unnecessarily. There is certainly a solution that works for everyone, and what I have done is more of a compromise than an answer, but I feel that it is a reasonable compromise, and I welcome any input on how to improve that aspect of this request.

All of that said, dejavu has been quite helpful to me in several ways and I wanted to give back. Thank you for the consideration.