mariadb
Python MariaDB extension
Decision gist · record as of 2026-08-14
Yes, if you need to connect Python to MariaDB or MySQL and want an actively maintained, production-stable connector. The medium install friction is manageable thanks to prebuilt wheels for common platforms. Be aware of the LGPL 2.1 copyleft license if your application is proprietary, and verify the details of PYSEC-2026-217 before deploying in security-sensitive contexts.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- MariaDB Connector/C client library may need to be installed on the host system; consult documentation for platform-specific setup requirements.
- Medium install friction due to compiled C extensions; prebuilt wheels available for Windows and modern Python versions (3.9–3.14), but non-Windows platforms may require build tools.
- Maintenance is active with recent commits and production-stable status.
License · maintenance · safety
LGPL 2.1 (copyleft) — Licensed under LGPL 2.1 or later (copyleft). Derivative works and modifications must be distributed under compatible terms; proprietary applications linking this library may face licensing constraints.
last release 2025-10-07 (311 days) · last repo commit 2026-08-03 · 149 stars
1 known vulnerabilities (OSV.dev, 2026-08-14) · 407,124 downloads/mo, #6,889 on PyPI
Alternatives
Verify before relying
pip install mariadb
import mariadb
conn = mariadb.connect(
user="user",
password="password",
host="localhost",
database="mydb"
)
cursor = conn.cursor()
cursor.execute("SELECT * FROM table")
for row in cursor:
print(row)
conn.close()- Whether MariaDB Connector/C client library must be installed separately on the host system for runtime operation.
- Performance characteristics and connection pooling capabilities compared to other MariaDB/MySQL adapters.
- Details on the single known vulnerability PYSEC-2026-217 and whether it affects current usage.
What it is and what it does
MariaDB Connector/Python is a database adapter that lets Python code connect to MariaDB and MySQL servers using the standard Python DB API 2.0 interface (PEP-249). It wraps the MariaDB Connector/C client library, which handles the low-level protocol and communication. The package is written in C for performance and is actively maintained by MariaDB Corporation.
You use it to execute SQL queries, fetch results, manage transactions, and handle database connections in a way that follows Python's standard database API conventions. It supports modern Python versions (3.9 through 3.14) and runs on Windows, macOS, and POSIX systems. Installation involves compiled extensions, so prebuilt wheels are provided for common platforms to reduce build friction.
Use it for
- Connect a Python web application to a MariaDB backend for user data, content, or transactional storage.
- Build ETL or data pipeline scripts that read from or write to MariaDB databases.
- Migrate from a legacy MySQL driver to a modern, actively maintained connector with DB API 2.0 compliance.
- Develop system administration or monitoring tools that query MariaDB for operational metrics or configuration.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need to connect Python to MariaDB or MySQL and want an actively maintained, production-stable connector.
The medium install friction is manageable thanks to prebuilt wheels for common platforms. Be aware of the LGPL 2.1 copyleft license if your application is proprietary, and verify the details of PYSEC-2026-217 before deploying in security-sensitive contexts.
Install
mariadb on PyPI
Before you install
Medium install friction due to compiled C extensions; prebuilt wheels available for Windows and modern Python versions (3.9–3.14), but non-Windows platforms may require build tools. Maintenance is active with recent commits and production-stable status.
MariaDB Connector/C client library may need to be installed on the host system; consult documentation for platform-specific setup requirements.
License in practice
Licensed under LGPL 2.1 or later (copyleft). Derivative works and modifications must be distributed under compatible terms; proprietary applications linking this library may face licensing constraints.
Quickstart
pip install mariadb
import mariadb
conn = mariadb.connect(
user="user",
password="password",
host="localhost",
database="mydb"
)
cursor = conn.cursor()
cursor.execute("SELECT * FROM table")
for row in cursor:
print(row)
conn.close()
Verify before relying
- Whether MariaDB Connector/C client library must be installed separately on the host system for runtime operation.
- Performance characteristics and connection pooling capabilities compared to other MariaDB/MySQL adapters.
- Details on the single known vulnerability PYSEC-2026-217 and whether it affects current usage.
Package facts
| License | LGPL 2.1 copyleft |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | 1 packagepackaging |
| Maintenance | Actively maintained 311 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 407,124 / month, #6,889 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | 1 PYSEC-2026-217 |
| Classifiers | Development Status :: 5 - Production/StableEnvironment :: ConsoleEnvironment :: MacOS XEnvironment :: Win32 (MS Windows)Intended Audience :: DevelopersIntended Audience :: End Users/DesktopIntended Audience :: System AdministratorsLicense :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)Operating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: POSIXProgramming Language :: CProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Topic :: Database |
Evidence: mariadb-1.1.14-cp310-cp310-win32.whl; mariadb-1.1.14-cp310-cp310-win_amd64.whl; mariadb-1.1.14-cp311-cp311-win32.whl; mariadb-1.1.14-cp311-cp311-win_amd64.whl; mariadb-1.1.14-cp312-cp312-win32.whl; mariadb-1.1.14-cp312-cp312-win_amd64.whl; mariadb-1.1.14-cp313-cp313-win32.whl; mariadb-1.1.14-cp313-cp313-win_amd64.whl; mariadb-1.1.14-cp314-cp314-win32.whl; mariadb-1.1.14-cp314-cp314-win_amd64.whl; mariadb-1.1.14-cp39-cp39-win32.whl; mariadb-1.1.14-cp39-cp39-win_amd64.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “mariadb python connector”
- mariadbMariaDB Connector/Python provides a DB API 2.0-compliant interface…
- PyMySQLPyMySQL is a pure-Python MySQL and MariaDB client library that…
- mysqlclientmysqlclient provides a Python interface to MySQL and MariaDB…
Give your agent the search over MCP, or paste the wish link into any chat.
More Database packages
psycopg2-binary is a PostgreSQL database adapter for Python that implements the DB API 2.0 specification, enabling Python applications to connect to and query PostgreSQL databases with thread-safe concurrent operations.
Python client library for connecting to and executing commands against Redis key-value stores, supporting both synchronous and asynchronous operations.
Install it if your application needs to interact with Redis; the only prerequisite is a running Redis server instance.
YDB Python SDK is the official client library for connecting to and querying YDB databases from Python applications.
Install it if you need to connect Python applications to YDB databases.
Connects Python applications to Snowflake data warehouses using the DB API 2.0 specification, enabling SQL queries, data transfers, and warehouse operations.
sqlparse tokenizes SQL text into a tree of statements, clauses, and expressions, and provides functions to split scripts, format queries, and inspect parsed tokens without validating dialect or syntax.
Install it if you need to manipulate, format, or analyze SQL text programmatically.
Provides base adapter protocols and shared functionality that database adapters use to integrate with dbt-core, handling connections, dialect translation, relation caching, and core interface management.
See also firebolt-sdk · mysqlclient · PyMySQL · mysql-connector-python · mysql-connector-python-rf · mysql-connector · PIconnect · fdb · pyodbc · firebird-driver