Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pymssql

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pymssql

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

  • 2.3.2
  • Source
  • PyPI
  • Socket score

Maintainers
1

pymssql - DB-API interface to Microsoft SQL Server

.. image:: https://github.com/pymssql/pymssql/workflows/Linux/badge.svg :target: https://github.com/pymssql/pymssql/actions?query=workflow%3A%22Linux%22

.. image:: https://github.com/pymssql/pymssql/workflows/macOS/badge.svg :target: https://github.com/pymssql/pymssql/actions?query=workflow%3A%22macOS%22

.. image:: https://github.com/pymssql/pymssql/workflows/Windows/badge.svg :target: https://github.com/pymssql/pymssql/actions?query=workflow%3A%22Windows%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.2 - 2024-11-20 - Mikhail Terekhov

General

  • Update FreeTDS to 1.4.23.
  • Build wheels for Python-3.13 on Windows and MacOS.

Internals

  • Fix build wheels for Python-3.13 on Windows.
  • Drop build in actions for Python 3.6, 3.7 and 3.8.
  • Add build in actions for Python-3.13.
  • Workaround setuptools-74.0 changes.

Version 2.3.1 - 2024-08-25 - Mikhail Terekhov

General

  • Fix SP returning NULL (closes #441).
  • Update FreeTDS to 1.4.22 (closes #895).
  • Require Cython>3.0.10.
  • Add python 3.13 Linux wheels (closes #900).
  • Drop manylinux2010 wheels.
  • Drop 3.7 and 3.8 wheels on MacOS.
  • Drop 3.6 wheels on Linux.

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc