Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mysqlclient-collate

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mysqlclient-collate

Python interface to MySQL

  • 2.1.1.post2
  • PyPI
  • Socket score

Maintainers
1

mysqlclient-collate

NOTE: These features have been merged upstream into mysqlclient 2.2.0. This package is now archived. Please switch to mysqlclient>=2.2 instead.


Fork of mysqlclient which adds support for setting collation via connection options.

Setting collation is necessary for servers that do not use the default, and for Django queries using CAST statements, which are prevalent in Wagtail 4. For more background, see the following discussions:

Usage

Make sure you have MySQL or MariaDB C connector, and a C compiler installed.

IMPORTANT: If you already have mysqlclient installed, uninstall it before installing this fork. Both projects use the same module name and cannot be installed at the same time.

pip uninstall mysqlclient
pip install mysqlclient-collate

For use in a Django project, set your database connection as so:

DATABASES = {
    "default": {
        "ENGINE": "django.db.backends.mysql",
        "HOST": "",
        "NAME": "",
        "USER": "",
        "PASSWORD": "",
        "OPTIONS": {
            "charset": "utf8mb4",
            "collation": "utf8mb4_unicode_ci",
        },
    }
}

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc