I'm pretty new to Python, coming from Drupal and found that the abstraction layer made sense for me there, perhaps out of familiarity more than anything else. But what I like about Drupal is that there's one way to do something so it's easy to find consistent examples.
There's a lot I like about Python so far but because there are so many abstraction layers and the layers are really flexible, I find it difficult to find consistent examples.
I've given PyDal and SQLAlchemy a go so far. I found SQLAlchemy made a bit more sense but I'm having difficulty making a start with basic queries.
e.g. update person set name = 'Sally' where id = 1; I would expect to abstract something like:
db.update('person').where(id=1).values(name='Sally')
or
Person.where(id=1).set(name='Sally')
Where Person is a class defining the table.
There seem to be lots of examples of inserting but not updating or other common queries so it's difficult for me to find an abstraction layer that would suit me.
Does anyone know where there are a load of examples for each abstraction layer or even a page that makes a comparison of examples between each layer? Failing that, identifying which layer comes close to my above examples and give me an example or link would be really great.
Thank you!