Redis Wrapper
rediswrapper is a pythonic wrapper of Redis Client for end users. The whole storage acts like a python dict as well as its child storage values.
Features
The root client support dict-like operations
Python object wrappers for list, set, hash type values
Implicit serialization and deserialization when storing and fetching data
Installation
From PyPI:
pip install rediswrapper
From GitHub:
git clone https://github.com/frostming/rediswrapper cd rediswrapper pip install .
Usage
rediswrapper will try to serialize non-sting values and store them in redis and deserialize them when fetching back.
All redis value types are mocked with respective python objects and support all standard methods as the builtin types.
>>> import rediswrapper
>>> redis = rediswrapper.RedisDict()
# String value
>>> redis['a'] = 'hello'
# int value
>>> redis['b'] = 2
>>> dict(redis)
{'a': 'hello', 'b': 2}
# Picklable object
>>> import datetime
>>> redis['c'] = datetime.datetime.now()
# List value
>>> redis['d'] = list(range(5))
>>> redis['d'].append(0)
>>> redis['d']
ListType value([0, 1, 2, 3, 4, 0])
# Hash value
>>> redis['e'] = {'a': 1, 'b': 2}
>>> redis['e'].get('a')
1
# Set value
>>> redis['f'] = set([1, 2])
>>> redis['f'].add(3)
>>> redis['f']
SetType value([1, 2, 3])
To inspect those value types, one should use the ABCs defined in collections module.
>>> from collections import Mapping
>>> isinstance(redis['e'], Mapping)
True
History
- v0.4.0
Drop support for Python older than 3.6
- v0.3.0
Drop support for Python 3.3
Fix a vulnerability issue that cause users run arbitrary scripts.
Licensing
This work is open-sourced under the MIT license.
Metadata
Release files for rediswrapper 0.4.0.post1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| rediswrapper-0.4.0.post1.tar.gz | 4.8 kB | Without provenance | Details for rediswrapper-0.4.0.post1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rediswrapper-0.4.0.post1-py3-none-any.whl | Python 3 | none | any | Details for rediswrapper-0.4.0.post1-py3-none-any.whl |
Total release size: 10.6 kB
Release files / rediswrapper-0.4.0.post1.tar.gz
| Download URL | rediswrapper-0.4.0.post1.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
de1920cfaacb4c6d5b7fb57409aa49b2a68cc23b773277bda952a5f19b7e7163
|
|
BLAKE2b-256 checksum How to use checksums |
9cfbb38f2699c95f206948e53aacb061e62212767b607baa4324c70839596fb4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
pdm/2.3.4 CPython/3.10.4
|
Release files / rediswrapper-0.4.0.post1-py3-none-any.whl
| Download URL | rediswrapper-0.4.0.post1-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3169528602ee2ca0f504876e5ad10ae36dd9077b67673480f49551e3cb281808
|
|
BLAKE2b-256 checksum How to use checksums |
803cf8304fb2a82bd1d28d87a2895c96c9b3454f18ae33baf620834835298891
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
pdm/2.3.4 CPython/3.10.4
|
Security for rediswrapper 0.4.0.post1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.