singlestoredb 1.16.9


pip install singlestoredb

  Latest version

Released: Feb 05, 2026

Project Links

Meta
Author: SingleStore
Requires Python: >=3.9

Classifiers

Development Status
  • 5 - Production/Stable

Programming Language
  • Python :: 3
  • Python :: 3 :: Only

Topic
  • Database

SingleStoreDB Python SDK

This project contains a DB-API 2.0 compatible Python interface to the SingleStore database and workspace management API.

Install

This package can be install from PyPI using pip:

pip install singlestoredb

Documentation

https://singlestore-labs.github.io/singlestoredb-python

Usage

Connections to the SingleStore database are made using the DB-API parameters host, port, user, password, etc, but they may also be done using URLs that specify these parameters as well (much like the SQLAlchemy package).

import singlestoredb as s2

# Connect using the default connector
conn = s2.connect('user:password@host:3306/db_name')

# Create a cursor
cur = conn.cursor()

# Execute SQL
cur.execute('select * from foo')

# Fetch the results
print(cur.description)
for item in cur:
    print(item)

# Close the connection
conn.close()

Connecting to the HTTP API is done as follows:

# Use the HTTP API connector
conn = s2.connect('https://user:password@host:8080/db_name')

Performance

While this package is based on PyMySQL which is a pure Python-based MySQL connector, it adds various performance enhancements that make it faster than most other connectors. The performance improvements come from changes to the data conversion functions, cursor implementations, and a C extension that is highly optimized to improve row data reading.

The package can be used both in a pure Python mode and as well as a C accelerated mode. Generally speaking, the C accelerated version of the client can read data 10X faster than PyMySQL, 2X faster than MySQLdb, and 1.5X faster than mysql.connector. All of this is done without having to install any 3rd party MySQL libraries!

Benchmarking was done with a table of 3,533,286 rows each containing a datetime, a float, and eight character columns. The data is the same data set used in this article. The client and server were running on the same machine and queries were made using fetchone, fetchall, fetchmany(1000), and an iterator over the cursor object (e.g., iter(cur)). The results are shown below.

Buffered

PyMySQL MySQLdb mysql.connector SingleStore (pure Python) SingleStore
fetchall 37.0s 8.7s 5.6s 29.0s 3.7s
fetchmany(1000) 37.4s 9.2s 6.2s 29.6s 3.6s
fetchone 38.2s 10.1s 10.2s 30.9s 4.8s
iter(cur) 38.3s 9.1s 10.2s 30.4s 4.4s

Unbuffered

PyMySQL MySQLdb mysql.connector SingleStore (pure Python) SingleStore
fetchall 39.0s 6.5s 5.5s 30.3s 5.5s
fetchmany(1000) 39.4s 7.0s 6.0s 30.4s 4.1s
fetchone 34.5s 8.9s 10.1s 30.8s 6.6s
iter(cur) 39.0s 9.0s 10.2s 31.4s 6.0s

License

This library is licensed under the Apache 2.0 License.

Resources

1.16.9 Feb 05, 2026
1.16.8 Jan 09, 2026
1.16.7 Jan 07, 2026
1.16.6 Dec 12, 2025
1.16.5 Dec 03, 2025
1.16.4 Dec 01, 2025
1.16.3 Nov 20, 2025
1.16.2 Nov 13, 2025
1.16.1 Nov 05, 2025
1.16.0 Oct 23, 2025
1.15.8 Sep 26, 2025
1.15.7 Sep 23, 2025
1.15.6 Sep 16, 2025
1.15.5 Sep 16, 2025
1.15.4 Sep 04, 2025
1.15.3 Aug 27, 2025
1.15.2 Aug 18, 2025
1.15.1 Aug 07, 2025
1.15.0 Jul 21, 2025
1.14.2 Jun 17, 2025
1.14.1 Jun 11, 2025
1.14.0 May 29, 2025
1.13.1 May 20, 2025
1.13.0 Apr 24, 2025
1.12.4 Apr 02, 2025
1.12.3 Apr 01, 2025
1.12.2 Mar 19, 2025
1.12.1 Mar 10, 2025
1.12.0 Feb 27, 2025
1.11.0 Jan 09, 2025
1.10.0 Dec 10, 2024
1.9.0 Dec 04, 2024
1.8.0 Nov 19, 2024
1.7.2 Oct 16, 2024
1.7.1 Sep 25, 2024
1.7.0 Sep 20, 2024
1.6.3 Sep 05, 2024
1.6.2 Aug 07, 2024
1.6.1 Jul 31, 2024
1.6.0 Jul 30, 2024
1.5.0 Jul 12, 2024
1.4.3 Jul 11, 2024
1.4.2 Jul 09, 2024
1.4.1 Jul 03, 2024
1.4.0 Jun 13, 2024
1.3.1 May 23, 2024
1.3.0 May 10, 2024
1.2.0 Apr 25, 2024
1.1.0 Apr 18, 2024
1.0.4 Apr 03, 2024
1.0.3 Apr 02, 2024
1.0.2 Mar 08, 2024
1.0.1 Feb 16, 2024
1.0.0 Feb 12, 2024
0.10.7 Jan 31, 2024
0.10.6 Jan 26, 2024
0.10.5 Jan 24, 2024
0.10.4 Jan 18, 2024
0.10.3 Jan 18, 2024
0.10.2 Dec 14, 2023
0.10.1 Dec 13, 2023
0.10.0 Dec 12, 2023
0.9.6 Nov 02, 2023
0.9.5 Oct 31, 2023
0.9.4 Oct 31, 2023
0.9.3 Oct 25, 2023
0.9.2 Oct 24, 2023
0.9.1 Oct 17, 2023
0.9.0 Oct 16, 2023
0.8.9 Oct 04, 2023
0.8.8 Sep 26, 2023
0.8.7 Sep 19, 2023
0.8.6 Aug 29, 2023
0.8.5 Aug 29, 2023
0.8.4 Aug 28, 2023
0.8.3 Aug 24, 2023
0.8.2 Aug 10, 2023
0.8.1 Jul 12, 2023
0.8.0 Jul 12, 2023
0.7.3 Oct 15, 2024
0.7.2 Oct 11, 2023
0.7.1 Jun 15, 2023
0.7.0 Jun 09, 2023
0.6.1 May 18, 2023
0.6.0 May 17, 2023
0.5.4 Mar 15, 2023
0.5.3 Jan 09, 2023
0.5.2 Dec 15, 2022
0.5.1 Dec 09, 2022
0.5.0 Dec 08, 2022
0.4.0 Oct 19, 2022
0.3.3 Sep 21, 2022
0.3.2 Sep 14, 2022
0.3.1 Sep 09, 2022
0.3.0 Sep 09, 2022
0.2.0 Aug 05, 2022
0.0.0 Oct 16, 2023
Extras:
Dependencies:
PyJWT
parsimonious
requests
sqlparams
tomli (>=1.1.0)
typing-extensions