Use JDBC database drivers from Python 2/3 or Jython with a DB-API. The JayDeBeApi module allows you to connect from Python code to databases using Java. It provides a Python v2.0 to that database. It works on ordinary Python (cPython) using the Java integration or on to make use of the Java JDBC driver. In contrast to zxJDBC from the Jython project JayDeBeApi let’s you access a database with Jython AND Python with only minor code modifications. JayDeBeApi’s future goal is to provide a unique and fast interface to different types of JDBC-Drivers through a flexible plug-in mechanism. You can get and install JayDeBeApi with $ pip install JayDeBeApi If you want to install JayDeBeApi in Jython make sure to have pip or EasyInstall available for it.
Or you can get a copy of the source by cloning from the and install with $ python setup.py install or if you are using Jython use $ jython setup.py install It has been tested with Jython 2.7.0. If you are using cPython ensure that you have installed properly. It has been tested with JPype1 0.5.7. Older JPype installations may cause problems. Next version - unreleased.
1.1.1 - 2017-03-21. Don’t fail on dates before 1900 on Python = 0.6.0).
0.1.6 - 2015-04-10. Fix Jython handling of Java exceptions that don’t subclass python Exception.
Enrich exceptions with message from java SQLExceptions. Be more specific about DB API exceptions: Distinguish DatabaseError and InterfaceError. Fix typo LONGNARCHAR vs LONGVARCHAR (thanks @datdo for reporting #4).
0.1.5 - 2015-03-02. Add version number to module. Improve robustness of java to python type conversion. Support Time type. Add DB-API compliant exception handling. Minor documentation improvements. Some development related changes (Host project at github, use Travis CI, use JPype1 for tests).
0.1.4 - 2013-10-29. More convenient way to setup Java classpath. Important note check the changes to the connect method and adapt your code. Honor CLASSPATH if used in JPype mode. Set.rowcount properly.
Changed signature of.setoutputsize to be DB-API compliant. 0.1.3 - 2011-01-27.
Fixed violation: Use curs.execute('foo?' , (bar, baz)) instead of curs.execute('foo?'
. Free resources after executemany call.
Improved type handling. Initial support for BLOB columns. 0.1.2 - 2011-01-25. easyinstall JayDeBeApi should really work. 0.1.1 - 2010-12-12.
Fixed bug #688290 “NULL values with converters error on fetch”. Fixed bug #684909 “Selecting ROWIDs errors out on fetch”. Logitech quickcam express driver for windows 7. 0.1 - 2010-08-10. Initial release. Extract Java calls to separate Java methods to increase performance.
Check if can help making JayDeBeApi more DB-API compliant. Test it on different databases and provide a flexible db specific pluign mechanism.
SQLAlchemy modules (separate project) File Type Py Version Uploaded on Size Python Wheel py2 2017-03-21 14KB Python Wheel py3 2017-03-21 14KB Source 2017-03-21 31KB. Author: Bastian Bowe. Home Page:. Keywords: db api java jdbc bridge connect sql jpype jython.
License: GNU LGPL. Categories. Requires Distributions. Package Index Owner: cheffe. record.
Use JDBC database drivers from Python 2/3 or Jython with a DB-API. Latest Version: The JayDeBeApi module allows you to connect from Python code to databases using Java.
Python 2.7 Documentation
It provides a Python v2.0 to that database. It works on ordinary Python (cPython) using the Java integration or on to make use of the Java JDBC driver. In contrast to zxJDBC from the Jython project JayDeBeApi let’s you access a database with Jython AND Python with only minor code modifications. JayDeBeApi’s future goal is to provide a unique and fast interface to different types of JDBC-Drivers through a flexible plug-in mechanism.
You can get and install JayDeBeApi with $ pip install JayDeBeApi If you want to install JayDeBeApi in Jython make sure to have pip or EasyInstall available for it. Or you can get a copy of the source by cloning from the and install with $ python setup.py install or if you are using Jython use $ jython setup.py install It has been tested with Jython 2.7-rc1. If you are using cPython ensure that you have installed properly. It has been tested with JPype1 0.5.7. Older JPype installations may cause problems.
Basically you just import the jaydebeapi Python module and execute the connect method. This gives you a conform connection to the database. The first argument to connect is the name of the Java driver class. Then you can supply a single argument or a sequence of arguments that are internally passed to the Java DriverManager.getConnection method. Usually this is the JDBC connection URL. See the Javadoc of DriverManager class for details.
The next parameter to connect is optional and specifies the jar-Files of the driver if your classpath isn’t set up sufficiently yet. The classpath set in CLASSPATH environment variable will be honored. See the documentation of your Java runtime environment. Here is an example: import jaydebeapi conn = jaydebeapi.connect('org.hsqldb.jdbcDriver'. '/path/to/hsqldb.jar',) curs = conn.cursor curs.execute('create table CUSTOMER'. '('CUSTID' INTEGER not null,'.
' 'NAME' VARCHAR not null,'. ' primary key ('CUSTID'))'. ) curs.execute('insert into CUSTOMER values (1, 'John')') curs.execute('select. from CUSTOMER') curs.fetchall (1, u'John') If you’re having trouble getting this work check if your JAVAHOME environmentvariable is set correctly.
Anaconda Python 2.7
For example I have to set it on my Ubuntu machine like this $ JAVAHOME=/usr/lib/jvm/java-6-openjdk python. In theory every database with a suitable JDBC driver should work. It is known to work with the following databases: Database JDBC driver Supported Remarks 3 v056 Good Can’t interpret selected BLOBs correctly.
Python 2.7.13
Javasqlite-20110106-win32 Medium Weird type handling. 1.8.1.3 Builtin Very Good No BLOB support by database.
2 Builtin Medium Weird decimal type conversions. No BLOB support. For z/OS JDBC type 4 drivers from IBM ( db2jcc.jar) Medium.
Not thoroughly tested but seems to work without problems. Oracle 11g Oracle Thin Driver Medium Not thoroughly tests. No support for rading of timestamps yet.
Teradata DB terajdbc4.jar Medium A user reported success. Other databases Other JDBC drivers Unkown Please test yourself and report the results.
Your UMK3 download source for (Ultimate Mortal Kombat 3) netplay on Kaillera: UMK3, Juggernaut's hack, UMK Swapper, UMK Unlocker, Cheats, MAME32k 0.64, ROMs. Umk3 snes rom. Feb 25, 2016 UMK3 Juggernaut Hack v1.0 Fixed. Ahh this is both (mk3/umk3) integrated in one single rom, good stuff. The one i posted is just the umk3 rom (7.06 mb).
Next version - unreleased. 0.2.0 - 2015-04-26. Python 3 support (requires JPype1 = 0.6.0). 0.1.6 - 2015-04-10. Fix Jython handling of Java exceptions that don’t subclass python Exception. Enrich exceptions with message from java SQLExceptions.
Be more specific about DB API exceptions: Distinguish DatabaseError and InterfaceError. Download game captain tsubasa ps2 for pc full version. Fix typo LONGNARCHAR vs LONGVARCHAR (thanks @datdo for reporting #4). 0.1.5 - 2015-03-02. Add version number to module. Improve robustness of java to python type conversion.
Support Time type. Add DB-API compliant exception handling. Minor documentation improvements.
Some development related changes (Host project at github, use Travis CI, use JPype1 for tests). 0.1.4 - 2013-10-29. More convenient way to setup Java classpath. Important note check the changes to the connect method and adapt your code.
Honor CLASSPATH if used in JPype mode. Set.rowcount properly. Changed signature of.setoutputsize to be DB-API compliant. 0.1.3 - 2011-01-27. Fixed violation: Use curs.execute('foo?'
, (bar, baz)) instead of curs.execute('foo?' . Free resources after executemany call. Improved type handling. Initial support for BLOB columns. 0.1.2 - 2011-01-25.
easyinstall JayDeBeApi should really work. 0.1.1 - 2010-12-12. Fixed bug #688290 “NULL values with converters error on fetch”. Fixed bug #684909 “Selecting ROWIDs errors out on fetch”. 0.1 - 2010-08-10. Initial release.
Extract Java calls to separate Java methods to increase performance. Check if can help making JayDeBeApi more DB-API compliant. Test it on different databases and provide a flexible db specific pluign mechanism. SQLAlchemy modules (separate project) File Type Py Version Uploaded on Size Python Wheel 2.7 2015-04-26 14KB Python Wheel 3.4 2015-04-26 14KB Source 2015-04-26 30KB. Author: Bastian Bowe. Home Page:. Keywords: db api java jdbc bridge connect sql jpype jython.
License: GNU LGPL. Categories. Package Index Owner: cheffe. record.
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |