Skip to main content

Redis client that runs as a unique global object within the library and supports asynchronous calls

Project description

Asynchronous GLObal REDis Interface

Implements a small interface around the basic redis.Redis() client meant to be shared across different files in the same process that need access to the same redis instance. This implementation has two major goals:

  1. Allow sharing the same Client object across different files without having to pass the object itself each time.
  2. Allow asynchronous calls to the redis interface, specially when submitting data to avoid any disruption in running code

Usage

The usage of this library is straight forward and it implements the basic redis.Redis() methods:

from glored import redis_client
import time

# Synchronous
redis_client.set('some_key', 'some_value')
result = redis_client.get('some_key')

# Asynchronous
redis_client.asynchronous.set('some_key', 'other_value')
time.sleep(1)
result = redis_client.get('some_key')

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

glored-0.1.1.tar.gz (4.3 kB view hashes)

Uploaded Source

Built Distribution

glored-0.1.1-py3-none-any.whl (4.9 kB view hashes)

Uploaded 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