1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128
|
Metadata-Version: 2.4
Name: pymssql
Version: 2.3.10
Summary: DB-API interface to Microsoft SQL Server for Python. (new Cython-based version)
Author-email: Damien Churchill <damoxc@gmail.com>
Maintainer-email: Mikhail Terekhov <termim@gmail.com>
License-Expression: LGPL-2.1-or-later
Project-URL: homepage, https://github.com/pymssql/pymssql
Project-URL: repository, https://github.com/pymssql/pymssql
Project-URL: documentation, http://pymssql.readthedocs.io
Project-URL: Bug Tracker, https://github.com/pymssql/pymssql/issues
Project-URL: Changelog, https://github.com/pymssql/pymssql/blob/master/ChangeLog.rst
Keywords: mssql,SQL Server,database,DB-API
Platform: any
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Database
Classifier: Topic :: Database :: Database Engines/Servers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX
Classifier: Operating System :: Unix
Requires-Python: >=3.9
Description-Content-Type: text/x-rst
License-File: LICENSE
Dynamic: description
Dynamic: description-content-type
Dynamic: license-file
Dynamic: platform
pymssql - DB-API interface to Microsoft SQL Server
==================================================
.. image:: https://github.com/pymssql/pymssql/workflows/Wheels/badge.svg
:target: https://github.com/pymssql/pymssql/actions?query=workflow%3A%22Wheels%22
.. image:: http://img.shields.io/pypi/dm/pymssql.svg
:target: https://pypi.python.org/pypi/pymssql/
.. image:: http://img.shields.io/pypi/v/pymssql.svg
:target: https://pypi.python.org/pypi/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`_.
.. _Microsoft SQL Server: http://www.microsoft.com/sqlserver/
.. _Python: http://www.python.org/
.. _PEP-249: http://www.python.org/dev/peps/pep-0249/
.. _FreeTDS: http://www.freetds.org/
Detailed information on pymssql is available on the website:
`pymssql.readthedocs.io <https://pymssql.readthedocs.io/en/stable/>`_
New development is happening on GitHub at:
`github.com/pymssql/pymssql <https://github.com/pymssql/pymssql>`_
There is a Google Group for discussion at:
`groups.google.com <https://groups.google.com/forum/?fromgroups#!forum/pymssql>`_
Getting started
===============
pymssql wheels are available from PyPi. To install it run:
.. code-block:: bash
pip install -U pip
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.
.. note::
On some Linux distributions `pip` version is too old to support all
the flavors of manylinux wheels, so upgrading `pip` is necessary.
An example of such distributions would be Ubuntu 18.04 or
Python3.6 module in RHEL8 and CentOS8.
Basic example
=============
.. code-block:: python
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.3.10 - 2025-11-30 - Mikhail Terekhov
==============================================
General
-------
- Add get_cur_db() method to MSSQLConnection, thanks to jnahmias (PR #979).
Version 2.3.9 - 2025-11-06 - Mikhail Terekhov
=============================================
General
-------
- Fix build with Cython-3.2.0, thanks to mkeener (PR #977).
|