pymssql
A simple database interface for Python that builds on top of FreeTDS to provide a Python DB-API (PEP-249) interface to Microsoft SQL Server.
The wheels of pymssql are built against the latest release of FreeTDS and could be found on PyPI Project.
Resources
Features
Unicode friendly
Python 3 friendly
Works on most popular operating systems
Written in Cython for performance
Includes a supported and documented low-level module (
_mssql
) that you can use instead of the DB-APISupports stored procedures with both return values and output parameters
Supports bulk copy
A comprehensive test suite
Compatible with cooperative multi-tasking systems (gevent, etc.)
Can be used to connect to Azure
License
pymssql is licensed under the terms of the GNU LGPL license.
Documentation
- Introduction
pymssql
examples_mssql
examples- Release notes
- FreeTDS
pymssql
module reference_mssql
module reference- Migrating from 1.x to 2.x
- Frequently asked questions
- Cannot connect to SQL Server
- Returned dates are not correct
- pymssql does not unserialize
DATE
andTIME
columns todatetime.date
anddatetime.time
instances - Shared object “libsybdb.so.3” not found
- “DB-Lib error message 20004, severity 9: Read from SQL server failed” error appears
- Unable to use long username and password
- Error in stored procedure does not throw Python exception
- More troubleshooting
- Building and developing pymssql
- FreeTDS and dates
- Connecting to Azure SQL Database
- Docker
- Change log
- Recent Changes
- Version 2.3.2 - 2024-11-20 - Mikhail Terekhov
- Version 2.3.1 - 2024-08-25 - Mikhail Terekhov
- Version 2.3.0 - 2024-04-06 - Mikhail Terekhov
- Version 2.2.11 - 2023-12-03 - Mikhail Terekhov
- Version 2.2.10 - 2023-10-20 - Mikhail Terekhov
- Version 2.2.9 - 2023-10-13 - Mikhail Terekhov
- Version 2.2.8 - 2023-07-30 - Mikhail Terekhov
- Version 2.2.7 - 2022-11-15 - Mikhail Terekhov
- Version 2.2.6 - 2022-11-12 - Mikhail Terekhov
- Version 2.2.5 - 2022-04-12 - Mikhail Terekhov
- Version 2.2.4 - 2022-01-23 - Mikhail Terekhov
- Version 2.2.3 - 2021-12-21 - Mikhail Terekhov
- Version 2.2.2 - 2021-07-24 - Mikhail Terekhov
- Version 2.2.1 - 2021-04-15 - Mikhail Terekhov
- Version 2.2.0 - 2021-04-08 - Mikhail Terekhov
- Version 2.1.5 - 2020-09-17 - Mikhail Terekhov
- Version 2.1.4 - 2018-08-28 - Alex Hagerman
- Version 2.1.3 - 2016-06-22 - Ramiro Morales
- Version 2.1.2 - 2016-02-10 - Ramiro Morales
- Version 2.1.1 - 2014-11-25 - Ramiro Morales
- Version 2.1.0 - 2014-02-25 - Marc Abramowitz
- TODO