mssql
python sqlalchemy MsSQL utility
What it is and what it does
mssql is a thin wrapper around sqlalchemy and pyodbc that abstracts away boilerplate connection setup for Microsoft SQL Server databases. It provides a simple class-based interface to initialize a connection and retrieve a sqlalchemy session, reducing the amount of configuration code needed for basic MSSQL workflows.
The package has been unmaintained since 2020-01-07 and has received no updates since its initial release. While it carries a permissive MIT license and has low install friction, its age and lack of maintenance mean it may not work reliably with current versions of its dependencies or modern SQL Server deployments. It is suitable only for legacy projects or environments where dependency versions are pinned to 2020-era releases.
Use it for:
- Quick prototyping of MSSQL database access in Python scripts without writing boilerplate connection code.
- Legacy projects that were built against this package and have pinned dependencies to 2020 versions.
- Educational or demonstration code where simplifying sqlalchemy setup is the primary goal.
- Migrating from raw pyodbc to sqlalchemy ORM with minimal refactoring.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Wraps SQLAlchemy and pyodbc to simplify connection and session management for Microsoft SQL Server databases.
No, not for new projects. The package is abandoned and has not been updated since 2020-01-07, creating a significant maintenance and compatibility risk. Use sqlalchemy directly with pyodbc instead. Only consider it if you are maintaining legacy code that already depends on it.
Install
mssql on PyPI
pip
pip install mssqluv
uv add mssqlpoetry
poetry add mssqlInstalling mssql
Before you install
Low install friction, but the package is abandoned as of 2020-02-09 with no updates since its initial release. Maintenance status is a significant concern for production use.
License in practice
MIT license permits commercial and private use with minimal restrictions, though you retain full responsibility for any issues that arise from the unmaintained codebase.
Quickstart
pip install mssql
from mssql import MsSql
ms = MsSql(host='localhost', db_name='mydb', user='sa', pw='password', driver='ODBC Driver for SQL Server')
session = ms.session_conn()
Requires ODBC drivers to be installed on the system and pyodbc to be able to locate them; SQL Server connectivity depends on network access and valid credentials.
Verify before relying
- Whether pyodbc system dependencies (ODBC drivers) are available in your target environment
- Compatibility with current versions of SQLAlchemy beyond what the fact sheet indicates
- Whether the package works with modern SQL Server versions and authentication methods
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.6) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — sqlalchemy, pyodbc |
| Maintenance | abandoned — 2,411 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 106,827/month — #12,636 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: mssql-1.0.1-py3-none-any.whl
Tags
More Database packages
psycopg2-binary is a PostgreSQL database…
copyleft · top 1,000 on PyPI
redisPython client library for connecting to and…
permissive · top 1,000 on PyPI
ydbYDB Python SDK is the official client library…
permissive · top 1,000 on PyPI
snowflake-connector-pythonConnects Python applications to Snowflake data…
permissive · top 1,000 on PyPI
sqlparsesqlparse tokenizes SQL text into a tree of…
permissive · top 1,000 on PyPI
dbt-adaptersProvides base adapter protocols and shared…
permissive · top 1,000 on PyPI
bcpandasWraps SQL Server's BCP utility to transfer data…
permissive · top 15,000 on PyPI
mssql-pythonA Python driver for connecting to and querying…
unclear · top 5,000 on PyPI
mssql-djangoDjango database backend that connects Django…
permissive · top 15,000 on PyPI
datasetdataset simplifies reading and writing data to…
permissive · top 5,000 on PyPI
pypyodbcpypyodbc provides a pure Python ODBC interface…
permissive · top 15,000 on PyPI
sqlalchemy-pytdsProvides a SQLAlchemy dialect for connecting to…
permissive · top 5,000 on PyPI
pyodbcpyodbc provides Python access to ODBC databases…
permissive · top 1,000 on PyPI
python-tdsPure Python DBAPI driver for MSSQL that…
permissive · top 5,000 on PyPI
recordsRecords provides a lightweight SQL query…
permissive · top 15,000 on PyPI
ipython-sqlAdds SQL magic commands to IPython and Jupyter…
permissive · top 15,000 on PyPI