Re: [sqlalchemy] mssql+turbodbc cnnection not working when converted to .exe , however runs fine when it is in .py file

2019-10-10 Thread Simon King
What is the error message when it fails? On Thu, Oct 10, 2019 at 10:00 AM Pradeep Dhamale wrote: > > i have created a mssql connection using sqlalchemy : mssql+turbodbc engine, > the script runs properly when it is a .py file , however whenever i convert > the .py file to .exe using

[sqlalchemy] Re: Slow entities pickling for caching purposes

2019-10-10 Thread Jonathan Vanasco
> > 1) What strategy for caching I should consider while using SQLAlchemy? > Currently, the only option I see is to have a duplicated declaration of > entities in a form of simple classes and use it when I don't need > modification. Needles to say, it's a lot of code duplication. I cache

Re: [sqlalchemy] Slow entities pickling for caching purposes

2019-10-10 Thread Mike Bayer
On Thu, Oct 10, 2019, at 2:48 AM, Александр Егоров wrote: > Hello! > > I want to cache query results in a distributed cache (Redis), so I need to > serialize/deserialize fetched entities very fast. > However, it turned that SQLAlchemy entities are very heavy for pickle to > dump/load. Regular

Re: [sqlalchemy] Re: ORM-level “delete” cascade vs. FOREIGN KEY level “ON DELETE” cascade explanation

2019-10-10 Thread Mike Bayer
On Thu, Oct 10, 2019, at 3:53 AM, 'Marc Vegetti' via sqlalchemy wrote: > Hello, first of all, thnak you for your fast answer. > > I was refering to : >> A database level `ON DELETE` cascade is configured effectively on the >> *many-to-one* side of the relationship; that is, we configure it

[sqlalchemy] mssql+turbodbc cnnection not working when converted to .exe , however runs fine when it is in .py file

2019-10-10 Thread Pradeep Dhamale
i have created a mssql connection using sqlalchemy : mssql+*turbodbc* engine, the script runs properly when it is a .py file , however whenever i convert the .py file to .exe using pyinstaller --one file , the exe gets generated successfully , but while executing the exe it fails. --

[sqlalchemy] Re: ORM-level “delete” cascade vs. FOREIGN KEY level “ON DELETE” cascade explanation

2019-10-10 Thread 'Marc Vegetti' via sqlalchemy
Hello, first of all, thnak you for your fast answer. I was refering to : > > A database level ON DELETE cascade is configured effectively on the > *many-to-one* side of the relationship; that is, we configure it relative > to the FOREIGN KEY constraint that is the “many” side of a

[sqlalchemy] Slow entities pickling for caching purposes

2019-10-10 Thread Александр Егоров
Hello! I want to cache query results in a distributed cache (Redis), so I need to serialize/deserialize fetched entities very fast. However, it turned that SQLAlchemy entities are very heavy for pickle to dump/load. Regular classes and dicts with the same structure takes significantly less