Skip to main content

pymssql - DB-API interface to Microsoft SQL Server

https://travis-ci.org/pymssql/pymssql.png?branch=master https://ci.appveyor.com/api/projects/status/ts4q4nptm15ac6j7/branch/master?svg=true http://img.shields.io/pypi/dm/pymssql.svg http://img.shields.io/pypi/v/pymssql.svg

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.

Detailed information on pymssql is available on the website:

http://pymssql.org

New development is happening on GitHub at:

https://github.com/pymssql/pymssql

There is a Google Group for discussion at:

https://groups.google.com/forum/?fromgroups#!forum/pymssql

Do you use pymssql?

Can you take a minute and fill out this survey to help us prioritize development tasks?

https://www.surveymonkey.com/s/KMQ8BM5

Bitdeli badge

Recent Changes

Version 2.1.3 - 2016-06-22 - Ramiro Morales

  • We now publish Linux PEP 513 manylinux wheels on PyPI.

  • Windows official binaries: Rollback changes to Windows binaries we had implemented in pymssql 2.1.2; go back to using:

    • A statically linked version of FreeTDS (v0.95.95)

    • No SSL support

Version 2.1.2 - 2016-02-10 - Ramiro Morales

Features

  • Add ability to set TDS protocol version from pymssql when connecting to SQL Server. For the remaining pymssql 2.1.x releases its default value will be 7.1 (GH-323)

  • Add Dockerfile and a Docker image and instructions on how to use it (GH-258). This could be a convenient way to use pymssql without having to build stuff. See http://pymssql.readthedocs.org/en/latest/intro.html#docker Thanks Marc Abramowitz.

  • Floating point values are now accepted as Stored Procedure arguments (GH-287). Thanks Runzhou Li (Leo) for the report and Bill Adams for the implementation.

  • Send pymssql version in the appname TDS protocol login record field when the application doesn’t provide one (GH-354)

Bug fixes

  • Fix a couple of very common causes of segmentation faults in presence of network a partition between a pymssql-based app and SQL Server (GH-147, GH-271) Thanks Marc Abramowitz. See also GH-373.

  • Fix failures and inconsistencies in query parameter interpolation when UTF-8-encoded literals are present (GH-185). Thanks Bill Adams. Also, GH-291.

  • Fix login_timeout parameter of pymssql.connect() (GH-318)

  • Fixed some cases of cursor.rowcont having a -1 value after iterating over the value returned by pymssql cursor fetchmany() and fetchone() methods (GH-141)

  • Remove automatic treatment of string literals passed in queries that start with '0x' as hexadecimal values (GH-286)

  • Fix build fatal error when using Cython >= 0.22 (GH-311)

Internals

  • Add Appveyor hosted CI setup for running tests on Windows (GH-347)

  • Travis CI: Use newer, faster, container-based infrastructure. Also, test against more than one FreeTDS version.

  • Make it possible to build official release files (sdist, wheels) on Travis & AppVeyor.

Version 2.1.1 - 2014-11-25 - Ramiro Morales

Features

  • Custom message handlers (GH-139)

    The DB-Library API includes a callback mechanism so applications can provide functions known as message handlers that get passed informative messages sent by the server which then can be logged, shown to the user, etc.

    _mssql now allows you to install your own message handlers written in Python. See the _msssql examples and reference sections of the documentation for more details.

    Thanks Marc Abramowitz.

  • Compatibility with Azure

    It is now possible to transparently connect to SQL Server instances accessible as part of the Azure cloud services.

  • Customizable per-connection initialization SQL clauses (both in pymssql and _mssql) (GH-97)

    It is now possible to customize the SQL statements sent right after the connection is established (e.g. 'SET ANSI_NULLS ON;'). Previously it was a hard-coded list of queries. See the _mssql.MSSQLConnection documentation for more details.

    Thanks Marc Abramowitz.

  • Added ability to handle instances of uuid.UUID passed as parameters for SQL queries both in pymssql and _mssql. (GH-209)

    Thanks Marat Mavlyutov.

  • Allow using SQL Server autocommit mode from pymssql at connection opening time. This allows e.g. DDL statements like DROP DATABASE to be executed. (GH-210)

    Thanks Marat Mavlyutov.

  • Documentation: Explicitly mention minimum versions supported of Python (2.6) and SQL Server (2005).

  • Incremental enhancements to the documentation.

Bug fixes

  • Handle errors when calling Stored Procedures via the .callproc() pymssql cursor method. Now it will raise a DB-API DatabaseException; previously it allowed a _mssql.MSSQLDatabaseException exception to surface.

  • Fixes in tds_version _mssql connections property value

    Made it work with TDS protocol version 7.2. (GH-211)

    The value returned for TDS version 7.1 is still 8.0 for backward compatibility (this is because such feature got added in times when Microsoft documentation labeled the two protocol versions that followed 7.0 as 8.0 and 9.0; later it changed them to 7.1 and 7.2 respectively) and will be corrected in a future release (2.2).

  • PEP 249 compliance (GH-251)

    Added type constructors to increase compatibility with other libraries.

    Thanks Aymeric Augustin.

  • pymssql: Made handling of integer SP params more robust (GH-237)

  • Check lower bound value when convering integer values from to Python to SQL (GH-238)

Internals

  • Completed migration of the test suite from nose to py.test.

  • Added a few more test cases to our suite.

  • Tests: Modified a couple of test cases so the full suite can be run against SQL Server 2005.

  • Added testing of successful build of documentation to Travis CI script.

  • Build process: Cleanup intermediate and ad-hoc anciliary files (GH-231, GH-273)

  • setup.py: Fixed handling of release tarballs contents so no extraneous files are shipped and the documentation tree is actually included. Also, removed unused code.

Version 2.1.0 - 2014-02-25 - Marc Abramowitz

Features

Bug Fixes

See ChangeLog for older history…

Release files for pymssql 2.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pymssql 2.1.3
File Size Uploaded
pymssql-2.1.3.tar.gz 898.0 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for pymssql 2.1.3
File
pymssql-2.1.3-cp35-cp35m-win_amd64.whl CPython 3.5 CPython 3.5 pymalloc Windows x86-64 Details
pymssql-2.1.3-cp35-cp35m-win32.whl CPython 3.5 CPython 3.5 pymalloc Windows x86-32 Details
pymssql-2.1.3-cp35-cp35m-manylinux1_x86_64.whl CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-64 Details
pymssql-2.1.3-cp35-cp35m-manylinux1_i686.whl CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-32 Details
pymssql-2.1.3-cp34-cp34m-win_amd64.whl CPython 3.4 CPython 3.4 pymalloc Windows x86-64 Details
pymssql-2.1.3-cp34-cp34m-win32.whl CPython 3.4 CPython 3.4 pymalloc Windows x86-32 Details
pymssql-2.1.3-cp34-cp34m-manylinux1_x86_64.whl CPython 3.4 CPython 3.4 pymalloc Linux glibc 2.5+ x86-64 Details
pymssql-2.1.3-cp34-cp34m-manylinux1_i686.whl CPython 3.4 CPython 3.4 pymalloc Linux glibc 2.5+ x86-32 Details
pymssql-2.1.3-cp33-cp33m-win_amd64.whl CPython 3.3 CPython 3.3 pymalloc Windows x86-64 Details
pymssql-2.1.3-cp33-cp33m-win32.whl CPython 3.3 CPython 3.3 pymalloc Windows x86-32 Details
pymssql-2.1.3-cp33-cp33m-manylinux1_x86_64.whl CPython 3.3 CPython 3.3 pymalloc Linux glibc 2.5+ x86-64 Details
pymssql-2.1.3-cp33-cp33m-manylinux1_i686.whl CPython 3.3 CPython 3.3 pymalloc Linux glibc 2.5+ x86-32 Details
pymssql-2.1.3-cp27-cp27mu-manylinux1_x86_64.whl CPython 2.7 CPython 2.7 pymalloc wide-unicode Linux glibc 2.5+ x86-64 Details
pymssql-2.1.3-cp27-cp27mu-manylinux1_i686.whl CPython 2.7 CPython 2.7 pymalloc wide-unicode Linux glibc 2.5+ x86-32 Details
pymssql-2.1.3-cp27-cp27m-win_amd64.whl CPython 2.7 CPython 2.7 pymalloc Windows x86-64 Details
pymssql-2.1.3-cp27-cp27m-win32.whl CPython 2.7 CPython 2.7 pymalloc Windows x86-32 Details

Total release size: 12.5 MB

Release files / pymssql-2.1.3.tar.gz

Download URL pymssql-2.1.3.tar.gz
Size 898.0 kB
Tags Source
SHA-256 checksum
How to use checksums
afcef0fc9636fb059d8e2070978d8b66852f4046531638b12610adc634152427
BLAKE2b-256 checksum
How to use checksums
4cc85ad36d8d3c304ab4f310c89d0593ab7b6229568dd8e9cde927311b2f0c00
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pymssql-2.1.3-cp35-cp35m-win_amd64.whl

Download URL pymssql-2.1.3-cp35-cp35m-win_amd64.whl
Size 367.4 kB
Tags CPython 3.5 CPython 3.5 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
00e192f7b9baa9ac6f041dd37158bba0a677b37bb9d752a9a06cc81873d6af8a
BLAKE2b-256 checksum
How to use checksums
b225b60fd3fe28f7102b8880078ca3c5ce8faac82e2d402ed943048f80ef57ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pymssql-2.1.3-cp35-cp35m-win32.whl

Download URL pymssql-2.1.3-cp35-cp35m-win32.whl
Size 322.3 kB
Tags CPython 3.5 CPython 3.5 pymalloc Windows x86-32
SHA-256 checksum
How to use checksums
08536da367a04f019e6f5cb99bafd4b9b28b818789338ac9245f771298c1d7e0
BLAKE2b-256 checksum
How to use checksums
b4aa9578d384a4b0bbdcb3df66bb874d62e26d6a817c4f799a054351af76aeee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pymssql-2.1.3-cp35-cp35m-manylinux1_x86_64.whl

Download URL pymssql-2.1.3-cp35-cp35m-manylinux1_x86_64.whl
Size 1.2 MB
Tags CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
c037443a51a51fb735b98e40b8366e7524191c2919acead6100b76652c49adeb
BLAKE2b-256 checksum
How to use checksums
fb778f5fc8953ea9ac88a5e108ed1da059a1a59251537224a4853df587e9060c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pymssql-2.1.3-cp35-cp35m-manylinux1_i686.whl

Download URL pymssql-2.1.3-cp35-cp35m-manylinux1_i686.whl
Size 1.1 MB
Tags CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-32
SHA-256 checksum
How to use checksums
326fbcbab78d8760464170e64963c4ab2b6043969f95afa22e65e57601fc7311
BLAKE2b-256 checksum
How to use checksums
d2c7a0e18a482021d4aa353f5a21d495196cdac03be39687e2a04def167e1ddc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pymssql-2.1.3-cp34-cp34m-win_amd64.whl

Download URL pymssql-2.1.3-cp34-cp34m-win_amd64.whl
Size 371.3 kB
Tags CPython 3.4 CPython 3.4 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
4b492f716a496d9b1362652e30d20c10f4e1f99c9954485e080d5e0020863cf4
BLAKE2b-256 checksum
How to use checksums
05b1f4311c7353a93ac11bd1c5351f7bb94dbc8ed6abf198513baedfe2cffed4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pymssql-2.1.3-cp34-cp34m-win32.whl

Download URL pymssql-2.1.3-cp34-cp34m-win32.whl
Size 331.5 kB
Tags CPython 3.4 CPython 3.4 pymalloc Windows x86-32
SHA-256 checksum
How to use checksums
ae457d935a16f571e521ebb923fb26e9ba6ea2f10cabb7337aa4859d0e3c23b8
BLAKE2b-256 checksum
How to use checksums
7a527b43e4aa231093f2f4908b00f545446e61a02d37aa80130e1f6c1b2ebde4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pymssql-2.1.3-cp34-cp34m-manylinux1_x86_64.whl

Download URL pymssql-2.1.3-cp34-cp34m-manylinux1_x86_64.whl
Size 1.2 MB
Tags CPython 3.4 CPython 3.4 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
2ee1e5a9f182f8a15af8c1e3729828266711796e53eb3b201b6cd66c93fd6ec0
BLAKE2b-256 checksum
How to use checksums
d8648cc2afa710e4055417b474332b1a4b6c95fd56c548d4d78f80d4770ac2bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pymssql-2.1.3-cp34-cp34m-manylinux1_i686.whl

Download URL pymssql-2.1.3-cp34-cp34m-manylinux1_i686.whl
Size 1.1 MB
Tags CPython 3.4 CPython 3.4 pymalloc Linux glibc 2.5+ x86-32
SHA-256 checksum
How to use checksums
fb2f9f61349c35ce9719fc682389340d9c35aa500cdc00f053852e83af978eeb
BLAKE2b-256 checksum
How to use checksums
7af460f4b928b1568912d021129960ac42839407844f0a5680c7d528757b591b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pymssql-2.1.3-cp33-cp33m-win_amd64.whl

Download URL pymssql-2.1.3-cp33-cp33m-win_amd64.whl
Size 371.3 kB
Tags CPython 3.3 CPython 3.3 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
fad32f5eac10bc23bdd09b047d3b0b7a4c2282649eaedc369622c4ead754ed38
BLAKE2b-256 checksum
How to use checksums
1eb6b8bc34e5a5c2b9dbe18747d9ab636e89ecaaeca104fa0e5930f44d1ec418
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pymssql-2.1.3-cp33-cp33m-win32.whl

Download URL pymssql-2.1.3-cp33-cp33m-win32.whl
Size 331.6 kB
Tags CPython 3.3 CPython 3.3 pymalloc Windows x86-32
SHA-256 checksum
How to use checksums
f613f48e959444ec6055f606e30bb44e758fcae05f7c60396fa0461a53252d9c
BLAKE2b-256 checksum
How to use checksums
63b54d0bde165908050a64476b84b9476ef26b672bf2291df77866301c4c1da5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pymssql-2.1.3-cp33-cp33m-manylinux1_x86_64.whl

Download URL pymssql-2.1.3-cp33-cp33m-manylinux1_x86_64.whl
Size 1.1 MB
Tags CPython 3.3 CPython 3.3 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
b669eb4c39365478708ebd81d8251621fa62404715c679045a6365ed467976b9
BLAKE2b-256 checksum
How to use checksums
865559ab7e85bb5d92ffadf866955cab4d65b11d120d2d4fd289096ed19d77fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pymssql-2.1.3-cp33-cp33m-manylinux1_i686.whl

Download URL pymssql-2.1.3-cp33-cp33m-manylinux1_i686.whl
Size 1.0 MB
Tags CPython 3.3 CPython 3.3 pymalloc Linux glibc 2.5+ x86-32
SHA-256 checksum
How to use checksums
eabcbdd6672e85877c3776aa980ef29d0ec60a71f17b2c74bc956a0bd583589c
BLAKE2b-256 checksum
How to use checksums
5c8e5ae9d8894cbd15f6add2222095e944e2d4974cb11db4aad1eb5eee52026a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pymssql-2.1.3-cp27-cp27mu-manylinux1_x86_64.whl

Download URL pymssql-2.1.3-cp27-cp27mu-manylinux1_x86_64.whl
Size 1.1 MB
Tags CPython 2.7 CPython 2.7 pymalloc wide-unicode Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
5c95871a5206525d1dab1dfdeb47541636cc0e4f76261a71a272e40c5ae85c58
BLAKE2b-256 checksum
How to use checksums
dc0409caa729202cc49071e284ee907373fd68da4fe4e01dae88f80c31de008d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pymssql-2.1.3-cp27-cp27mu-manylinux1_i686.whl

Download URL pymssql-2.1.3-cp27-cp27mu-manylinux1_i686.whl
Size 1.0 MB
Tags CPython 2.7 CPython 2.7 pymalloc wide-unicode Linux glibc 2.5+ x86-32
SHA-256 checksum
How to use checksums
f4a563f45116430631712e1ed13e1489e1a1ba912378743d7c08b75620e96e19
BLAKE2b-256 checksum
How to use checksums
64dea772974ce35d80fa7b490d68a0a1857bdf4a6642359681de76564a6cf938
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pymssql-2.1.3-cp27-cp27m-win_amd64.whl

Download URL pymssql-2.1.3-cp27-cp27m-win_amd64.whl
Size 377.0 kB
Tags CPython 2.7 CPython 2.7 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
f4d4e2a49c52656bd30ed3f636bda01656af593992b2f1ee80b6ae7b9dc2101e
BLAKE2b-256 checksum
How to use checksums
a9dcd8b90c53a9a5ae1b23cb5403df68eedd5724837db0331e0de100628c9990
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pymssql-2.1.3-cp27-cp27m-win32.whl

Download URL pymssql-2.1.3-cp27-cp27m-win32.whl
Size 330.0 kB
Tags CPython 2.7 CPython 2.7 pymalloc Windows x86-32
SHA-256 checksum
How to use checksums
017207aed3f43a5f0daa930a208f3ea33ee7dd356c56cae1d0c6cb8b4519f09a
BLAKE2b-256 checksum
How to use checksums
d946c94207c8242958b2087262e03597e66600357a2bd180c0a19de17474bfb9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

2.3.8

49 release files

2.3.7

41 release files

2.3.6

41 release files

2.3.5

41 release files

2.3.2

58 release files

2.3.1

81 release files

2.2.9

58 release files

2.2.8

32 release files

2.2.7

61 release files

2.2.6

50 release files

2.2.5

51 release files

2.2.4

51 release files

2.2.3

45 release files

2.2.2

42 release files

2.2.1

42 release files

2.1.5

29 release files

2.1.4

23 release files

This release

2.1.3 This release

17 release files

2.1.2

9 release files

2.1.1

25 release files

2.1.0

23 release files

2.0.1

23 release files

2.0.0

23 release files

1.0.3

6 release files

1.0.2

5 release files

1.0.1

5 release files

1.0.0

4 release files

0.7.4

0.7.1

0.6.0

0.5.2

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page