I know pyodbc is an older project and probably more featureful and robust, but is there anything about its design (based on components of compiled C code), that would make it preferable to a pure Python implementation, such as pypyodbc?
I do a lot of ETL work and am thinking of switching from a Linux/Jython/JDBC approach to Windows/Cygwin/Python/ODBC approach.
pypyodbc is very similar to pyodbc, except that it is written in pure Python under the hood. It can also be installed via pip. Our code above can be run exactly the same way, except we replace pyodbc with pypyodbc.
Pyodbc is an open source Python module that makes accessing ODBC databases simple. It implements the DB API 2.0 specification. Using pyodbc, you can easily connect Python applications to data sources with an ODBC driver.
Potential advantages of pyodbc
over pypyodbc
by being written in C would be:
Potential advantages of pypyodbc
over pyodbc
by written in Python would be:
Advantages of maturity:
The maturity thing is largely dependent on pyodbc
not being buggy. In my past experience (around 2016) that was not true and it had had a fair number of memory leak bugs etc. But since then pyodbc has been improved significantly and is now properly maintained.
The author's claim is that pypyodbc
is a reimplementation of the pyodbc
code in Python, and that would mean that the feature coverage should be equivalent. There may be some corner cases that have been less tried in the newer code though.
Disclaimer: I haven't yet tried pypyodbc
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With