Add a MySQL connection pool for django using gevent
Project description
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
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-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c197043a64f5c215357f2ae05a7469d3cc09dae6ed6a5795448b76b5e9b4263b
|
|
| MD5 |
33a1a7b57e4ca8e618c5798e85f31c19
|
|
| BLAKE2b-256 |
59098ca6b1ca5722e60ece944b1d31d430ed593040b2d7fb6ef811d40e7bb011
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
330107582725524f1e95c6b9d79aba6fcf08bc7707fcf72d012388620797f09f
|
|
| MD5 |
b402e4c317bfc244f9346db1158efc8f
|
|
| BLAKE2b-256 |
3f603d0e63e0fb84574aba13e0fc148a13ba00f0b20dc172f170a762d59ddda7
|