SQL and Python?
I recently began learning about SQL in school (for now it’s just about the SELECT command) and realised how incredibly inefficient the data management in my previous python projects is. If I needed to save data and use it again the next time the code runs, I saved it in .txt files and reloaded it later on.
I want code another iteration of my music player app in Pythonista, with a proper data base. What’s the best way to do this, like from the ground up? Any module suggestions? Preferably, I’d like to be able to use SQL commands, so that the things I learn also apply at school.
I’m aware that it’s a broad question, I just don’t want to start using a crappy module and then scrap the whole project halfway because a different approach is better. (this just already happened way too often)
@Drizzel, for your next project, after you have learned SQL, you can get the efficiency of SQL but just write Python by using sqlalchemy.
@cvp Thanks, I tried it and it is exactly what I wanted. I just got to get used to using placeholders, I barely used them before... :)
@mikael I’ll definitely look into it when I understand SQL. Although I never feel like really knowing a coding language, because there’s always something new to learn (at least for me). I mean, I’ve been coding in python a lot for 3 years now and still haven’t used placeholders :)