[sqlalchemy] Best practices for using SQLAlchemy with generators?

2009-03-23 Thread Noah Gift
Does anyone have any recommendations for best practices for using SQLAlchemy
with generators?  While generators are quite nice for creating data
processing pipelines, I wondered if anyone had any specific recommendations
about potential, subtle, bottlenecks with SQLAlchemy to watch out for.

-- 
Cheers,

Noah

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~--~~~~--~~--~--~---



[sqlalchemy] Re: Application performance

2009-03-19 Thread Noah Gift
On Thu, Mar 19, 2009 at 11:20 PM, Andreas Jung  wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> On 19.03.2009 11:14 Uhr, Alex K wrote:
> > Well, it does not affect the performance and I still get:
>
> The Python profiler will tell you exactly about bottlenecks.
> So go and profile your code.
>

That is a good idea.  Also, I notice that you set the connection to utf8 in
the ORM, but I don't see that in the SQL.  Are you making the db encode from
say latin1 to utf8 possibly?


>
> - -aj
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.9 (Darwin)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAknCHHwACgkQCJIWIbr9KYxYDQCg0Iv9BHkS0h/21SJf3duluOhB
> 61kAn3DDo/OtLn5aU8gldAH4PGxpoK5w
> =zBz2
> -END PGP SIGNATURE-
>
> >
>


-- 
Cheers,

Noah

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~--~~~~--~~--~--~---



[sqlalchemy] Re: Any one tried to use SqlAlchemy with XML RPC?

2009-03-18 Thread Noah Gift
On Wed, Mar 18, 2009 at 11:46 PM, 一首诗  wrote:

>
> Hi,
>
> I am trying to pass SqlAlchemy objects to client with XML RPC, but it
> seems that that's not very easy.


It depends on what you are trying to do, and what error messages you are
getting, for anyone to help.  I am using XML RPC with SQLAlchemy right now,
and I am, in fact, passing objects in.  I wrote a metaclass that calls back
to XML RPC, and takes the ugly nested dictionary and returns back a nifty
class pre-populated with attributes I need to fill out.  When I set each
attribute, it then populates __dict__.  At that point, I simply pass that
back to XML RPC.  Works great.


>
>
> The reason why I have to do this is that my client is written in
> javascript and running on a web page.  So it could not use anything
> other than text based protocols, such as XML RPC, SOAP, or JSON.
>
> I tried pyamf, and it works pretty good with SA,  but I can't use amf
> with javascript.
>
> Is there any possible solutions with my problem?
> >
>


-- 
Cheers,

Noah

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~--~~~~--~~--~--~---



[sqlalchemy] Re: SQLAlchemy based syndication feed framework?

2009-03-11 Thread Noah Gift
-- Forwarded message --
From: Walter Cruz 
Date: Thu, Mar 12, 2009 at 12:19 PM
Subject: [sqlalchemy] Re: SQLAlchemy based syndication feed framework?
To: sqlalchemy@googlegroups.com


webhelpers, from Pylons, has a handy rss generator.

I use it with SQLAlchemy, works fine.


Hmm, this app will talk to a few other Pylons apps at some point, so I will
have a look, thanks for the tip!




On Wed, Mar 11, 2009 at 8:00 PM, Noah Gift  wrote:

>
>
> On Thu, Mar 12, 2009 at 11:25 AM, Noah Gift  wrote:
>
>> Does anyone on this list know of a simple WSGI compatible, SQLAlchemy
>> based feed framework, like the one offered with Django:
>> http://docs.djangoproject.com/en/dev/ref/contrib/syndication/?from=olddocs
>>
>> To answer my own question, I found this:
>
> http://www.dalkescientific.com/Python/PyRSS2Gen.html
>
> Which looks fairly easy to combine with SQLAlchemy + something like this:
> http://pypi.python.org/pypi/urlrelay/0.6
>
> Hmm, maybe I will make this into a library.
>
>>
>>
>> --
>> Cheers,
>>
>> Noah
>>
>
>
>
> --
> Cheers,
>
> Noah
>
>
>


-- 
[]'
- Walter
waltercruz.com





-- 
Cheers,

Noah

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~--~~~~--~~--~--~---



[sqlalchemy] Re: SQLAlchemy based syndication feed framework?

2009-03-11 Thread Noah Gift
On Thu, Mar 12, 2009 at 11:25 AM, Noah Gift  wrote:

> Does anyone on this list know of a simple WSGI compatible, SQLAlchemy based
> feed framework, like the one offered with Django:
> http://docs.djangoproject.com/en/dev/ref/contrib/syndication/?from=olddocs
>
> To answer my own question, I found this:

http://www.dalkescientific.com/Python/PyRSS2Gen.html

Which looks fairly easy to combine with SQLAlchemy + something like this:
http://pypi.python.org/pypi/urlrelay/0.6

Hmm, maybe I will make this into a library.

>
>
> --
> Cheers,
>
> Noah
>



-- 
Cheers,

Noah

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~--~~~~--~~--~--~---



[sqlalchemy] SQLAlchemy based syndication feed framework?

2009-03-11 Thread Noah Gift
Does anyone on this list know of a simple WSGI compatible, SQLAlchemy based
feed framework, like the one offered with Django:
http://docs.djangoproject.com/en/dev/ref/contrib/syndication/?from=olddocs



-- 
Cheers,

Noah

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~--~~~~--~~--~--~---



[sqlalchemy] Joining on Two Databases on Same Database Server Using SQLSoup

2009-03-06 Thread Noah Gift

Sorry if this is a double post, I think my last message barfed:

I was wondering if this was theoretically possible with SqlSoup +
SqlAlchemy.  Here is the SQL:

SELECT p.ShotID, s.shot_ID FROM Production.Production p JOIN
Shots.Shots s on p.ShotID = s.shot_ID;

I have two databases that live on the same MySQL box, but wanted to
perform a similar join with SqlSoup.  I did a quick search but didn't
come up with anything, has anyone done something like this?  If not is
how does Sqlalchemy handle this typically.

-- 
Cheers,

Noah

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~--~~~~--~~--~--~---



[sqlalchemy] Re: major help required with SQLAlchemy and Turbogears.

2007-06-30 Thread Noah Gift
On 6/30/07, Michael Bayer <[EMAIL PROTECTED]> wrote:
>
>
>
>
> On Jun 30, 4:41 pm, SamDonaldson <[EMAIL PROTECTED]> wrote:
> > I wrote a custom query and selected a few columns out of a table.  I
> > then wanted to 'instantiatize' it so that i could reference the
> > attributes as an object so I did that by calling the constructor of
> > the sqlalchemy class that maps to the table.  Now, I believe, since
> > these classes were instantiated, sqlalchemy will try to force commit
> > them at the end of the session.
>
> not at all.  SA doesnt do anything automatic in this regard; only if
> you say session.flush().
>
> however: i am under the impression that Turbogears issues an explicit
> SessionTransaction for every controller method.  if so, this action
> *will* issue a flush() for every controller request.  so this would be
> because thats how TG does it, via closing their SessionTransaction.
> Pylons doesnt do anything like this..its much less opinionated.


This is what messed me up too when I first starting using SA w/ turbogears.
 I did not know that a transaction occurred automatically with the
controller and I wanted to use a transaction as part of the error handler
validation and if a transaction failed do something.  I later figured it out
with the help of a few friends, but it is kind of a gotcha for people using
TG1.0 as they may read the SA tutorial like good children and hear about all
of the explicit handling of transactions, which is good I agree, then they
use TG controller and is implicit.


-- 
http://www.blog.noahgift.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~--~~~~--~~--~--~---