[Zope-dev] zope.sqlalchemy

Andreas Jung lists at zopyx.com
Tue May 6 00:01:14 EDT 2008



--On 6. Mai 2008 02:26:58 +0100 Laurence Rowe <l at lrowe.co.uk> wrote:

> Following discussions with Kapil, Christian and Martin I've developed
> zope.sqlalchemy. The aim is to provide a common base for transaction
> integration. It does not attempt to define any particular way to handle
> database configuration as there is not yet consensus on the best way to
> handle it.
>
> I've uploaded it to zope svn and pypi. See
> http://pypi.python.org/pypi/zope.sqlalchemy
>
> Currently it depends on a development version of SQLAlchemy. I hope to
> make a release following the 0.4.6 release of SQLAlchemy.
>
> See pypi or the readme for details, but briefly usage is something like:
>
>      >>> engine = create_engine('sqlite:///')
>      >>> Session = scoped_session(sessionmaker(
>      ... bind=engine, transactional=True, autoflush=True,
>      ... extension=ZopeTransactionExtension()))
>      >>> session = Session()
>      >>> session.save(User(name='bob'))
>      >>> transaction.commit()
>
> Any comments appreciated.
>

Looks great (on the paper :-)). Trying to integrate it with z3c.sqlalchemy 
over the weekend. Thanks Laurence.

Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope-dev/attachments/20080506/d0850b01/attachment.bin


More information about the Zope-Dev mailing list