Skip to main content

Python interface to MySQL

Project description

mysqlclient-collate

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.tar.gz (86.9 kB view details)

Uploaded Source

Built Distribution

mysqlclient_collate-2.1.1-cp311-cp311-win_amd64.whl (173.4 kB view details)

Uploaded CPython 3.11 Windows x86-64

File details

Details for the file mysqlclient-collate-2.1.1.tar.gz.

File metadata

  • Download URL: mysqlclient-collate-2.1.1.tar.gz
  • Upload date:
  • Size: 86.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for mysqlclient-collate-2.1.1.tar.gz
Algorithm Hash digest
SHA256 2ad230330c0770949fb5d2e318fb1059da5182010cd5b57487bb353ab08c3e8e
MD5 d10e8bb2ac525775fd7c2708a31943de
BLAKE2b-256 96b9288d46f8d361ffe7fe0a9952b033e228845e9e42493bc9352477b2200a63

See more details on using hashes here.

File details

Details for the file mysqlclient_collate-2.1.1-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for mysqlclient_collate-2.1.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 951e7cc0d16a72878757734a9f88e26872f216402048c78b57883d7a8e6cadaa
MD5 453c464a948615a37fd607f6eacd7de3
BLAKE2b-256 e55c8d61508dfc2329dbcf9b2fd08f08eda31d88ecd6c3589adf46312f929720

See more details on using hashes here.

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