Skip to main content

A simple Redis client for Python with support for: namespacing and JSON serialization/deserialization, designed for middleware applications.

Project description

redis-namespace-client

A simple Redis client for Python with support for:

  • Namespacing
  • JSON serialization
  • Expiry (TTL)
  • Logging
  • .env support via python-dotenv

Installation

pip install redis-namespace-client

Usage

from redis_namespace_client import redis_set, redis_get

# Set a key
redis_set("mykey", {"foo": "bar"}, ex=3600)

# Get the key
value = redis_get("mykey")
print(value)

Environment Variables

Create a .env file or export these:

REDIS_ERP_HOST=localhost
REDIS_ERP_PORT=6379
REDIS_ERP_DB=3
REDIS_ERP_NAMESPACE=my_namespace

Enjoy
[![PyPI version](https://badge.fury.io/py/redis-namespace-client.svg)](https://pypi.org/project/redis-namespace-client/)

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

redis_namespace_client-0.1.2.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

redis_namespace_client-0.1.2-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file redis_namespace_client-0.1.2.tar.gz.

File metadata

  • Download URL: redis_namespace_client-0.1.2.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for redis_namespace_client-0.1.2.tar.gz
Algorithm Hash digest
SHA256 b290680dbaeba9d691a279ce8fda9a7f2dc3acdb5d9d05a5d4403477146fb8c0
MD5 772cb7286d685c44a461def5bf49b819
BLAKE2b-256 2419dad201f963082b3c2021c5cca3994d05c250a654a187f2da08590642b977

See more details on using hashes here.

File details

Details for the file redis_namespace_client-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for redis_namespace_client-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0d49b116ba9e3449dfb7a647a754d10096adecfac7be6ae5f339bb4e867743c8
MD5 bb60bfedd72f1f8bfcff04c42e8baa9f
BLAKE2b-256 f22ce195c43fceb03df4a8dced5ae7d0b8ebe5a6171b076fc047ab5287b718e7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page