Redis dictionary & list nesting
Project description
RedNest
Redis dictionary & list nesting using redis-py
and Redis Hash
es and List
s
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
Release history Release notifications | RSS feed
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.5.1.tar.gz
(12.7 kB
view details)
Built Distribution
File details
Details for the file rednest-0.5.1.tar.gz
.
File metadata
- Download URL: rednest-0.5.1.tar.gz
- Upload date:
- Size: 12.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9ca5668559cdbac3bb3529c384bdf6c3a175cfd34fb7eafdac0f4e4417b18ea |
|
MD5 | e46e843ddde8e77598e6013018e38e89 |
|
BLAKE2b-256 | 900164e81b7da800c840011d15fd601fc7513ae1f152fc28a254c5d64d2d77da |
File details
Details for the file rednest-0.5.1-py3-none-any.whl
.
File metadata
- Download URL: rednest-0.5.1-py3-none-any.whl
- Upload date:
- Size: 9.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad35af89e94b8ad0e8855ac3f28aafd3700713f92e391a8fdf3974598271a766 |
|
MD5 | a2ccb70e74555d8742efdda4ad5a3002 |
|
BLAKE2b-256 | 3954c2c00e163ac946c1da4922247ebd2ecd61c98f69a89c9325e2f80c4bf088 |