Skip to main content

DB-API interface to Microsoft SQL Server for Python. (new Cython-based version)

Project description

pymssql - DB-API interface to Microsoft SQL Server

https://travis-ci.org/pymssql/pymssql.png?branch=master https://ci.appveyor.com/api/projects/status/hff0donjx2otguus/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.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…

Project details


Download files

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

Source Distribution

pymssql-2.1.2.tar.gz (898.6 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pymssql-2.1.2-cp35-cp35m-win_amd64.whl (147.4 kB view details)

Uploaded CPython 3.5mWindows x86-64

pymssql-2.1.2-cp35-cp35m-win32.whl (131.6 kB view details)

Uploaded CPython 3.5mWindows x86

pymssql-2.1.2-cp34-cp34m-win_amd64.whl (149.8 kB view details)

Uploaded CPython 3.4mWindows x86-64

pymssql-2.1.2-cp34-cp34m-win32.whl (135.8 kB view details)

Uploaded CPython 3.4mWindows x86

pymssql-2.1.2-cp33-none-win_amd64.whl (149.6 kB view details)

Uploaded CPython 3.3Windows x86-64

pymssql-2.1.2-cp33-none-win32.whl (135.7 kB view details)

Uploaded CPython 3.3Windows x86

pymssql-2.1.2-cp27-cp27m-win_amd64.whl (153.6 kB view details)

Uploaded CPython 2.7mWindows x86-64

pymssql-2.1.2-cp27-cp27m-win32.whl (134.9 kB view details)

Uploaded CPython 2.7mWindows x86

File details

Details for the file pymssql-2.1.2.tar.gz.

File metadata

  • Download URL: pymssql-2.1.2.tar.gz
  • Upload date:
  • Size: 898.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pymssql-2.1.2.tar.gz
Algorithm Hash digest
SHA256 6fcfe2a1ae195396f94d19403d88b938f975371136fef16d34d89cf8ad16dcc2
MD5 064fc6f37d00073781221a363157688a
BLAKE2b-256 c47cb8303313c0860c493e5e86c9edada29d75ecac76e502d9d1a18c1514b892

See more details on using hashes here.

File details

Details for the file pymssql-2.1.2-cp35-cp35m-win_amd64.whl.

File metadata

File hashes

Hashes for pymssql-2.1.2-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 e05416afbd8513e6f10013315a3c5733e3b74cef96396ee3637d2100d999426b
MD5 ee05a9dae385e211f51dbc912865bd48
BLAKE2b-256 88d667185cd6c2895053966eee7ae0166d172c48ce73566ba54856e1b0edcb24

See more details on using hashes here.

File details

Details for the file pymssql-2.1.2-cp35-cp35m-win32.whl.

File metadata

File hashes

Hashes for pymssql-2.1.2-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 9adc3bb808407c2e22a56d11dc553637c86d3c7ef97c1a81150a11af1a66bffc
MD5 0b84a303fb050c800fbb15c0dc954259
BLAKE2b-256 09374915a2ea8ed78bfe1e0bbc075270edd288c5825b3d201efafcc8274a485f

See more details on using hashes here.

File details

Details for the file pymssql-2.1.2-cp34-cp34m-win_amd64.whl.

File metadata

File hashes

Hashes for pymssql-2.1.2-cp34-cp34m-win_amd64.whl
Algorithm Hash digest
SHA256 0551c03e7ea37fb4f1b901886d80260bc0519e3bda79255510962d0aa8af3747
MD5 1afc987235658e5ef11c2d87fa7b886e
BLAKE2b-256 90b0093ca795509fac65787035eef7315d0c45cf3856b4f487e1b6be9f31c983

See more details on using hashes here.

File details

Details for the file pymssql-2.1.2-cp34-cp34m-win32.whl.

File metadata

File hashes

Hashes for pymssql-2.1.2-cp34-cp34m-win32.whl
Algorithm Hash digest
SHA256 971d100cc2401a0051b63b15bd2903b6a20c447c66c2824b554ba85505d12d25
MD5 6eddac111d4eeb81b55ee483c0444d88
BLAKE2b-256 3ad4ee85c3aef2c83d4946683f5d561785c67e004d7663c475b2e6ad5dc0743d

See more details on using hashes here.

File details

Details for the file pymssql-2.1.2-cp33-none-win_amd64.whl.

File metadata

File hashes

Hashes for pymssql-2.1.2-cp33-none-win_amd64.whl
Algorithm Hash digest
SHA256 0fcd2813887ea0912560ea39033a40e0364a57e8c6438f029efb7ab9509c8003
MD5 a24dd96a19e0330b132049114671d18b
BLAKE2b-256 9c204aca789d19280760706078b19f4a837034052372332edd1363a9a2f8e0be

See more details on using hashes here.

File details

Details for the file pymssql-2.1.2-cp33-none-win32.whl.

File metadata

File hashes

Hashes for pymssql-2.1.2-cp33-none-win32.whl
Algorithm Hash digest
SHA256 26602f07d7c48788f9d99acd980dae14101b72016541952dc429ba512d1cedcb
MD5 acb4488fdf54bfa32a59a00312df4784
BLAKE2b-256 b8974ee8a821c71f211421e952f1140ba4aa7c3e12df071c244906d915508358

See more details on using hashes here.

File details

Details for the file pymssql-2.1.2-cp27-cp27m-win_amd64.whl.

File metadata

File hashes

Hashes for pymssql-2.1.2-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 29f3dc61f3619f6808260bcbcd6541b593f53995c7d479e8cf6e350ffc928b28
MD5 bdc56fc2bc285fb3f09151e46504123e
BLAKE2b-256 9b12230d6e26a6102b3f6b1ee48c32a066a2a7c3d3f8f7550b15bdfe74be242b

See more details on using hashes here.

File details

Details for the file pymssql-2.1.2-cp27-cp27m-win32.whl.

File metadata

File hashes

Hashes for pymssql-2.1.2-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 859321f8225b670639606b4b1c9f8eb60e87abaf7e1738839cc48c5522c51604
MD5 9cfc10aee667aab5db6bf09f42404cde
BLAKE2b-256 5b63a3ad17672e2f27b4e3161310d7254e3a6900b75881025458e09b70fb1be6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page