sqlalchemy-pytds
A Microsoft SQL Server TDS connector for SQLAlchemy.
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-pytdsuv
uv add sqlalchemy-pytdspoetry
poetry add sqlalchemy-pytdsInstalling 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
Tags
More Front-Ends packages
SQLAlchemy is a Python SQL toolkit and Object…
permissive · top 100 on PyPI
psycopg2-binarypsycopg2-binary is a PostgreSQL database…
copyleft · top 1,000 on PyPI
alembicAlembic generates and manages database schema…
permissive · top 1,000 on PyPI
weaviate-clientA Python client library for connecting to and…
permissive · top 1,000 on PyPI
databricks-sql-connectorA Python client library that connects to…
permissive · top 1,000 on PyPI
psycopgPsycopg 3 is a PostgreSQL database adapter for…
copyleft · top 1,000 on PyPI
python-tdsPure Python DBAPI driver for MSSQL that…
permissive · top 5,000 on PyPI
teradatasqlalchemyProvides a SQLAlchemy dialect that enables…
unclear · top 5,000 on PyPI
sqlalchemy-databricksProvides a SQLAlchemy dialect that connects to…
permissive · top 15,000 on PyPI
pymssqlpymssql provides a Python DB-API interface to…
copyleft · top 1,000 on PyPI
mssqlWraps SQLAlchemy and pyodbc to simplify…
permissive · top 15,000 on PyPI
mssql-pythonA Python driver for connecting to and querying…
unclear · top 5,000 on PyPI
sqlalchemy-solrProvides a SQLAlchemy dialect that allows you…
permissive · top 15,000 on PyPI
databricks-sqlalchemyProvides a SQLAlchemy 2.0 dialect that bridges…
permissive · top 1,000 on PyPI
sqlalchemy-drillSQLAlchemy dialect for Apache Drill that…
permissive · top 5,000 on PyPI
sqlalchemy-firebirdProvides a SQLAlchemy 2.0+ dialect for…
permissive · top 15,000 on PyPI