--- id: mariadb version: "1.1.14" license: LGPL 2.1 license_treatment: copyleft maintenance: active --- # mariadb — Python MariaDB extension License: copyleft · Maintenance: active · Downloads: 407.1K/mo ## 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 above — verify before relying. MariaDB Connector/Python provides a DB API 2.0-compliant interface for Python programs to connect to and query MariaDB and MySQL databases using a C-based client library. 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 pip install mariadb uv add mariadb poetry add mariadb ## Installing mariadb 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. 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() MariaDB Connector/C client library may need to be installed on the host system; consult documentation for platform-specific setup requirements. 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_current - Install friction: medium - Maintenance: active - Downloads: 407.1K/month (top 15,000 on PyPI) - Known vulnerabilities: 1 ## Tags mariadb python connector, mysql database python driver, db api 2.0 mariadb, python mariadb client, connect to mariadb from python, mariadb connector/python, pep 249 database adapter, database-driver, db-api-2.0 [View on SkillFed](https://skillfed.io/packages/mariadb) · [View on PyPI](https://pypi.org/project/mariadb/)