Ctypes-based Python interface to Oracle, compatible with cx_Oracle
Project description
cx_oracle_on_ctypes
What
cx_Oracle re-written in Python, using ctypes to interface with Oracle native code. 100% API-compatible with cx_Oracle.
Why?!
cx_Oracle is great code, but as many CPython extensions, it is not compatible with other Python implementations. I rewrote it in Python to be able to use PyPy and possibly Jython and IronPython. Also, ctypes is the recommended way to integrate C code with PyPy, as it can benefit from the JIT and no CPython emulation must be done.
How good is it?
Most of the Oracle datatypes are implemented and most of tests from cx_Oracle pass. Django works. Tested with Oracle 10 and 11. The performance is not as good as cx_Oracle yet, but it improves fast as PyPy’s JIT improves.
Installation
As in cx_Oracle, you need the binary library from Oracle ( the instant client will suffice ) and you need to setup the environment variables so that Python can find it. As an example, take a look into https://github.com/lameiro/cx_oracle_on_ctypes/blob/master/test/setup_test_env_10.sh and adapt accordingly.
To install the python module, just put the cx_Oracle dir in your PYTHONPATH.
License
3-clause BSD, like cx_Oracle. See http://opensource.org/licenses/BSD-3-Clause
Differences
cx_oracle_on_ctypes is 100% API compatible with cx_Oracle. If you find any missing functionality, even if it is not in the DB-API specification, report a bug.
Contributing
Feedback and patches are welcome. Send them through the issue tracker or by e-mail.
Changelog
0.1 (unreleased)
Add packaging-files like setup.py, setup.cfg, MANIFEST.in [WouterVH]
Fix thread-safety issues with the DescriptorManager. Fixes https://github.com/lameiro/cx_oracle_on_ctypes/issues/8 [lameiro / K0Te]
Fix StatementError: 'module' object has no attribute 'Binary' in SqlAlchemy. Fixes https://github.com/lameiro/cx_oracle_on_ctypes/issues/6 [lameiro]
Support kwargs for sid and service name. Fixes sqlalchemy create_engine. Fixes https://github.com/lameiro/cx_oracle_on_ctypes/issues/5 [lameiro / muxueqz]
Compatibility with oracle 12. Fixes https://github.com/lameiro/cx_oracle_on_ctypes/issues/4 [lameiro]
Fix type in OCILobIsTemporary-function-call. Fixes https://github.com/lameiro/cx_oracle_on_ctypes/issues/2 [K0Te]
Fix error on windows. Fixes https://github.com/lameiro/cx_oracle_on_ctypes/issues/2 [lameiro]
Initial implementation [lameiro]
Contributors
Leandro Lameiro <lameiro@gmail.com>
K0Te <juravel2@gmail.com>
Pei-Lun Lee <ypcat6@gmail.com>
Wouter Vanden Hove <wouter.vanden.hove@bics.com>
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file cx_oracle_on_ctypes-0.1.dev0.tar.gz
.
File metadata
- Download URL: cx_oracle_on_ctypes-0.1.dev0.tar.gz
- Upload date:
- Size: 381.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef9ed6aae66fceb21869d7ea74193a192e3baaf22215c9094debb875bf0772bb |
|
MD5 | cd9f23e873bfbb39ee5fc77979a81e4d |
|
BLAKE2b-256 | 57cc40717320ef14f5c508adde5146de01b4a3301e178431cab2e9c922f141e5 |