相关文章推荐
俊逸的斑马  ·  CONVERT (SQL) | ...·  2 周前    · 
犯傻的黄豆  ·  Branches API | GitLab ...·  2 周前    · 
仗义的刺猬  ·  Date Functions – DuckDB·  2 周前    · 
微醺的凉茶  ·  Why is DB2 data ...·  1 年前    · 
沉着的饼干  ·  C#在tabcontrol中的groupbo ...·  1 年前    · 
安静的打火机  ·  pyspark ...·  2 年前    · 
飞翔的饺子  ·  threejs-miniprogram加载g ...·  2 年前    · 

MySQL Connector/Python enables Python programs to access MySQL databases, using an API that is compliant with the Python Database API Specification v2.0 (PEP 249) - We refer to it as the Classic API .

Features

  • Asynchronous Connectivity

  • C-extension

  • Telemetry

  • Installation

    Connector/Python contains the classic and XDevAPI connector APIs, which are installed separately. Any of these can be installed from a binary or source distribution.

    Binaries are distributed in the following package formats:

  • WHEEL

  • On the other hand, the source code is distributed as a compressed file from which a wheel package can be built.

    The recommended way to install Connector/Python is via pip , which relies on WHEEL packages. For such a reason, it is the installation procedure that is going to be described moving forward.

    Please, refer to the official MySQL documentation Connector/Python Installation to know more about installing from an RPM, or building and installing a WHEEL package from a source distribution.

    Before installing a package with pip , it is strongly suggested to have the most recent pip version installed on your system. If your system already has pip installed, you might need to update it. Or you can use the standalone pip installer .

    $ pip install mysql-connector-python

    Installation Options

    Connector packages included in MySQL Connector/Python allow you to install optional dependencies to unleash certain functionalities.

    # 3rd party packages to unleash the telemetry functionality are installed
    $ pip install mysql-connector-python[telemetry]

    This installation option can be seen as a shortcut to install all the dependencies needed by a particular feature. Mind that this is optional and you are free to install the required dependencies by yourself.

    Available options:

  • dns-srv

  • gssapi

  • webauthn

  • telemetry

  • # Fetch one result row = cur . fetchone () print ( "Current date is: {0} " . format ( row [ 0 ])) # Close connection cnx . close ()

    Additional Resources

  • MySQL Connector/Python Developer Guide

  • MySQL Connector/Python Forum

  • MySQL Public Bug Tracker

  • Slack ( Sign-up required if you do not have an Oracle account)

  • Stack Overflow

  • Oracle Blogs

  • Contributing

    There are a few ways to contribute to the Connector/Python code. Please refer to the contributing guidelines for additional information.

    License

    Please refer to the README.txt and LICENSE.txt files, available in this repository, for further details.

    Download files

    Download the file for your platform. If you're not sure which to choose, learn more about installing packages .

    Source Distribution Filter files by name, interpreter, ABI, and platform.

    If you're not sure about the file name format, learn more about wheel file names .

    The dropdown lists show the available interpreters, ABIs, and platforms.

    Enable javascript to be able to filter the list of wheel files.

    Copy a direct link to the current filters mysql_connector_python-9.4.0-cp313-cp313-manylinux_2_28_aarch64.whl (33.5 MB view details ) Uploaded