Chapter 12. Databases and Jython: Object Relational Mapping and Using JDBC

In this chapter, we will look at zxJDBC package, which is a standard part of Jython since version 2.1 and complies with the Python 2.0 DBI standard. zxJDBC can be an appropriate choice for simple one-off scripts where database portability is not a concern. In addition, it's (generally) necessary to use zxJDBC when writing a new dialect for SQLAlchemy or Django. (But that's not strictly true: you can use pg8000, a pure Python DBI driver, and of course write your own DBI drivers. But please don't do that.) So knowing how zxJDBC works can be useful when working with these packages. However, it's too low level for us to recommend for more general usage. Use SQLAlchemy or Django ...

Get The Definitive Guide to Jython: Python for the Java™ Platform now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.