[sqlalchemy] Guidance for mapping tables dynamically

2017-07-27 Thread Saurabh Bhandiwad
Hello experts, Apologies if this question has been asked before, I couldn't find the right question on internet which reflects my problem. In my project i receive SQLITE file and I need to query information. Though the Database Schema is bit unorthodox. For example, Database will contain *n*

Re: [sqlalchemy] Streamlined dictionary numpy arrays storage in a one-to-many relationship

2017-07-27 Thread Mike Bayer
correction, you'd also name the relationship "_readings", eg. self.sensor._readings On Thu, Jul 27, 2017 at 4:50 PM, Mike Bayer wrote: > On Thu, Jul 27, 2017 at 4:43 PM, Mike Bayer wrote: >> On Thu, Jul 27, 2017 at 10:50 AM, Ruben Di Battista

Re: [sqlalchemy] Streamlined dictionary numpy arrays storage in a one-to-many relationship

2017-07-27 Thread Mike Bayer
On Thu, Jul 27, 2017 at 4:43 PM, Mike Bayer wrote: > On Thu, Jul 27, 2017 at 10:50 AM, Ruben Di Battista > wrote: >> Hello, I'm trying to figure out a streamlined way to store some children >> values that are stored in numpy arrays in Python.

Re: [sqlalchemy] Streamlined dictionary numpy arrays storage in a one-to-many relationship

2017-07-27 Thread Mike Bayer
On Thu, Jul 27, 2017 at 10:50 AM, Ruben Di Battista wrote: > Hello, I'm trying to figure out a streamlined way to store some children > values that are stored in numpy arrays in Python. As example let's assume I > have a parent object that is a sensor that has some

[sqlalchemy] Re: Streamlined dictionary numpy arrays storage in a one-to-many relationship

2017-07-27 Thread Ruben Di Battista
sensor.values['value'] = values This is a typo. Should be this: sensor.readings['value'] = values On Thursday, July 27, 2017 at 4:50:23 PM UTC+2, Ruben Di Battista wrote: > > Hello, I'm trying to figure out a streamlined way to store some children > values that are stored in numpy arrays in

[sqlalchemy] Streamlined dictionary numpy arrays storage in a one-to-many relationship

2017-07-27 Thread Ruben Di Battista
Hello, I'm trying to figure out a streamlined way to store some children values that are stored in numpy arrays in Python. As example let's assume I have a parent object that is a sensor that has some readings associated to it: class Sensor(object): __tablename__ = 'sensor' id =