omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    SQL and Python?

    Pythonista
    sql
    4
    5
    2444
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Drizzel
      Drizzel last edited by

      Hi,
      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)

      cvp mikael 2 Replies Last reply Reply Quote 0
      • cvp
        cvp @Drizzel last edited by

        @Drizzel I use sqlite3 and it is very easy

        Drizzel 1 Reply Last reply Reply Quote 3
        • mikael
          mikael @Drizzel last edited by

          @Drizzel, for your next project, after you have learned SQL, you can get the efficiency of SQL but just write Python by using sqlalchemy.

          1 Reply Last reply Reply Quote 0
          • Drizzel
            Drizzel @cvp last edited by

            @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 :)

            1 Reply Last reply Reply Quote 0
            • sam rod
              sam rod last edited by

              it works

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Powered by NodeBB Forums | Contributors