Re: [sqlalchemy] Multiple table dependencies using relation SQLAlchemy

2015-07-27 Thread Victor Tingström
Thank you so *much* for the quick and detailed reply Michael, worked like a charm! Haha, yes, I'm not really using Numpy (just a standard import, hehe). On a sidenote, SQLAlchemy is one of the most complex and impressive libraries I've ever seen, and the documentation is beyond words - so than

Re: [sqlalchemy] Transforming SQL to SQLAlchemy

2015-07-27 Thread Mike Bayer
On 7/27/15 12:19 PM, D.S. Ljungmark wrote: Thanks! Going through this of how to go backwards from a query to SQLAlchemy is the part that I was missing. I'm personally not wedded to the Postgres method, actually the opposite. But it's also been the one call that didn't stall massively on larger

Re: [sqlalchemy] Transforming SQL to SQLAlchemy

2015-07-27 Thread D.S. Ljungmark
Thanks! Going through this of how to go backwards from a query to SQLAlchemy is the part that I was missing. I'm personally not wedded to the Postgres method, actually the opposite. But it's also been the one call that didn't stall massively on larger datasets. The performance characteristics are

Re: [sqlalchemy] Multiple table dependencies using relation SQLAlchemy

2015-07-27 Thread Mike Bayer
On 7/27/15 10:56 AM, Victor Tingström wrote: Hey guys! First off, thank you for the library. Now to the problem, I'm currently trying to implement a simple timeseries database using `SQLAlchemy`. And so far I've seen the need for the following classes; First off is the `Platform` class (which

Re: [sqlalchemy] How to get a back from a SQLAlchemy query?

2015-07-27 Thread Mike Bayer
On 7/27/15 9:08 AM, c.bu...@posteo.jp wrote: I have (sqlite3) database with a `Numeric(10, 2)` field. I want to query for that and work with it as a standard python datatype (for me this is ``). In the code below I want a list of floats - nothing more. How can I do this without manual convertin

Re: [sqlalchemy] Transforming SQL to SQLAlchemy

2015-07-27 Thread Mike Bayer
On 7/27/15 3:47 AM, D.S. Ljungmark wrote: But we're not looking for one row in the Certificate table, what it does is, for _every_ CSR, take the Certificate metadata that matches the _oldest_ certificate. whoops, right I looked at it for too long and didn't see us selecting all of csr. T

[sqlalchemy] Multiple table dependencies using relation SQLAlchemy

2015-07-27 Thread Victor Tingström
Hey guys! First off, thank you for the library. Now to the problem, I'm currently trying to implement a simple timeseries database using `SQLAlchemy`. And so far I've seen the need for the following classes; First off is the `Platform` class (which is the highest in the hierarchy) import nu

[sqlalchemy] How to get a back from a SQLAlchemy query?

2015-07-27 Thread c.buhtz
I have (sqlite3) database with a `Numeric(10, 2)` field. I want to query for that and work with it as a standard python datatype (for me this is ``). In the code below I want a list of floats - nothing more. How can I do this without manual converting the list? # Python3 pseudocode class M

Re: [sqlalchemy] Transforming SQL to SQLAlchemy

2015-07-27 Thread D.S. Ljungmark
But we're not looking for one row in the Certificate table, what it does is, for _every_ CSR, take the Certificate metadata that matches the _oldest_ certificate. The equivalent using a Join would be the following (the below is the generated code): SELECT certificate.csr_id AS certificate_csr_id,