Skip to main content

Python interface to MySQL

Project description

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",
        },
    }
}

Project details


Download files

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

Source Distribution

mysqlclient-collate-2.1.1.post2.tar.gz (87.2 kB view hashes)

Uploaded Source

Built Distributions

mysqlclient_collate-2.1.1.post2-cp311-cp311-win_amd64.whl (173.6 kB view hashes)

Uploaded CPython 3.11 Windows x86-64

mysqlclient_collate-2.1.1.post2-cp310-cp310-win_amd64.whl (173.5 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

mysqlclient_collate-2.1.1.post2-cp39-cp39-win_amd64.whl (174.5 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

mysqlclient_collate-2.1.1.post2-cp38-cp38-win_amd64.whl (174.5 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

mysqlclient_collate-2.1.1.post2-cp37-cp37m-win_amd64.whl (174.1 kB view hashes)

Uploaded CPython 3.7m Windows x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page