Python As a Framework (No more CRUD)

23 mins by The Python Experience |

Create, Record, Update, Delete, or CRUD, is the center of many application-developers' lives. What application cannot be defined in terms structured tables that related to each other; or Relational Database Management Systems, or RDBMS? A heck of a lot as it turns out. What's in common is lists, and lists of lists. When those lists are structured into neat and tidy rectangular regions that only grow as fast as you add rows to the bottom, you've got tables, and something that'll probably have a standard Structured Query Language (SQL) interface slammed onto it and called yet another RDBMS. But if those lists are of arbitrary length, and the contents of those lists are of arbitrary size, suddenly the data-storage structures are not quite so table-like, and you've likely got something folks'll slap the No-SQL moniker onto. But there is another. Regardless of whether your data is expressed as rigid tables or flexible nest-able containers (object-databases), chances are you don't really even need a 3rd-party database, and all its incumbent moving parts, overhead, and other administration, if only you use one of Python's many built-in facilities for persistence. My favorite is shelves, but you can use 3rd party packages too which take advantage of Python's native strengths without DB-overhead in the form of TinyDB or ZODB (Zope Database), which internally use Python's built-in SQLlite and object-persistence capabilities, respectively. Life is nicer when it's not full of CRUD.