Skip to main content

Ping to MySQL in Django middleware.

Project description

build-status pypi docs

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

  1. Add to settings.INSTALLED_APPS

INSTALLED_APPS = [
    ...
    'mysqlping',
]
  1. 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.

Author

  • Shinya Okano

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

django_mysqlping-0.1.0-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file django_mysqlping-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: django_mysqlping-0.1.0-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.21.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1

File hashes

Hashes for django_mysqlping-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c51d3c33dff5b8c738288a3100d874c2d2c2bbe4e45ca525392314b65b0adade
MD5 e738091ff455cddf626af7b06e297668
BLAKE2b-256 54ca617583fc6c0e0c01c9af8bf6a5d44c38a7f13254538eb6bba027b7635002

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