Documentation Home
MySQL Connector/Python Developer Guide
Related Documentation Download this Manual
PDF (US Ltr) - 0.7Mb
PDF (A4) - 0.7Mb


MySQL Connector/Python Developer Guide  /  Connector/Python API Reference

Chapter 10 Connector/Python API Reference

Table of Contents

10.1 mysql.connector Module
10.1.1 mysql.connector.connect() Method
10.1.2 mysql.connector.apilevel Property
10.1.3 mysql.connector.paramstyle Property
10.1.4 mysql.connector.threadsafety Property
10.1.5 mysql.connector.__version__ Property
10.1.6 mysql.connector.__version_info__ Property
10.2 connection.MySQLConnection Class
10.2.1 connection.MySQLConnection() Constructor
10.2.2 MySQLConnection.close() Method
10.2.3 MySQLConnection.commit() Method
10.2.4 MySQLConnection.config() Method
10.2.5 MySQLConnection.connect() Method
10.2.6 MySQLConnection.cursor() Method
10.2.7 MySQLConnection.cmd_change_user() Method
10.2.8 MySQLConnection.cmd_debug() Method
10.2.9 MySQLConnection.cmd_init_db() Method
10.2.10 MySQLConnection.cmd_ping() Method
10.2.11 MySQLConnection.cmd_process_info() Method
10.2.12 MySQLConnection.cmd_process_kill() Method
10.2.13 MySQLConnection.cmd_query() Method
10.2.14 MySQLConnection.cmd_query_iter() Method
10.2.15 MySQLConnection.cmd_quit() Method
10.2.16 MySQLConnection.cmd_refresh() Method
10.2.17 MySQLConnection.cmd_reset_connection() Method
10.2.18 MySQLConnection.cmd_shutdown() Method
10.2.19 MySQLConnection.cmd_statistics() Method
10.2.20 MySQLConnection.disconnect() Method
10.2.21 MySQLConnection.get_row() Method
10.2.22 MySQLConnection.get_rows() Method
10.2.23 MySQLConnection.get_server_info() Method
10.2.24 MySQLConnection.get_server_version() Method
10.2.25 MySQLConnection.is_connected() Method
10.2.26 MySQLConnection.isset_client_flag() Method
10.2.27 MySQLConnection.ping() Method
10.2.28 MySQLConnection.reconnect() Method
10.2.29 MySQLConnection.reset_session() Method
10.2.30 MySQLConnection.rollback() Method
10.2.31 MySQLConnection.set_charset_collation() Method
10.2.32 MySQLConnection.set_client_flags() Method
10.2.33 MySQLConnection.shutdown() Method
10.2.34 MySQLConnection.start_transaction() Method
10.2.35 MySQLConnection.autocommit Property
10.2.36 MySQLConnection.unread_results Property
10.2.37 MySQLConnection.can_consume_results Property
10.2.38 MySQLConnection.charset Property
10.2.39 MySQLConnection.collation Property
10.2.40 MySQLConnection.connection_id Property
10.2.41 MySQLConnection.database Property
10.2.42 MySQLConnection.get_warnings Property
10.2.43 MySQLConnection.in_transaction Property
10.2.44 MySQLConnection.raise_on_warnings Property
10.2.45 MySQLConnection.server_host Property
10.2.46 MySQLConnection.server_port Property
10.2.47 MySQLConnection.sql_mode Property
10.2.48 MySQLConnection.time_zone Property
10.2.49 MySQLConnection.unix_socket Property
10.2.50 MySQLConnection.user Property
10.3 pooling.MySQLConnectionPool Class
10.3.1 pooling.MySQLConnectionPool Constructor
10.3.2 MySQLConnectionPool.add_connection() Method
10.3.3 MySQLConnectionPool.get_connection() Method
10.3.4 MySQLConnectionPool.set_config() Method
10.3.5 MySQLConnectionPool.pool_name Property
10.4 pooling.PooledMySQLConnection Class
10.4.1 pooling.PooledMySQLConnection Constructor
10.4.2 PooledMySQLConnection.close() Method
10.4.3 PooledMySQLConnection.config() Method
10.4.4 PooledMySQLConnection.pool_name Property
10.5 cursor.MySQLCursor Class
10.5.1 cursor.MySQLCursor Constructor
10.5.2 MySQLCursor.add_attribute() Method
10.5.3 MySQLCursor.clear_attributes() Method
10.5.4 MySQLCursor.get_attributes() Method
10.5.5 MySQLCursor.callproc() Method
10.5.6 MySQLCursor.close() Method
10.5.7 MySQLCursor.execute() Method
10.5.8 MySQLCursor.executemany() Method
10.5.9 MySQLCursor.fetchall() Method
10.5.10 MySQLCursor.fetchmany() Method
10.5.11 MySQLCursor.fetchone() Method
10.5.12 MySQLCursor.fetchwarnings() Method
10.5.13 MySQLCursor.stored_results() Method
10.5.14 MySQLCursor.column_names Property
10.5.15 MySQLCursor.description Property
10.5.16 MySQLCursor.lastrowid Property
10.5.17 MySQLCursor.rowcount Property
10.5.18 MySQLCursor.statement Property
10.5.19 MySQLCursor.with_rows Property
10.6 Subclasses cursor.MySQLCursor
10.6.1 cursor.MySQLCursorBuffered Class
10.6.2 cursor.MySQLCursorRaw Class
10.6.3 cursor.MySQLCursorBufferedRaw Class
10.6.4 cursor.MySQLCursorDict Class
10.6.5 cursor.MySQLCursorBufferedDict Class
10.6.6 cursor.MySQLCursorNamedTuple Class
10.6.7 cursor.MySQLCursorBufferedNamedTuple Class
10.6.8 cursor.MySQLCursorPrepared Class
10.7 constants.ClientFlag Class
10.8 constants.FieldType Class
10.9 constants.SQLMode Class
10.10 constants.CharacterSet Class
10.11 constants.RefreshOption Class
10.12 Errors and Exceptions
10.12.1 errorcode Module
10.12.2 errors.Error Exception
10.12.3 errors.DataError Exception
10.12.4 errors.DatabaseError Exception
10.12.5 errors.IntegrityError Exception
10.12.6 errors.InterfaceError Exception
10.12.7 errors.InternalError Exception
10.12.8 errors.NotSupportedError Exception
10.12.9 errors.OperationalError Exception
10.12.10 errors.PoolError Exception
10.12.11 errors.ProgrammingError Exception
10.12.12 errors.Warning Exception
10.12.13 errors.custom_error_exception() Function

This chapter contains the public API reference for Connector/Python. Examples should be considered working for Python 2.7, and Python 3.1 and greater. They might also work for older versions (such as Python 2.4) unless they use features introduced in newer Python versions. For example, exception handling using the as keyword was introduced in Python 2.6 and will not work in Python 2.4.

Note

Python 2.7 support was removed in Connector/Python 8.0.24.

The following overview shows the mysql.connector package with its modules. Currently, only the most useful modules, classes, and methods for end users are documented.

mysql.connector
  errorcode
  errors
  connection
  constants
  conversion
  cursor
  dbapi
  locales
    eng
      client_error
  protocol
  utils