sure, use pdb to step through and use the "where" command to show where each call originates.
alternatively, if this is for profiling, you can use print_callers() as in the example at http://docs.sqlalchemy.org/en/rel_1_0/faq/performance.html#code-profiling which will show the origins of calls, though you'd need to step through things to see the full chain. A tool like RunSnakeRun can provide a graphical display instead. On 01/13/2016 11:58 AM, Richard Gerd Kuesters wrote: > hi all! > > i'm wondering if there's a way to determinate if a query was "launch" by > my code (ex. session.query(Entity)...) or by the internals of sqlalchemy > (backref, relationship, etc). i think it's better to use a example, > based on *adjacency_list.py*: > > http://pastebin.com/q3yx36vn > > in the code, you'll notice there's only one query *literally* written > (in the main script), but "STEP" is called more than once (by > internals). my question is: can I differ between them? > > thanks a lot! > richard. > > -- > You received this message because you are subscribed to the Google > Groups "sqlalchemy" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to sqlalchemy+unsubscr...@googlegroups.com > <mailto:sqlalchemy+unsubscr...@googlegroups.com>. > To post to this group, send email to sqlalchemy@googlegroups.com > <mailto:sqlalchemy@googlegroups.com>. > Visit this group at https://groups.google.com/group/sqlalchemy. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at https://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.