Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Darkly)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Uncategorized
  3. I haven't had to write a Python app that uses a database in a very long time.

I haven't had to write a Python app that uses a database in a very long time.

Scheduled Pinned Locked Moved Uncategorized
pythonsqlite
12 Posts 7 Posters 26 Views
  • 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.
  • Mauricio Teixeira🐧:kubernetes:B This user is from outside of this forum
    Mauricio Teixeira🐧:kubernetes:B This user is from outside of this forum
    Mauricio Teixeira🐧:kubernetes:
    wrote last edited by
    #1

    I haven't had to write a Python app that uses a database in a very long time. I thought things were different now. Better, I would hope. But, seriously? Do I still need to write my own SQL statements? What year is that? 🙄

    PS: if someone can suggest a Python library that I can use to manipulate SQLite without writing SQL, I would appreciate it.

    #Python #SQLite

    GlyphG C.C Shawn Hooper (he/him)S 8O Marcos DioneM 6 Replies Last reply
    0
    • Mauricio Teixeira🐧:kubernetes:B Mauricio Teixeira🐧:kubernetes:

      I haven't had to write a Python app that uses a database in a very long time. I thought things were different now. Better, I would hope. But, seriously? Do I still need to write my own SQL statements? What year is that? 🙄

      PS: if someone can suggest a Python library that I can use to manipulate SQLite without writing SQL, I would appreciate it.

      #Python #SQLite

      GlyphG This user is from outside of this forum
      GlyphG This user is from outside of this forum
      Glyph
      wrote last edited by
      #2

      @badnetmask You can if you want to, but you could also use SQLAlchemy if you don't. What is your objection to writing SQL statements?

      Mauricio Teixeira🐧:kubernetes:B 1 Reply Last reply
      0
      • Mauricio Teixeira🐧:kubernetes:B Mauricio Teixeira🐧:kubernetes:

        I haven't had to write a Python app that uses a database in a very long time. I thought things were different now. Better, I would hope. But, seriously? Do I still need to write my own SQL statements? What year is that? 🙄

        PS: if someone can suggest a Python library that I can use to manipulate SQLite without writing SQL, I would appreciate it.

        #Python #SQLite

        C.C This user is from outside of this forum
        C.C This user is from outside of this forum
        C.
        wrote last edited by
        #3

        @badnetmask

        SQLAlchemy can do exactly what you describe; use it at the ORM level, and you need never write any SQL at all.

        It also makes your code (more) portable to other RDBMSes.

        1 Reply Last reply
        0
        • GlyphG Glyph

          @badnetmask You can if you want to, but you could also use SQLAlchemy if you don't. What is your objection to writing SQL statements?

          Mauricio Teixeira🐧:kubernetes:B This user is from outside of this forum
          Mauricio Teixeira🐧:kubernetes:B This user is from outside of this forum
          Mauricio Teixeira🐧:kubernetes:
          wrote last edited by
          #4

          @glyph @cazabon
          I'll take a look at SQLAlchemy, thanks.

          In essence I have nothing against SQL. I will write if I have to. I just thought after so many years we would be able to abstract that with plain Python statements.

          GlyphG 1 Reply Last reply
          0
          • Mauricio Teixeira🐧:kubernetes:B Mauricio Teixeira🐧:kubernetes:

            I haven't had to write a Python app that uses a database in a very long time. I thought things were different now. Better, I would hope. But, seriously? Do I still need to write my own SQL statements? What year is that? 🙄

            PS: if someone can suggest a Python library that I can use to manipulate SQLite without writing SQL, I would appreciate it.

            #Python #SQLite

            Shawn Hooper (he/him)S This user is from outside of this forum
            Shawn Hooper (he/him)S This user is from outside of this forum
            Shawn Hooper (he/him)
            wrote last edited by
            #5

            @badnetmask Another recommendation for SQLAlchemy.

            1 Reply Last reply
            0
            • Mauricio Teixeira🐧:kubernetes:B Mauricio Teixeira🐧:kubernetes:

              I haven't had to write a Python app that uses a database in a very long time. I thought things were different now. Better, I would hope. But, seriously? Do I still need to write my own SQL statements? What year is that? 🙄

              PS: if someone can suggest a Python library that I can use to manipulate SQLite without writing SQL, I would appreciate it.

              #Python #SQLite

              8O This user is from outside of this forum
              8O This user is from outside of this forum
              8
              wrote last edited by
              #6

              @badnetmask is this the thing you feel should exist in current year? I can't endorse it specifically but I think the magic words are sqlalchemy and pydantic and that's what this is.

              https://sqlmodel.tiangolo.com/

              Mauricio Teixeira🐧:kubernetes:B 1 Reply Last reply
              0
              • 8O 8

                @badnetmask is this the thing you feel should exist in current year? I can't endorse it specifically but I think the magic words are sqlalchemy and pydantic and that's what this is.

                https://sqlmodel.tiangolo.com/

                Mauricio Teixeira🐧:kubernetes:B This user is from outside of this forum
                Mauricio Teixeira🐧:kubernetes:B This user is from outside of this forum
                Mauricio Teixeira🐧:kubernetes:
                wrote last edited by
                #7

                @octarine_wiggle
                I'll take a look at that. Thanks.

                1 Reply Last reply
                0
                • Mauricio Teixeira🐧:kubernetes:B Mauricio Teixeira🐧:kubernetes:

                  @glyph @cazabon
                  I'll take a look at SQLAlchemy, thanks.

                  In essence I have nothing against SQL. I will write if I have to. I just thought after so many years we would be able to abstract that with plain Python statements.

                  GlyphG This user is from outside of this forum
                  GlyphG This user is from outside of this forum
                  Glyph
                  wrote last edited by
                  #8

                  @badnetmask @cazabon Any abstraction is necessarily incomplete. The documentation for your database is always going to be in SQL, and you should probably care about the specifics of your database.

                  My own attempt to square this circle is https://dbxs.readthedocs.io/en/latest/ — with it, you write SQL manually, but it's in a structured and organized way; rather than try to hide the seam between the Python and the database, it carefully arranges that seam so it is all in one place and easy to inspect.

                  GlyphG 1 Reply Last reply
                  0
                  • GlyphG Glyph

                    @badnetmask @cazabon Any abstraction is necessarily incomplete. The documentation for your database is always going to be in SQL, and you should probably care about the specifics of your database.

                    My own attempt to square this circle is https://dbxs.readthedocs.io/en/latest/ — with it, you write SQL manually, but it's in a structured and organized way; rather than try to hide the seam between the Python and the database, it carefully arranges that seam so it is all in one place and easy to inspect.

                    GlyphG This user is from outside of this forum
                    GlyphG This user is from outside of this forum
                    Glyph
                    wrote last edited by
                    #9

                    @badnetmask @cazabon If you give it a try let me know, it hasn't seen a lot of production use yet, but it ought to be very simple 🙂

                    Mauricio Teixeira🐧:kubernetes:B 1 Reply Last reply
                    0
                    • Mauricio Teixeira🐧:kubernetes:B Mauricio Teixeira🐧:kubernetes:

                      I haven't had to write a Python app that uses a database in a very long time. I thought things were different now. Better, I would hope. But, seriously? Do I still need to write my own SQL statements? What year is that? 🙄

                      PS: if someone can suggest a Python library that I can use to manipulate SQLite without writing SQL, I would appreciate it.

                      #Python #SQLite

                      Marcos DioneM This user is from outside of this forum
                      Marcos DioneM This user is from outside of this forum
                      Marcos Dione
                      wrote last edited by
                      #10

                      @badnetmask is there a language that has an ORM in their std lib?

                      1 Reply Last reply
                      0
                      • GlyphG Glyph

                        @badnetmask @cazabon If you give it a try let me know, it hasn't seen a lot of production use yet, but it ought to be very simple 🙂

                        Mauricio Teixeira🐧:kubernetes:B This user is from outside of this forum
                        Mauricio Teixeira🐧:kubernetes:B This user is from outside of this forum
                        Mauricio Teixeira🐧:kubernetes:
                        wrote last edited by
                        #11

                        @glyph @cazabon
                        Well, in my case it wouldn't be production for sure. 😄

                        1 Reply Last reply
                        0
                        • Mauricio Teixeira🐧:kubernetes:B Mauricio Teixeira🐧:kubernetes:

                          I haven't had to write a Python app that uses a database in a very long time. I thought things were different now. Better, I would hope. But, seriously? Do I still need to write my own SQL statements? What year is that? 🙄

                          PS: if someone can suggest a Python library that I can use to manipulate SQLite without writing SQL, I would appreciate it.

                          #Python #SQLite

                          N This user is from outside of this forum
                          N This user is from outside of this forum
                          newsgroup
                          wrote last edited by
                          #12

                          @badnetmask

                          1 Reply Last reply
                          1
                          0
                          • R ActivityRelay shared this topic
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          • Login

                          • Don't have an account? Register

                          • Login or register to search.
                          Powered by NodeBB Contributors
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • World
                          • Users
                          • Groups