DB-API interface to Microsoft SQL Server for Python. (new Cython-based version)
Project description
pymssql - DB-API interface to Microsoft SQL Server
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:
New development is happening on GitHub at:
There is a Google Group for discussion at:
Getting started
pymssql wheels are available from PyPi. To install it run:
pip install pymssql
Most of the times this should be all what’s needed. The official pymssql wheels bundle a static copy of FreeTDS and have SSL support so they can be used to connect to Azure.
Basic example
conn = pymssql.connect(server, user, password, "tempdb")
cursor = conn.cursor(as_dict=True)
cursor.execute('SELECT * FROM persons WHERE salesrep=%s', 'John Doe')
for row in cursor:
print("ID=%d, Name=%s" % (row['id'], row['name']))
conn.close()
Recent Changes
Version 2.2.0 - 2021-04-08 - Mikhail Terekhov
General
Add Python-3.9 to the build and test matrix.
Drop support for Python2 and Python3 < 3.6.
Use FreeTDS-1.2.18 for official wheels on PyPi.
Features
Support bulk copy (#279). Thanks to Simon.StJG (PR-689).
Wheels on PyPI link FreeTDS statically.
Wheels on PyPI linked against OpenSSL.
Convert pymssql to a package. Potential compatibility issue: projects using low level _mssql module need to import it from pymssql first.
Bug fixes
Fixed a deadlock caused by a missing release of GIL (#540), thanks to filip.stefanak (PR-541) and Juraj Bubniak (PR-683).
Prevents memory leak on login failure. Thanks to caogtaa and Simon.StJG (PR-690).
Fix check for TDS version (#652 and #669).
Documentation fixes. Thanks to Simon Biggs, Shane Kimble, Simon.StJG and Dale Evans.
Internals
Introduce script dev/build.py to build FreeTDS and pymssql wheels.
Simplify setup.py, introduce environment variables to select FreeTDS includes and libraries.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for pymssql-2.2.0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0157d2c0f31449d46a2b7bfa77b82eec59b51664050ef9ae2e599405f78a8c44 |
|
MD5 | aa0c8ef1aeaa183ca05cd16ba2d938a9 |
|
BLAKE2b-256 | 53fbd844deb0a6fd11bf85ca78de5058c9505c66053c221bcebb8b20ed8664f9 |
Hashes for pymssql-2.2.0-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8bea5b5fd256800e458a1582166b751c9b392658510e9b823cfc71f800b3961a |
|
MD5 | 3807094ce60a911763037c5478092454 |
|
BLAKE2b-256 | 118ed3c6a41d90f0dcf7dc9f76db100202efe846f0b72e61ae5b73fea78d342c |
Hashes for pymssql-2.2.0-cp39-cp39-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8d795c1da83edcbff50579f55dc676a5542228d9f05703d23f5df314d4e7070 |
|
MD5 | 0e432c190c2c487758deff60b614d3db |
|
BLAKE2b-256 | 84edad6f5dfd742ffff317ddc8551b13f7935230dba6088d8cc0bb3dbadbb086 |
Hashes for pymssql-2.2.0-cp39-cp39-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6271b4d08de2fb72d13a1ce4c4fdeeec1657cacebd724d24011342acfc7cbbb |
|
MD5 | 4a5b655c82cdbafd44982e515aa025f3 |
|
BLAKE2b-256 | 722e0c4422d7c476bc89b004b99c8b8087f2911ab6b087e9f298a038ab1b703d |
Hashes for pymssql-2.2.0-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c619e10ebebaf86d29b6d9ec6c4fc09e4fcc7bdaa6ad3e9878883c0b7c1ef95 |
|
MD5 | 6d55104a4d3df2f67e03a48b41db6ba3 |
|
BLAKE2b-256 | 2ab448efcae0227d9107794e7f9c1a3f36173944a727c92156a5c927634496ae |
Hashes for pymssql-2.2.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 436e51c34bf44f1e8d870227ccd160a2b667d23864371a972a1e972aeea63663 |
|
MD5 | 9ced9281fba93c75d44eaf3605dd3492 |
|
BLAKE2b-256 | 7ff2ae885e9b02f69495ce7186e71983cc5a76747d1260894561b425bbe5177d |
Hashes for pymssql-2.2.0-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 05d8f23809a4bf1bbd419b75c9879e16ad4c172aedd3db85b6b80b5b47035342 |
|
MD5 | 63e8a8f20889fe54886501e8706540d1 |
|
BLAKE2b-256 | 67b530169fd599ae48b6d26f1a791556da56f78bc6bcc442c3ba2bc28a38b534 |
Hashes for pymssql-2.2.0-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2589d113e0a96ceed07fcd508b194d0ed3abf7c6b1549d44fe30ab135583208f |
|
MD5 | 93830136fe9a3884fc5aed5a15f42d2e |
|
BLAKE2b-256 | 87d3ed17e46895965cdc8add8368eb94e83a7a56bf013d1df024668f3ddbdd9c |
Hashes for pymssql-2.2.0-cp38-cp38-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29aa99e03c518391b954d7cc53657bbf0d0105001e73a0b1a3f39c7afeecb419 |
|
MD5 | 8e84765f1170e1f53e4bf1a44ed1c551 |
|
BLAKE2b-256 | 85ca6b5ac393cb0cfbeb097c657106d76a36fda281923146ca41053672eb2685 |
Hashes for pymssql-2.2.0-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13a99caf54e4c5807118dbeae5772110a1827f21d2dde65f21aba9aa9339db96 |
|
MD5 | 1d3bffe4e08c7959d996e855cb670bbd |
|
BLAKE2b-256 | 4751f1b6bfd6da79cbbae4092d84c24dd87884e8b2413df4f22112ac51672a1b |
Hashes for pymssql-2.2.0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d142aeadf364590d8289a91a1e4ecc6869979232bdd0b55444f1558c3e2aa13d |
|
MD5 | 0ecf4748c9d3b4fc90303ed294b16ef1 |
|
BLAKE2b-256 | a7f643b5d683d577540b3efb5a371c13d04bdaa7bb17641481ffc78cad7eda8c |
Hashes for pymssql-2.2.0-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a458b536960a4036f62718726582f24844db8585f6f8f635b336e8cf7b0a85aa |
|
MD5 | d43e6507e8b50dd30af461af08bbec05 |
|
BLAKE2b-256 | 24b593264263772bf90abc027394bd097bbd94f4ece70f6e43b67d053f575a60 |
Hashes for pymssql-2.2.0-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b63265ff588448c925ed08fa0520da0081933d32f0530f5ab83c7cf3c3aeee3f |
|
MD5 | 5ed7d40a4e2a41f0859a12b6ac3908dd |
|
BLAKE2b-256 | 7f5c9958fcbbd99cb3a31fe5f4d44c5fda4a36fd17048a7704c05b7d01fa227a |
Hashes for pymssql-2.2.0-cp37-cp37m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7e97fca8485f45df57e9b6dd2aebdb1752481418284b0b6dcd7b847c2cab7fb |
|
MD5 | 9cbc5b6f01945737b4504ddeb46f1e1d |
|
BLAKE2b-256 | d3507c7fd1bafdc5ed7a0369704cac4b8e743481b79e2fe754eb689913fd62fe |
Hashes for pymssql-2.2.0-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0b7f259ceec1bda9ecf01cdc355e376c269d1de1308845b32fc45465fde5adf |
|
MD5 | 208d6fceef6954c032afd135ddf963ce |
|
BLAKE2b-256 | eb5ed68cf5ec8883f2db37e54b6f5c555f3b75341c36c83ac34e9f09366e659b |
Hashes for pymssql-2.2.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb63071f7cc3a5ae06241457f9d707293d438d069cbb1f53be6de2e25e1606fe |
|
MD5 | 9d5fd37fff9be6f529ca1e30d49c8670 |
|
BLAKE2b-256 | 400c8f1b56250108803940c7d0c1a66e59717cf98768f83be6c535a5e2b1bb70 |
Hashes for pymssql-2.2.0-cp36-cp36m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c5481682937b2ed191980b78d91abd480d74c6b6e75ad6c9120ef9868004e2b |
|
MD5 | e8b6d1f76ba4c74d48808245501a49db |
|
BLAKE2b-256 | f4b8c7b13eabcc7db3f46608a7461359b54df50b9bef774de84555b9ad1dc257 |