3
votes
0answers
53 views

sqlalchemy, postgresql and relationship stuck in “idle in transaction”

I have a problem related to sqlalchemy and postgresql. class Profile(Base): ... roles = relationship('Role', secondary=role_profiles, backref='profiles', lazy='dynamic') ...
3
votes
0answers
56 views

Threading and SQLAlchemy Sessions

I know this question has been asked a few times, but I'm still unsure about the usage of scoped_session with threading. Basically, I have an application with 10 worker threads. I have one Engine with ...
3
votes
0answers
378 views

SQLAlchemy ─ Mapping a Class against Multiple Tables

# ! /usr/bin/env python # -*- coding: utf-8 -*- # login_frontend.py """ Python 2.7.3 Cherrypy 3.2.2 PostgreSQL 9.1 psycopy2 2.4.5 SQLAlchemy 0.7.10 """ I'm ...
3
votes
0answers
35 views

Error loading SQL_VARIANT data type using Python

I am using Python and SQLAlchemy to query a database that I did not create. I have run into a problem querying a table that contains the SQL_VARIANT data type. I get the error: ...
3
votes
0answers
238 views

How do you dynamically adjust the recursion depth for eager loading in the SQLAlchemy ORM?

I have a two-table hierarchical setup where table A references table B, which then references back to a different record in table A, and so on... but only up to a given recursion depth. I have this ...
2
votes
0answers
40 views

Converting from SQL statements to SQL Alchemy

Thanks in advance for your help. I have to convert the following SQL statements to SQL alchemy. I haven't used SQL Alchemy before. SQL: SELECT User.id, User.nicknames FROM users, breadcrumbs WHERE ...
2
votes
0answers
41 views

Store Connection Parameters for SQLAlchemy securely

I'm writing an application in Python 2.7 + SQLAlchemy that will need to access hundreds of PostgreSQL databases, each on its own server. To connect using SQLAlchemy, an engine is created by passing ...
2
votes
0answers
32 views

How to fetch referenced entities with SQLAlchemy?

I have a question concerning the mapping of entities in SQLAlchemy. I have a transient object, which already contains foreign keys to some persistent objects. I want that SQLAlchemy fetches the ...
2
votes
0answers
154 views

Parsing and constructing filtering queries similiar to SQL WHERE clause in Python/JavaScript

I am building a query engine for a database which is pulling data from SQL and other sources. For normal use cases the users can use a web form where the use can specify filtering parameters with ...
2
votes
0answers
39 views

SqlAlchemy in threads in Twisted

I'm building a Twisted application in Python 2.7 and am trying to use SqlAlchemy to interact with the database. I've got a working application that is leaking memory, and am not sure how to find the ...
2
votes
0answers
43 views

Camelot for Desktop Application

I am developing a GUI application in Python and have already used SQLAlchemy for database interactions. I was going to use PyQt for the GUI development and then came across the framework Camelot. I ...
2
votes
0answers
134 views

SQLAlchemy audit logging; how to handle deletes?

I'm using a modified version of the versioning code example that comes with SQLAlchemy to record a user id and date on changes. However, I also want to modify it so deletes are done by marking a ...
2
votes
0answers
225 views

SQLAlchemy trying to access a table in the wrong database

We use CherryPy and SQLAlchemy to build our web app and everything was fine until we tested with 2 concurrent users - then things started to go wrong! Not very good for a web app so I'd be very ...
2
votes
0answers
452 views

How can I map and unmap objects under SQLAlchemy?

Is it possible to map and unmap mapper relationships for a specific class under SQLA without having to call clear_mappers()? The latter would be very silly and I suspect would perform really poorly. ...
1
vote
0answers
26 views

Implementation issue: Not able to get a list of dicts (Json obj)

I am not being able to retrieve the ids and nicknames of friends when the client tries to retrieve a location. id and nickname (along with other content fields) stored in User table and friend ...

15 30 50 per page