4
votes
1answer
51 views

Idiomatic way to construct a SQL INSERT query in Python

I have a bit of code to insert some values in a table. It seems a bit clunky - is there a neater way? words is a list of dictionaries, and the entries contain other fields which I don't want to ...
5
votes
1answer
83 views

Load drinks and their ingredients into dictionaries

I'm working on a web application using bottle, and it is, at this point, functional. The gist of it is that I have a database of drinks, with associated IDs, and associated sets of ingredients. the ...
3
votes
1answer
193 views

Monthly rollover system

I have learned a little python for a few projects at work. This is my first "finished" application and I was hoping someone would take a look at it. I would love some tips on the noob mistakes I am ...
1
vote
1answer
294 views

SQLAlchemy - InsertFromSelect with columns support

In SQL there is no way to do an "INSERT... SELECT". If you want to do it without using raw SQL in several places of your code you can create custom SQL compilation. There is an example about how to ...
2
votes
2answers
388 views

Database calls with Python Flask and SQLAlchemy

I am creating a Python Flask webservice and this is basically how I am doing all of my database calls if a webservice needs to interact with the database: ...