Python-only ODBC Library PyPyODBC1.0 is released. The new version is compatible with Python2.x and Python3.3. PyPyODBC is a PythonODBC Library, which can be seen as the release of the famous PyODBC... Python-only ODBC Library PyPyODBC 1.0. The new version is also compatible with Python2.x and Python3.3.
PyPyODBC is a Python ODBC Library, which can be regarded as the pure Python implementation of the famous PyODBC Library. Their usage is almost identical-like PyPy using Python to replace Python, pyPyODBC uses Python to copy PyODBC.
The PyPyODBC Library is highly compatible, embedded, and code portability based on the characteristics of pure Python code. PyPyODBC can run on CPython, IronPython, and PyPy virtual machines and run on Windows, on the Linux platform, it can run in Python 3.3, 2.4, 2.5, 2.6, 2.7, and other versions, and can be embedded in projects, you do not need to compile or install the Python ODBC library module in the runtime environment.
Other highlights:
Simple and lightweight-the PyPyODBC library has only one Python script file, and the code cannot exceed 3000 lines. You can easily embed it into your project.
Built-in Access MDB support-on the Windows platform, PyPyODBC can create an Access database without installing the Microsoft Office suite.
Sample code
import pypyodbcpypyodbc.win_create_mdb('D:\\database.mdb')connection_string = 'Driver={Microsoft Access Driver (*.mdb)};DBQ=D:\\database.mdb'connection = pypyodbc.connect(connection_string)SQL = 'CREATE TABLE saleout (id COUNTER PRIMARY KEY,product_name VARCHAR(25))'connection.cursor().execute(SQL)...
PyPyODBC
If you have a script that uses PyODBC, if you want to try PyPyODBC, all you need to do is to comment out a line of code in the script and change it to another line of code, just like this:
#import pyodbcimport pypyodbc as pyodbc