Skip to main content
Join the official 2020 Python Developers SurveyStart the survey!

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.

Files for django-mysqlping, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size django_mysqlping-0.1.1-py3-none-any.whl (3.5 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page