Re: [sqlalchemy] create_engine returns a function, not a proper object

2017-08-19 Thread Brian Van Klaveren
Your code is buggy. You assigned the engine object then your parameters are 
actually a tuple which are immediately lost.

> On Aug 19, 2017, at 10:35 PM, Boris Epstein  wrote:
> 
> Hello all,
> 
> My call to create_engine which used to work at one point now return a 
> function object.
> 
> The code:
> 
> if self.__dbConnectParams[DB_SERVER_TAG] is not None:
> self.__dbEngine = sqlalchemy.create_engine
> ("mysql://%s:%s@%s:%s/%s" %
>  (self.__dbConnectParams[DB_SERVER_TAG][USER_TAG],
>   self.__dbConnectParams[DB_SERVER_TAG][PASSWORD_TAG],
>   self.__dbConnectParams[DB_SERVER_TAG][HOST_ADDRESS_TAG],
>   self.__dbConnectParams[DB_SERVER_TAG][PORT_TAG],
>   self.__dbConnectParams[DB_SERVER_TAG][DB_TAG]))
> 
> print "DEBUG: pt 2: " + str(self.__dbEngine)
> 
> the resulting variable:
> 
> DEBUG: pt 2: 
> 
> Can anyone explain this? How does it happen? How do I fix that?
> 
> Thanks.
> 
> Boris.
> -- 
> SQLAlchemy - 
> The Python SQL Toolkit and Object Relational Mapper
>  
> http://www.sqlalchemy.org/
>  
> To post example code, please provide an MCVE: Minimal, Complete, and 
> Verifiable Example. See http://stackoverflow.com/help/mcve for a full 
> description.
> --- 
> 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.

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
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.


Re: [sqlalchemy] Web API Wrapper for Informix Database

2016-04-03 Thread Brian Van Klaveren
I think what you actually would need to do is implement your own version of the 
DBAPI (effectively a parodying DBAPI). Then you would just configure a 
SQLAlchemy engine to use that DBAPI.

In this scenario, a requests session would be started on the acquisition of a 
cursor (or maybe on connect()). Execute could lazily set the query up and fetch 
would execute the SOAP request, download all rows (unless the SOAP service 
supports pagination) and cache them locally.

Brian

> On Apr 3, 2016, at 1:27 PM, Nathan Nelson  wrote:
> 
> hood.

-- 
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.