Ping to MySQL in Django middleware.
Project description
Ping to MySQL in Django middleware.
This middleware ping to MySQL server before the request and auto reconnect to the server.
It supports PyMySQL(using MySQLdb mode) and mysqlclient in the database backend of Django(django.db.backends.mysql).
Usage
Add to settings.INSTALLED_APPS
INSTALLED_APPS = [
...
'mysqlping',
]
Add to settings.MIDDLEWARE (For example, you want to ping before every processes, therefore insert the middleware to first.)
MIDDLEWARE = [
'mysqlping.middleware.MySQLPingMiddleware',
...
]
License
This software is licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built 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.
Copy a direct link to the current filters
File details
Details for the file django_mysqlping-0.1.1-py3-none-any.whl.
File metadata
- Download URL: django_mysqlping-0.1.1-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32d78ec6348efb9229875986c95b10a3ab7b30c8bf732168d095cb9ee444e4e7
|
|
| MD5 |
bef46bd3a8ccdc8b8e940ef5e3bb9e54
|
|
| BLAKE2b-256 |
fa149d6cbadb1a13e411f3ebf13a391809c84077b6665c914098fa2015c44212
|