Skip to main content

Add a MySQL connection pool for django using gevent

Project description

https://circleci.com/gh/laurentL/django-mysql-geventpool/tree/master.svg?style=svg

Mysql Connection Pooling backend for Django < 2.0 using gevent, only supports Python 2.7 It works with gunicorn async worker via gevent.

Fork from : https://github.com/shunsukeaihara/django-mysql-geventpool

This implimentation is based on django-db-geventpool(https://github.com/jneight/django-db-geventpool).

Installation

pip install django-mysql-geventpool-27

Settings

Add the ‘django_mysql_geventpool_27’ modules to the INSTALLED_APPS like this:

INSTALLED_APPS = (
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django_mysql_geventpool-27',
    # ...other installed applications...

Add MAX_CONNS to OPTIONS to set the maximun number of connections allowed to database (default=4)

DATABASES = {
    'default': {
        'ENGINE': 'django_mysql_geventpool_27.backends.mysql',
        'NAME': 'dbname',
        'USER': 'dbuser',
        'PASSWORD': 'dbpassword',
        'HOST': 'dbhost',
        'PORT': 'dbport',
        'OPTIONS': {
            'MAX_CONNS': 20
        }
    }
}

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

django-mysql-geventpool-27-0.2.4.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_mysql_geventpool_27-0.2.4-py2-none-any.whl (10.2 kB view details)

Uploaded Python 2

File details

Details for the file django-mysql-geventpool-27-0.2.4.tar.gz.

File metadata

  • Download URL: django-mysql-geventpool-27-0.2.4.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • 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/2.7.16

File hashes

Hashes for django-mysql-geventpool-27-0.2.4.tar.gz
Algorithm Hash digest
SHA256 c197043a64f5c215357f2ae05a7469d3cc09dae6ed6a5795448b76b5e9b4263b
MD5 33a1a7b57e4ca8e618c5798e85f31c19
BLAKE2b-256 59098ca6b1ca5722e60ece944b1d31d430ed593040b2d7fb6ef811d40e7bb011

See more details on using hashes here.

File details

Details for the file django_mysql_geventpool_27-0.2.4-py2-none-any.whl.

File metadata

  • Download URL: django_mysql_geventpool_27-0.2.4-py2-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 2
  • 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/2.7.16

File hashes

Hashes for django_mysql_geventpool_27-0.2.4-py2-none-any.whl
Algorithm Hash digest
SHA256 330107582725524f1e95c6b9d79aba6fcf08bc7707fcf72d012388620797f09f
MD5 b402e4c317bfc244f9346db1158efc8f
BLAKE2b-256 3f603d0e63e0fb84574aba13e0fc148a13ba00f0b20dc172f170a762d59ddda7

See more details on using hashes here.

Supported by

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