{ "info": { "author": "Anil Pai", "author_email": "apai@homeaway.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)", "Programming Language :: Java", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Database", "Topic :: Software Development :: Libraries :: Java Libraries", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "=================================================================\n JayDeBeApi - bridge from JDBC database drivers to Python DB-API\n=================================================================\n\n.. image:: https://img.shields.io/travis/baztian/jaydebeapi/master.svg\n :target: https://travis-ci.org/baztian/jaydebeapi\n\n.. image:: https://img.shields.io/coveralls/baztian/jaydebeapi/master.svg\n :target: https://coveralls.io/r/baztian/jaydebeapi\n\n.. image:: https://img.shields.io/badge/python-2.6,_2.7,_3.4-blue.svg\n :target: https://pypi.python.org/pypi/JayDeBeApi/\n\n.. image:: https://img.shields.io/badge/jython-2.7.0-blue.svg\n :target: https://pypi.python.org/pypi/JayDeBeApi/\n\n.. image:: https://img.shields.io/github/tag/baztian/jaydebeapi.svg\n :target: https://pypi.python.org/pypi/JayDeBeApi/\n\n.. image:: https://img.shields.io/pypi/dm/JayDeBeApi.svg\n :target: https://pypi.python.org/pypi/JayDeBeApi/\n\nThe JayDeBeApi module allows you to connect from Python code to\ndatabases using Java `JDBC\n`_. It provides a\nPython DB-API_ v2.0 to that database.\n\nIt works on ordinary Python (cPython) using the JPype_ Java\nintegration or on `Jython `_ to make use of\nthe Java JDBC driver.\n\nIn contrast to zxJDBC from the Jython project JayDeBeApi let's you\naccess a database with Jython AND Python with only minor code\nmodifications. JayDeBeApi's future goal is to provide a unique and\nfast interface to different types of JDBC-Drivers through a flexible\nplug-in mechanism.\n\n.. contents::\n\nInstall\n=======\n\nYou can get and install JayDeBeApi with `pip `_\n::\n\n $ pip install JayDeBeApi\n\nIf you want to install JayDeBeApi in Jython make sure to have pip or\nEasyInstall available for it.\n\nOr you can get a copy of the source by cloning from the `JayDeBeApi\ngithub project `_ and install\nwith ::\n\n $ python setup.py install\n\nor if you are using Jython use ::\n\n $ jython setup.py install\n\nIt has been tested with Jython 2.7.0.\n\nIf you are using cPython ensure that you have installed JPype_\nproperly. It has been tested with JPype1 0.5.7. Older JPype\ninstallations may cause problems.\n\nUsage\n=====\n\nBasically you just import the ``jaydebeapi`` Python module and execute\nthe ``connect`` method. This gives you a DB-API_ conform connection to\nthe database.\n\nThe first argument to ``connect`` is the name of the Java driver\nclass. The second argument is a string with the JDBC connection\nURL. Third you can optionally supply a sequence consisting of user and\npassword or alternatively a dictionary containing arguments that are\ninternally passed as properties to the Java\n``DriverManager.getConnection`` method. See the Javadoc of\n``DriverManager`` class for details.\n\nThe next parameter to ``connect`` is optional as well and specifies\nthe jar-Files of the driver if your classpath isn't set up\nsufficiently yet. The classpath set in ``CLASSPATH`` environment\nvariable will be honored. See the documentation of your Java runtime\nenvironment.\n\nHere is an example:\n\n>>> import jaydebeapi\n>>> conn = jaydebeapi.connect(\"org.hsqldb.jdbcDriver\",\n... \"jdbc:hsqldb:mem:.\",\n... [\"SA\", \"\"],\n... \"/path/to/hsqldb.jar\",)\n>>> curs = conn.cursor()\n>>> curs.execute('create table CUSTOMER'\n... '(\"CUST_ID\" INTEGER not null,'\n... ' \"NAME\" VARCHAR not null,'\n... ' primary key (\"CUST_ID\"))'\n... )\n>>> curs.execute(\"insert into CUSTOMER values (1, 'John')\")\n>>> curs.execute(\"select * from CUSTOMER\")\n>>> curs.fetchall()\n[(1, u'John')]\n>>> curs.close()\n>>> conn.close()\n\nAn alternative way to establish connection using connection\nproperties:\n\n>>> conn = jaydebeapi.connect(\"org.hsqldb.jdbcDriver\",\n... \"jdbc:hsqldb:mem:.\",\n... {'user': \"SA\", 'password': \"\",\n... 'other_property': \"foobar\"},\n... \"/path/to/hsqldb.jar\",)\n\n\nIf you're having trouble getting this work check if your ``JAVA_HOME``\nenvironmentvariable is set correctly. For example I have to set it on\nmy Ubuntu machine like this ::\n\n $ JAVA_HOME=/usr/lib/jvm/java-8-openjdk python\n\nSupported databases\n===================\n\nIn theory *every database with a suitable JDBC driver should work*. It\nis confirmed to work with the following databases:\n\n* SQLite\n* Hypersonic SQL (HSQLDB)\n* IBM DB2\n* IBM DB2 for mainframes\n* Oracle\n* Teradata DB\n* Netezza\n* Mimer DB\n* Microsoft SQL Server\n* MySQL\n* PostgreSQL\n* many more...\n\nContributing\n============\n\nPlease submit `bugs and patches\n`_. All contributors\nwill be acknowledged. Thanks!\n\nLicense\n=======\n\nJayDeBeApi is released under the GNU Lesser General Public license\n(LGPL). See the file ``COPYING`` and ``COPYING.LESSER`` in the\ndistribution for details.\n\n\nChangelog\n=========\n\n- Next version - unreleased\n- 1.1.1 - 2017-03-21\n\n - Don't fail on dates before 1900 on Python < 3.\n\n- 1.1.0 - 2017-03-19\n\n - Support BIT and TINYINT type mappings (thanks @Mokubyow for\n reporting the issue).\n\n- 1.0.0 - 2017-01-10\n\n - Allow for db properties to be passed to the connect\n method. *Probably incompatible to code based on previous\n versions.* See documentation of the connect method. (Thanks\n @testlnord for you efforts and the patience.)\n\n - New major version due to possible api incompatibility.\n\n- 0.2.0 - 2015-04-26\n\n - Python 3 support (requires JPype1 >= 0.6.0).\n\n- 0.1.6 - 2015-04-10\n\n - Fix Jython handling of Java exceptions that don't subclass python Exception\n\n - Enrich exceptions with message from java SQLExceptions\n\n - Be more specific about DB API exceptions: Distinguish DatabaseError and\n InterfaceError.\n\n - Fix typo LONGNARCHAR vs LONGVARCHAR (thanks @datdo for reporting #4)\n\n- 0.1.5 - 2015-03-02\n\n - Add version number to module.\n\n - Improve robustness of java to python type conversion.\n\n - Support Time type.\n\n - Add DB-API compliant exception handling.\n\n - Minor documentation improvements.\n\n - Some development related changes (Host project at github, use\n Travis CI, use JPype1 for tests).\n\n- 0.1.4 - 2013-10-29\n\n - More convenient way to setup Java classpath. *Important note*\n check the changes to the ``connect`` method and adapt your code.\n\n - Honor ``CLASSPATH`` if used in JPype mode.\n\n - Set ``.rowcount`` properly.\n\n - Changed signature of ``.setoutputsize()`` to be DB-API compliant.\n\n- 0.1.3 - 2011-01-27\n\n - Fixed DB-API_ violation: Use ``curs.execute('foo ?', (bar, baz))``\n instead of ``curs.execute('foo ?', bar, baz)``.\n\n - Free resources after ``executemany`` call.\n\n - Improved type handling. Initial support for BLOB columns.\n\n- 0.1.2 - 2011-01-25\n\n - ``easy_install JayDeBeApi`` should really work.\n\n- 0.1.1 - 2010-12-12\n\n - Fixed bug #688290 \"NULL values with converters error on fetch\".\n - Fixed bug #684909 \"Selecting ROWIDs errors out on fetch\".\n\n- 0.1 - 2010-08-10\n\n - Initial release.\n\nTo do\n=====\n\n- Extract Java calls to separate Java methods to increase performance.\n- Check if https://code.launchpad.net/dbapi-compliance can help making\n JayDeBeApi more DB-API compliant.\n- Test it on different databases and provide a flexible db specific\n pluign mechanism.\n- SQLAlchemy modules (separate project)\n\n.. _DB-API: http://www.python.org/dev/peps/pep-0249/\n.. _JPype: https://pypi.python.org/pypi/JPype1/\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/anilpai/jaydebeapi", "keywords": "db api java jdbc bridge connect sql jpype jython", "license": "GNU LGPL", "maintainer": "", "maintainer_email": "", "name": "ha_JayDeBeApi", "package_url": "https://pypi.org/project/ha_JayDeBeApi/", "platform": "", "project_url": "https://pypi.org/project/ha_JayDeBeApi/", "project_urls": { "Homepage": "https://github.com/anilpai/jaydebeapi" }, "release_url": "https://pypi.org/project/ha_JayDeBeApi/2.1.7/", "requires_dist": null, "requires_python": "", "summary": "Use JDBC database drivers from Python 2/3 or Jython with a DB-API.", "version": "2.1.7" }, "last_serial": 4446664, "releases": { "2.1.1": [ { "comment_text": "", "digests": { "md5": "189157c1a59972f5e16a2864258dcee9", "sha256": "c7a9014fdd3b7ddff7ff6bbdb323200c9a39f80c823726e3744427839865846f" }, "downloads": -1, "filename": "ha_JayDeBeApi-2.1.1.tar.gz", "has_sig": false, "md5_digest": "189157c1a59972f5e16a2864258dcee9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31057, "upload_time": "2018-10-30T19:30:52", "url": "https://files.pythonhosted.org/packages/87/5a/42a6b54ff44c4a37a069e366321b38464749eb2c45e9e7bc29e1627b7d55/ha_JayDeBeApi-2.1.1.tar.gz" } ], "2.1.2": [ { "comment_text": "", "digests": { "md5": "4c1ea9d91ce8f0d43ee36b440d8268d7", "sha256": "1d4110f00225b901cf6c4eb6849e78cbf996d44e1bb84a0695cddc4576d6b65b" }, "downloads": -1, "filename": "ha_JayDeBeApi-2.1.2.tar.gz", "has_sig": false, "md5_digest": "4c1ea9d91ce8f0d43ee36b440d8268d7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31136, "upload_time": "2018-11-01T22:05:11", "url": "https://files.pythonhosted.org/packages/e5/8f/a4b073e7279cf8483f92e323a9a63ba6af4b2863eba3459bfae24f80dc83/ha_JayDeBeApi-2.1.2.tar.gz" } ], "2.1.3": [ { "comment_text": "", "digests": { "md5": "3f622219ed14d75942756c1e3af00099", "sha256": "aeb60eb33159394ea6150cf917de99bab11cb854cbf4335c265ce255d04cc93a" }, "downloads": -1, "filename": "ha_JayDeBeApi-2.1.3.tar.gz", "has_sig": false, "md5_digest": "3f622219ed14d75942756c1e3af00099", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31138, "upload_time": "2018-11-02T21:22:54", "url": "https://files.pythonhosted.org/packages/6c/e6/e2c2992964107da3050f2c4e9757e304c4452abafcaf975bcbb1abbeb599/ha_JayDeBeApi-2.1.3.tar.gz" } ], "2.1.4": [ { "comment_text": "", "digests": { "md5": "e0d21ebd220f0b9e8192d9057bc9c0f1", "sha256": "f0f0d1d8dfdc1a464091bb411a6a0b3689341320b5fdf1e076d5e57660258eee" }, "downloads": -1, "filename": "ha_JayDeBeApi-2.1.4.tar.gz", "has_sig": false, "md5_digest": "e0d21ebd220f0b9e8192d9057bc9c0f1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31134, "upload_time": "2018-11-02T21:49:20", "url": "https://files.pythonhosted.org/packages/9e/2b/a7ebe4b5d5b57868c9a312df6f86627d824083b0a6d3b5c469af1204a7cf/ha_JayDeBeApi-2.1.4.tar.gz" } ], "2.1.5": [ { "comment_text": "", "digests": { "md5": "346360bb0e6a8cfb7a600fa47c3afc3e", "sha256": "fead1cb0830da2ae9b0fc487e5b55f5e4889af70b4251d97a4ec4738fec41cae" }, "downloads": -1, "filename": "ha_JayDeBeApi-2.1.5.tar.gz", "has_sig": false, "md5_digest": "346360bb0e6a8cfb7a600fa47c3afc3e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31138, "upload_time": "2018-11-02T22:32:46", "url": "https://files.pythonhosted.org/packages/7b/eb/7319053435d24396572adbe3d65d9d7d0e202b5108dd58503930492323b8/ha_JayDeBeApi-2.1.5.tar.gz" } ], "2.1.6": [ { "comment_text": "", "digests": { "md5": "2b38adc9ed99d84d77d48e3d6a199ded", "sha256": "be33ed3c950e4e81571dc863a09200881ac6325c5a4ee58f108ec1a9ce82ff98" }, "downloads": -1, "filename": "ha_JayDeBeApi-2.1.6.tar.gz", "has_sig": false, "md5_digest": "2b38adc9ed99d84d77d48e3d6a199ded", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31132, "upload_time": "2018-11-03T00:02:37", "url": "https://files.pythonhosted.org/packages/02/ef/d66fec89808b32d5b923997e907344a30baf722b8db4016cfdb21bdf2ff5/ha_JayDeBeApi-2.1.6.tar.gz" } ], "2.1.7": [ { "comment_text": "", "digests": { "md5": "dae4b0a8ae4b1337703840be6f14a6dc", "sha256": "d5d00d0d1af9eb7139d1ad8be4457e7513c26a0b200132b6da9baf65603dc7d2" }, "downloads": -1, "filename": "ha_JayDeBeApi-2.1.7.tar.gz", "has_sig": false, "md5_digest": "dae4b0a8ae4b1337703840be6f14a6dc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31105, "upload_time": "2018-11-03T03:49:51", "url": "https://files.pythonhosted.org/packages/1a/93/3d660eea7f2d3f0f016ef42a626dbbfb91c948020770bc05d58528118716/ha_JayDeBeApi-2.1.7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "dae4b0a8ae4b1337703840be6f14a6dc", "sha256": "d5d00d0d1af9eb7139d1ad8be4457e7513c26a0b200132b6da9baf65603dc7d2" }, "downloads": -1, "filename": "ha_JayDeBeApi-2.1.7.tar.gz", "has_sig": false, "md5_digest": "dae4b0a8ae4b1337703840be6f14a6dc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31105, "upload_time": "2018-11-03T03:49:51", "url": "https://files.pythonhosted.org/packages/1a/93/3d660eea7f2d3f0f016ef42a626dbbfb91c948020770bc05d58528118716/ha_JayDeBeApi-2.1.7.tar.gz" } ] }