Skip to main content

SA dialect for MSSQL using PyODBC which handles MSSQL-specific limitations

Project description

sqlalchemy_pyodbc_mssql Readme


PyODBC is Microsoft’s recommended DBAPI layer for connecting a python application to MSSQL. However, the layer is not MSSQL-specific, and so it has some limitations:

SQLAlchemy has a PyODBC dialect for MSSQL usage, but it also shares these limitations.

[PyMSSQL]( exists as an alternative DBAPI layer and dialect for SQLAlchemy. Since it prepares queries by rolling parameters into the query string itself (properly quoted, of course) rather than issuing ODBC prepared statements, it does not share the above problems.

sqlalchemy_pyodbc_mssql extends the built-in SQLAlchemy PyODBC dialect in order to work around these limits in a manner consistent with PyMSSQL’s implementation. Most queries are passed as-is to PyODBC to be prepared and executed normally. Those that would not work, due to the above issues, are given special treatment to avoid the limitations and keep the app developer from needing to keep track of when to apply workarounds.


  • Installation
    • for usage in app: pip install sqlalchemy_pyodbc_mssql
    • to run tests: pip install sqlalchemy_pyodbc_mssql[tests]
  • Usage


0.1.0 released 2019-06-17

  • initial release

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for sqlalchemy-pyodbc-mssql, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size sqlalchemy_pyodbc_mssql-0.1.0-py2.py3-none-any.whl (6.8 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size sqlalchemy_pyodbc_mssql-0.1.0.tar.gz (6.8 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page