Skip to main content

Wrapper for Redis Client

Project description

RedisDB

Overview

It is a wrapper for a Redis Server.

Installing RedisDB and Supported Versions

RedisDB is available on PyPI:

$ python -m pip install wrapper-redis-client

RedisDB officially supports Python 3.8+.

Cloning the repository

$ git clone https://github.com/tatianno/wrapper-redis-client.git

Example

from wrapper_redis_client import RedisDB

# We set Online: as the default prefix for keys that will be used to persist data.
redis_db = RedisDB(key_prefix='Online:') 

# Clearing previously persisted data.
#
# Obs.: Only data persisted with the keys that have the prefix informed during the instance of the class will be erased.
redis_db.flushall()

# Persisting data with the Online:Test key
redis_db.save('Online:Test', {'test': 1234})

# Retrieving data with the Online:Test key
data = redis_db.get('Online:Test')

# Getting list of keys with prefix informed during class instance
keys_list = redis_db.get_all_keys()

# Erasing data with the Online:Test key
redis.delete('Online:Test')

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

wrapper_redis_client-0.0.4-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file wrapper_redis_client-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for wrapper_redis_client-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a7b703461fc91a87584a00888f72d6b7c9eac2790458cbe27b5aee19fc409ef1
MD5 638606b3db37087d6843f6b7b15d941b
BLAKE2b-256 a68fced64a149b00901925f5cb144b2d0a95004e88c9172b3277c06238602c80

See more details on using hashes here.

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