Skip to main content

Redis dictionary & list nesting for Python objects

Project description

RedNest

Redis dictionary & list nesting for Python objects using redis-py and Redis Hashes and Lists

Usage example

import redis

from rednest import Dictionary, List

# Initialize redis connection
redis = redis.Redis(...)

# Create your dictionary
my_dict = Dictionary(redis, "test-dict")
my_dict.test_value = "Hello World"
my_dict.numbers = [10, 20, 30]
my_dict.ages = {
	"User 1": 10,
	"User 2": 20,
	"User 3": 30,
}

# Change a user age
my_dict.ages["User 3"] = 40

# Show the variable types
print(type(my_dict.ages), type(my_dict.numbers))

# Show the entire dictionary
print(my_dict)

Starting a test server locally

To run a test server, you can use the following command to run a Redis server locally:

docker run --rm -it -p 6379:6379 redis/redis-stack-server

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

rednest-0.6.0.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

rednest-0.6.0-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file rednest-0.6.0.tar.gz.

File metadata

  • Download URL: rednest-0.6.0.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for rednest-0.6.0.tar.gz
Algorithm Hash digest
SHA256 2081ee180c0ffac4bd4bc67c02dbb2d443cfc7a88cb7e2214722107741f41d35
MD5 3d0ecf45ebc4a45ad4368e6515ad9aae
BLAKE2b-256 c4febf2889513bb40bee9ed48daab659a47c29b8d9361057ab631332e3052a3a

See more details on using hashes here.

File details

Details for the file rednest-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: rednest-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 10.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for rednest-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3c459b577de313dcaf19906a7617f3fec27055bf97299251e252efe2771621e5
MD5 247a1d84df247a4803b4f5e6f4910aff
BLAKE2b-256 16e1b5ca5261ac1062c1472c92fa5ae369234266a8fe040cc29078ebac0ea2b1

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