Skip to main content

Yet another and pure python MS SQLServer database driver.

Support platform

  • Python 3.11 or later

Support database

We are testing it on MS SQLServer 2025 on Ubuntu. But we think it works on older versions.

Installation

$ pip install minitds

Example

Query:

import minitds
conn = minitds.connect(host='localhost',
                    user='sa',
                    password='secret',
                    database='database_name')
cur = conn.cursor()
cur.execute('select foo, bar from baz')
for r in cur.fetchall():
   print(r[0], r[1])
conn.close()

Execute Procedure:

import minitds
conn = minitds.connect(host='localhost',
                    user='sa',
                    password='secret',
                    database='database_name')
cur = conn.cursor()
cur.callproc('something_proc', [123, 'ABC'])
conn.close()

AsyncIO:

import asyncio
import minitds.aio

async def main():
    async with await minitds.aio.connect(
        host='localhost',
        user='sa',
        password='secret',
        database='database_name'
    ) as conn:
        async with conn.cursor() as cur:
            await cur.execute('select foo, bar from baz')
            async for r in cur:
                print(r[0], r[1])

asyncio.run(main())

Restrictions

  • Support connecting through SQL Server Authentication only.

Protocol Specification

https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-tds/b46a581a-39de-4745-b076-ec4dbb7d13ec

Metadata

Release files for minitds 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for minitds 0.6.0
File Size Uploaded
minitds-0.6.0.tar.gz 26.1 kB Details

Release files / minitds-0.6.0.tar.gz

Download URL minitds-0.6.0.tar.gz
Size 26.1 kB
Tags Source
SHA-256 checksum
How to use checksums
463fe0ded4b054dbf664cb3e800d6d8f8bb9b6717e6568b0439c0c3cd4170a49
BLAKE2b-256 checksum
How to use checksums
9fa07d0e44685ed9d3416a43442f9780f9abb28ee11bd905ec12fbd8933b6576
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release history Release notifications | RSS feed

This release

0.6.0 This release

1 release file

0.5.5

1 release file

0.5.4

1 release file

0.5.3

1 release file

0.5.2

1 release file

0.5.1

1 release file

0.5.0

1 release file

0.4.4

1 release file

0.4.3

1 release file

0.4.2

1 release file

0.4.1

1 release file

0.4.0

1 release file

0.3.3

1 release file

0.3.2

1 release file

0.3.1

1 release file

0.3.0

1 release file

0.2.0

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page