Announcing MariaDB Connector/Python 1.1 GA

We are pleased to announce MariaDB Connector/Python 1.1 as GA (Generally Available).

MariaDB Connector/Python, compliant with the Python DB API 2.0, is a MariaDB connector for building Python applications on MariaDB. Python is one of the most popular programming languages among developers across a variety of technical areas. In the 2022 Stack Overflow Developer Survey of over 70,000 developers, Python was identified as the most wanted technology (tied with Rust) when it comes to programming, scripting and markup languages. MariaDB Connector/Python is now written in Python and C, and integrates functionality from MariaDB Connector/C for optimized client/server communication.

The Release Series 1.1 of Connector/Python is now available via the Python Package Index (PyPI) repository and the MariaDB Downloads.

MariaDB Connector/Python 1.1 includes the following new features:

General:

  • Connection, cursor and connection pool classes are implemented in pure Python for  easier extension or modification.
  • Cursor.execute() method now returns a buffered result set by default.
  • Statements without parameter substitution are now executed in text protocol by default, which results in lower overhead and therefore better performance.
  • Parameter substitution now works inside conditional comments.

New constants:

  • ERR constants for better error handling.
  • STATUS constants for checking the MariaDB Server (Community and Enterprise) status.
  • CLIENT constants for checking the MariaDB Server and MariaDB Client capabilities.

New methods and attributes:

  • Connection
    • Methods
      • begin() – Starts a new transaction
      • select_db() – Sets the default database
      • dump_debug_info() – Forces MariaDB Server (Community and Enterprise) to log status information
    • Attributes
      • client_capabilities – Returns the MariaDB Client capabilities
      • server_capabilities – Returns the MariaDB Community Server/MariaDB Enterprise Server capabilities
      • open – indicates if the connection to MariaDB Server (Community and Enterprise) is still alive
      • server_status – returns the status attributes of MariaDB Server (Community and Enterprise)
  • Cursor
    • Attributes
      • Description now contains as an extension to the PEP-249 DB API with additional items table_name, original_column_name and original_table_name
      • paramcount – Returns the number of parameters for the last executed statement
  • ConnectionPool
    • Attributes
      • connection_count – Returns number of connections in pool
      • reset_connection – If set to true, the connection will be reset on both client and server side after .close() method was called

MariaDB Connector/Python is available from the MariaDB Download page and from the Python Package Index (PyPI) repository.

MariaDB Connector/Python Documentation details how to install the connector, with examples on how to use the connector. Documentation is also available for using MariaDB Connector Python to connect to MariaDB SkySQL. Sample applications exist on our MariaDB Developer Hub.

 

Resources