Skip to main content
https://badge.fury.io/py/redis-hash.svg https://travis-ci.org/lamenezes/redis-hash.svg?branch=master https://coveralls.io/repos/github/lamenezes/redis-hash/badge.svg?branch=master

Simple python interface for redis hash type

Installation

pip install redis redis_hash

Usage

First you need to instantiate the redis client from the redis package:

>> from redis import StrictRedis
>> redis_client = StrictRedis(host='localhost', port=6379, db=0)

Then create your hash passing the client and the hash key:

>> from redis_hash import RedisHash
>> redis_hash = RedisHash(redis_client, 'hash_name')

Now your can handle your hash like a dict:

>> redis_hash['foo'] = 'bar'
>> len(redis_hash)
1
>> 'foo' in redis_hash
True
>>> for k, v in redis_hash:
...     print(k, v)
...
foo bar
>>> redis_hash['foo']
b'bar'
>>> list(redis_hash)
[(b'foo', b'bar')]
>> del redis_hash['foo']
>> len(redis_hash)
0
>> 'foo' in redis_hash
False

Metadata

Release files for redis-hash 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for redis-hash 1.0.1
File Size Uploaded Provenance
redis-hash-1.0.1.tar.gz 2.9 kB Without provenance Details

Release files / redis-hash-1.0.1.tar.gz

Download URL redis-hash-1.0.1.tar.gz
Size 2.9 kB
Tags Source
SHA-256 checksum
How to use checksums
2cbf242971989821c057fb12179dc2ab3c45d5642f7f865df29f1918781cb785
BLAKE2b-256 checksum
How to use checksums
80c1dfe4742691f17cccfdd17e62da711dc20bcb7364ee17d410bd5d0ac354fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for redis-hash 1.0.1

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page