Skip to main content

Redis Extension for PyApp

Project description

Let us handle the boring stuff!

https://img.shields.io/badge/code%20style-black-000000.svg

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.

Installation

Install using pip:

pip install pyapp-redis

Install using pipenv:

pipenv install pyapp-redis

Add pae.redis into the EXT list in your applications default_settings.py.

Add the REDIS block into your runtime settings file:

REDIS = {
    "default": {
        "url": "redis://user:pass@host:port/1",
    },
}

Usage

The following example creates both Connection and Session instances:

from pae.redis import get_client

# Get connection
redis = get_client()

redis.set("foo")

API

pae.redis.get_client(default: str = None) -> Redis

Get named Redis client instance

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

pyApp-Redis-1.0b1.tar.gz (2.9 kB view hashes)

Uploaded Source

Built Distribution

pyApp_Redis-1.0b1-py2.py3-none-any.whl (3.8 kB view hashes)

Uploaded Python 2 Python 3

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