Redis Extension for PyApp
Project description
Let us handle the boring stuff!
This extension provides a Redis client factory to allow configuration to be configured via pyApp settings.
The extension also provides checks to confirm the settings are correct and that the application is able to connect to the redis instance.
It is strongly recommended to install the hiredis companion package to improve the performance of the redis client.
Installation
Install using pip:
pip install pyapp-redis
Install using pipenv:
pipenv install pyapp-redis
Add the REDIS block into your runtime settings file:
REDIS = { "default": { "url": "redis://user:pass@host:port/1", }, }
Usage
The following example creates a Redis client instance:
from pyapp_ext.redis import get_client # Get connection redis = get_client() redis.set("foo")
API
pyapp_ext.redis.get_client(default: str = None) -> Redis
Get named Redis client instance
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 Distribution
Built Distribution
File details
Details for the file pyApp-Redis-1.0.tar.gz
.
File metadata
- Download URL: pyApp-Redis-1.0.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53b5b0563325827cbe04bf4578ad13aa4720ad3e878fd6eb05cd8471620589cd |
|
MD5 | c46b8e2571e8e97e37c05d45c2a2c208 |
|
BLAKE2b-256 | 59bdd50b2897bcadd2397c734f30624f48cee76457e3b4db18af6340405589b8 |
File details
Details for the file pyApp_Redis-1.0-py3-none-any.whl
.
File metadata
- Download URL: pyApp_Redis-1.0-py3-none-any.whl
- Upload date:
- Size: 6.6 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/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2eef32806b82de40d61c08bb99df5a0ec2fc08c2520663652f2176241d137bf6 |
|
MD5 | 7ee2bb3197dcef1a5bc3e340b6cb8498 |
|
BLAKE2b-256 | 5c9bd627c7c60a4e1204e69d4c8e348b857dbd9444c7725fd8e72969869016d1 |