skillfed

sqlalchemy-pytds

A Microsoft SQL Server TDS connector for SQLAlchemy.

sqlalchemy-pytds v1.0.2 846.9K downloads/30d#4,914 on PyPI27
Permissive license MIT DORMANT released

What it is and what it does

sqlalchemy-pytds is a SQLAlchemy dialect that bridges SQLAlchemy's ORM and query layer to Microsoft SQL Server databases using the TDS protocol. It depends on python-tds for the low-level protocol implementation and SQLAlchemy for the database abstraction layer. The package allows developers to write database code using SQLAlchemy's standard API while connecting to SQL Server instances.

The package is in Beta status and has been dormant for extended periods, though the repository remains unarchived. It sits in the top 5000 PyPI packages by download volume, suggesting some production use, but the infrequent maintenance and outdated Python version classifiers warrant caution when evaluating it for new projects.

Use it for:

  • Building SQLAlchemy applications that need to connect to SQL Server without using ODBC-dependent drivers
  • Using SQLAlchemy's ORM to query and manipulate SQL Server data in a database-agnostic way
  • Environments where pure-Python TDS connectivity is preferred over compiled driver libraries

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides a SQLAlchemy dialect for connecting to Microsoft SQL Server via the TDS protocol using python-tds as the underlying driver.

Yes, with conditions. The package is permissively licensed and has low install friction, but its dormant maintenance status and outdated Python version classifiers mean you should verify that python-tds meets your SQL Server compatibility and performance needs before committing to production use.

Install

sqlalchemy-pytds on PyPI

pip

pip install sqlalchemy-pytds

uv

uv add sqlalchemy-pytds

poetry

poetry add sqlalchemy-pytds

Installing sqlalchemy-pytds

Before you install

Low install friction with a pure-Python wheel distribution. Maintenance is dormant—last commit was 2024-09-14 but no activity for 699 days prior; the repository remains unarchived but receives infrequent updates.

License in practice

MIT license permits commercial and private use with minimal restrictions, making it safe for most projects.

Quickstart

pip install sqlalchemy-pytds

from sqlalchemy import create_engine
engine = create_engine('mssql+pytds://user:password@server/database')

Requires python-tds and SQLAlchemy to be installed; python-tds handles the underlying TDS protocol implementation.

Verify before relying

  • Whether python-tds itself is actively maintained and suitable for production SQL Server workloads
  • Compatibility with modern Python versions beyond those listed in classifiers (3.5 is the latest declared)
  • Whether this dialect supports the full range of SQL Server features or has known limitations

Package facts

License MIT (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 2 — python-tds, SQLAlchemy
Maintenance dormant — 699 days since the last release
Last repo commit
First released
Downloads 846,855/month — #4,914 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: sqlalchemy_pytds-1.0.2-py2.py3-none-any.whl

Keywords: SQLAlchemy, Microsoft, SQL, Server

Development Status :: 4 - BetaProgramming Language :: PythonProgramming Language :: Python :: 2.7Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Topic :: Database :: Front-Ends

Tags

sqlalchemy sql server connectortds dialect sqlalchemymicrosoft sql server pythonsqlalchemy mssql driverpython-tds sqlalchemy
sqlalchemy-dialectsql-server

More Front-Ends packages