METADATA 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. Metadata-Version: 2.1
  2. Name: mysqlclient
  3. Version: 2.2.4
  4. Summary: Python interface to MySQL
  5. Author-email: Inada Naoki <songofacandy@gmail.com>
  6. License: GNU General Public License v2 (GPLv2)
  7. Project-URL: Project, https://github.com/PyMySQL/mysqlclient
  8. Project-URL: Documentation, https://mysqlclient.readthedocs.io/
  9. Keywords: MySQL
  10. Classifier: Development Status :: 5 - Production/Stable
  11. Classifier: Environment :: Other Environment
  12. Classifier: License :: OSI Approved :: GNU General Public License (GPL)
  13. Classifier: Operating System :: MacOS :: MacOS X
  14. Classifier: Operating System :: Microsoft :: Windows :: Windows NT/2000
  15. Classifier: Operating System :: OS Independent
  16. Classifier: Operating System :: POSIX
  17. Classifier: Operating System :: POSIX :: Linux
  18. Classifier: Operating System :: Unix
  19. Classifier: Programming Language :: C
  20. Classifier: Programming Language :: Python
  21. Classifier: Programming Language :: Python :: 3
  22. Classifier: Programming Language :: Python :: 3.8
  23. Classifier: Programming Language :: Python :: 3.9
  24. Classifier: Programming Language :: Python :: 3.10
  25. Classifier: Programming Language :: Python :: 3.11
  26. Classifier: Programming Language :: Python :: 3.12
  27. Classifier: Topic :: Database
  28. Classifier: Topic :: Database :: Database Engines/Servers
  29. Requires-Python: >=3.8
  30. Description-Content-Type: text/markdown
  31. License-File: LICENSE
  32. # mysqlclient
  33. This project is a fork of [MySQLdb1](https://github.com/farcepest/MySQLdb1).
  34. This project adds Python 3 support and fixed many bugs.
  35. * PyPI: https://pypi.org/project/mysqlclient/
  36. * GitHub: https://github.com/PyMySQL/mysqlclient
  37. ## Support
  38. **Do Not use Github Issue Tracker to ask help. OSS Maintainer is not free tech support**
  39. When your question looks relating to Python rather than MySQL:
  40. * Python mailing list [python-list](https://mail.python.org/mailman/listinfo/python-list)
  41. * Slack [pythondev.slack.com](https://pyslackers.com/web/slack)
  42. Or when you have question about MySQL:
  43. * [MySQL Community on Slack](https://lefred.be/mysql-community-on-slack/)
  44. ## Install
  45. ### Windows
  46. Building mysqlclient on Windows is very hard.
  47. But there are some binary wheels you can install easily.
  48. If binary wheels do not exist for your version of Python, it may be possible to
  49. build from source, but if this does not work, **do not come asking for support.**
  50. To build from source, download the
  51. [MariaDB C Connector](https://mariadb.com/downloads/#connectors) and install
  52. it. It must be installed in the default location
  53. (usually "C:\Program Files\MariaDB\MariaDB Connector C" or
  54. "C:\Program Files (x86)\MariaDB\MariaDB Connector C" for 32-bit). If you
  55. build the connector yourself or install it in a different location, set the
  56. environment variable `MYSQLCLIENT_CONNECTOR` before installing. Once you have
  57. the connector installed and an appropriate version of Visual Studio for your
  58. version of Python:
  59. ```
  60. $ pip install mysqlclient
  61. ```
  62. ### macOS (Homebrew)
  63. Install MySQL and mysqlclient:
  64. ```bash
  65. $ # Assume you are activating Python 3 venv
  66. $ brew install mysql pkg-config
  67. $ pip install mysqlclient
  68. ```
  69. If you don't want to install MySQL server, you can use mysql-client instead:
  70. ```bash
  71. $ # Assume you are activating Python 3 venv
  72. $ brew install mysql-client pkg-config
  73. $ export PKG_CONFIG_PATH="$(brew --prefix)/opt/mysql-client/lib/pkgconfig"
  74. $ pip install mysqlclient
  75. ```
  76. ### Linux
  77. **Note that this is a basic step. I can not support complete step for build for all
  78. environment. If you can see some error, you should fix it by yourself, or ask for
  79. support in some user forum. Don't file a issue on the issue tracker.**
  80. You may need to install the Python 3 and MySQL development headers and libraries like so:
  81. * `$ sudo apt-get install python3-dev default-libmysqlclient-dev build-essential pkg-config` # Debian / Ubuntu
  82. * `% sudo yum install python3-devel mysql-devel pkgconfig` # Red Hat / CentOS
  83. Then you can install mysqlclient via pip now:
  84. ```
  85. $ pip install mysqlclient
  86. ```
  87. ### Customize build (POSIX)
  88. mysqlclient uses `pkg-config --cflags --ldflags mysqlclient` by default for finding
  89. compiler/linker flags.
  90. You can use `MYSQLCLIENT_CFLAGS` and `MYSQLCLIENT_LDFLAGS` environment
  91. variables to customize compiler/linker options.
  92. ```bash
  93. $ export MYSQLCLIENT_CFLAGS=`pkg-config mysqlclient --cflags`
  94. $ export MYSQLCLIENT_LDFLAGS=`pkg-config mysqlclient --libs`
  95. $ pip install mysqlclient
  96. ```
  97. ### Documentation
  98. Documentation is hosted on [Read The Docs](https://mysqlclient.readthedocs.io/)