Thanks, you are as always very helpful. I hope I'll be able to compose a PR
soon.
On Thursday, July 23, 2015 at 5:39:52 PM UTC+3, Michael Bayer wrote:
On 7/23/15 10:09 AM, Mike Bayer wrote:
On 7/23/15 1:24 AM, Yegor Roganov wrote:
Hi all!
Is there a way to disable implicit
will this answer my second question?
obj._sa_instance_state.committed_state
{'batch_status': STARTED(db=1),
'updated_by': 24769797950537744L,
'updated_on': Arrow [2015-07-24T14:02:03.360479-03:00]}
cheers,
richard.
On 07/24/2015 11:13 AM, Richard Gerd Kuesters wrote:
hi!
first, /yes/, set
On 7/24/15 10:13 AM, Richard Gerd Kuesters wrote:
hi!
first, /yes/, set and after_flush are quite different events :) but
here's what i'm trying to accomplish:
one object have an attribute, like 'state', and i would like to
monitor and trigger some other methods if (given scenarios):
1.
On 07/24/2015 12:59 PM, Mike Bayer wrote:
On 7/24/15 10:13 AM, Richard Gerd Kuesters wrote:
hi!
first, /yes/, set and after_flush are quite different events :) but
here's what i'm trying to accomplish:
one object have an attribute, like 'state', and i would like to
monitor and trigger
Hi all,
Seems I can't do session.query in anything other than the main thread.
I'm using SQLite, and I'm not sure if it's a problem with that or
SQLAlchemy it's self. Is there any kind of work around for this?
Cheers,
--
You received this message because you are subscribed to the Google
On 7/24/15 4:14 PM, 'Chris Norman' via sqlalchemy wrote:
Hi all,
Seems I can't do session.query in anything other than the main thread.
I'm using SQLite, and I'm not sure if it's a problem with that or
SQLAlchemy it's self. Is there any kind of work around for this?
Unfortunately the
obj._sa_instance_state.committed_state.get('key') ==
obj._sa_instance_state.dict.get('key')
False
is this all that's necessary to track down what's modified and the past
state (i believe to be sa_instance_state.dict) ?
cheers,
richard.
On 07/24/2015 11:34 AM, Richard Gerd Kuesters wrote:
So helpful! Thanks.
*Randy Syring*
Chief Executive Developer
Direct: 502.276.0459
Office: 812.285.8766
Level 12 https://www.level12.io/
On 07/24/2015 03:45 PM, Mike Bayer wrote:
On 7/24/15 3:17 PM, Randy Syring wrote:
I have some generic timestamp columns as part of a mixin. I'd like
for
well, as a general non-specific view yes, it can be another approach.
but, for the piece of code that drove me to this question, i really need
to use after_flush :)
cheers,
richard.
On 07/24/2015 02:15 PM, Jonathan Vanasco wrote:
Couldn't you handle much of this with the Descriptors/Hybrids
Because this is my first SQLAlchemy project and the schema file has 657
lines I would like to check for syntax errors before proceeding with the
next step in application development. I find no index in the SA manual and
cannot find the string 'syntax check' in the PDF file. Web search turns up
On Fri, Jul 24, 2015 at 1:25 PM, Jonathan Vanasco jvana...@gmail.com
wrote:
Are you comparing the speed of SqlAlchemy Core operations or SqlAlchemy
ORM operations?
The ORM is considerably slower. The core engine is much faster.
Core.
--
Jon Nelson
Dyn / Senior Software Engineer
p. +1
On Friday, July 24, 2015 at 1:20:15 PM UTC-4, Richard Kuesters wrote:
well, as a general non-specific view yes, it can be another approach.
but, for the piece of code that drove me to this question, i really need to
use after_flush :)
Well I mean... you could use that pattern to catch
On 7/24/15 1:49 PM, Rich Shepard wrote:
Because this is my first SQLAlchemy project and the schema file has 657
lines I would like to check for syntax errors before proceeding with the
next step in application development. I find no index in the SA manual
and
cannot find the string 'syntax
Couldn't you handle much of this with the Descriptors/Hybrids pattern?
http://docs.sqlalchemy.org/en/latest/orm/mapped_attributes.html#using-descriptors-and-hybrids
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To unsubscribe from this group and
well, application-wise it is really to run other procedures, not from
the database or python side, but from a message broker that's expecting
anything to happen to that value -- even if it's just a touch :)
err ... it's quite a specific architecture for dumb clients, so i'm just
taking some
Are you comparing the speed of SqlAlchemy Core operations or SqlAlchemy ORM
operations?
The ORM is considerably slower. The core engine is much faster.
There is also this:
http://docs.sqlalchemy.org/en/latest/faq/performance.html
--
You received this message because you are subscribed to
On 7/24/15 10:45 AM, Richard Gerd Kuesters wrote:
obj._sa_instance_state.committed_state.get('key') ==
obj._sa_instance_state.dict.get('key')
False
is this all that's necessary to track down what's modified and the
past state (i believe to be sa_instance_state.dict) ?
I'd prefer you use
yes, a public api would be awesome, perhaps for a future version? :)
for now, i'll stick to that -- since it works, heh.
cheers,
richard.
On 07/24/2015 12:59 PM, Mike Bayer wrote:
On 7/24/15 10:45 AM, Richard Gerd Kuesters wrote:
obj._sa_instance_state.committed_state.get('key') ==
hi!
first, /yes/, set and after_flush are quite different events :) but
here's what i'm trying to accomplish:
one object have an attribute, like 'state', and i would like to monitor
and trigger some other methods if (given scenarios):
1. the program sets a new value to a state that is
On 7/24/15 2:19 PM, Jonathon Nelson wrote:
I should preface this by saying I'm a huge fan of SQLAlchemy. Huge!
However, when trying to extol the virtues of SQLAlchemy I inevitably
run into this issue:
But it's slow!
My usual response to that is that, yes, it is somewhat slower than raw
yeah, that's basically what i'm doing: gathering information about
what's happening and sending a response as quick as i can, since most of
the clients are step machines (they still exists), so ... :)
On 07/24/2015 04:01 PM, Jonathan Vanasco wrote:
On Friday, July 24, 2015 at 2:06:15 PM
On Fri, 24 Jul 2015, Mike Bayer wrote:
Python syntax or SQL syntax?
Mike,
The former.
Typically in Python we rely on linters and runtime checks for this, same
idea with SQL.
Have not used a lint before with Python, but will run it on my SQLAlchemy
code.
I know that SQLite and
On 7/24/15 3:17 PM, Randy Syring wrote:
I have some generic timestamp columns as part of a mixin. I'd like
for these columns to have server defaults of the current UTC time. If
I wanted local time, I could just do:
created_ts = Column(DateTime, ...,
flake8 is super simple - it checks your code for mistakes (undeclared vars,
non-runnable code, etc) and pushes you to write pep8 style code.
the only things you need to do really are:
* write a .cfg for various projects, so you can turn off some warnings
* get in the habit of running it before
In terms of linters, `flake8` (https://pypi.python.org/pypi/flake8) catches
most mistakes I've made with SqlAlchemy.
It's also useful to start writing Unit Tests that will interact with your
SqlAlchemy models in predicted ways -- in addition to continually checking
core functionality.
--
You
On 7/24/15 2:44 PM, Mike Bayer wrote:
On 7/24/15 2:19 PM, Jonathon Nelson wrote:
I should preface this by saying I'm a huge fan of SQLAlchemy. Huge!
However, when trying to extol the virtues of SQLAlchemy I inevitably
run into this issue:
But it's slow!
My usual response to that is
On Friday, July 24, 2015 at 2:06:15 PM UTC-4, Richard Kuesters wrote:
well, application-wise it is really to run other procedures, not from the
database or python side, but from a message broker that's expecting
anything to happen to that value -- even if it's just a touch :)
err ...
I have some generic timestamp columns as part of a mixin. I'd like for
these columns to have server defaults of the current UTC time. If I wanted
local time, I could just do:
created_ts = Column(DateTime, ...,
server_default=sasql.text('CURRENT_TIMESTAMP'))
The problem I'm running into is
On Fri, 24 Jul 2015, Jonathan Vanasco wrote:
In terms of linters, `flake8` (https://pypi.python.org/pypi/flake8) catches
most mistakes I've made with SqlAlchemy.
It's also useful to start writing Unit Tests that will interact with your
SqlAlchemy models in predicted ways -- in addition to
I should preface this by saying I'm a huge fan of SQLAlchemy. Huge!
However, when trying to extol the virtues of SQLAlchemy I inevitably run
into this issue:
But it's slow!
My usual response to that is that, yes, it is somewhat slower than raw
MySQL or PostgreSQL or whatever DB-API you are
30 matches
Mail list logo