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

```bash
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.0.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.0-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: redis_namespace_client-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 9020f07e0bd07e58db80bdea69757af7b6533eaf5aea3ba206c7a1afb562cba8
MD5 9c01a22206b3c4f5814301e6235e0de0
BLAKE2b-256 775a6485b193aeb86903842e9aac432e8ce43689a1e65ea0ff5b9e51f2dd287e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for redis_namespace_client-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 52f5423a4a0ea815438454a5ce4cefaf1eb3e52a873eda8bf1e55e84ee21e303
MD5 1446a9dbf02a69ab008da7bde03530e7
BLAKE2b-256 07354f7f6a66f9f7f3716e73d307115cade5c2b8adcbdbc810f6cc65ceb9f481

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