Skip to main content
https://badge.fury.io/py/redistore.svg https://travis-ci.org/lamenezes/redistore.svg?branch=master https://coveralls.io/repos/github/lamenezes/redistore/badge.svg?branch=master https://img.shields.io/badge/python-3.4,3.5,3.6-blue.svg

Simple python interface for redis

Installation

pip install redistore

Usage

>> import redistore
>> store = redistore.get(host='localhost', port=6379, db=0)

Now you can access and store keys and values with a dict-like interface:

>> store['foo'] = 'bar'
>> store['foo']
'bar'
>> 'foo' in store
True
>> del store['foo']
>> store['foo']
...
KeyError: 'foo'

Or using methods:

>> store.set('baz', 'qux')
>> store.get('baz')
'qux'

redistore support other data types, e.g., hashes. they are used exactly like a dict:

>> store['hash'] = {}  # creates a hash without any values
>> 'my' in store['hash']
True
>> store['hash']['my']
'hash'
>> store['hash'].update({'baz': 'qux'})
>> store['hash']['baz']
'qux'
>> len(store['hash'])
2
>> list(store.keys())
['foo', 'bar']
>> for key, value in store.items():
...    print(key, value)
...
my hash
baz qux
>> store['other_hash'] = {'foo': 'bar'}  # creates a hash with values
>> store['other_hash']['foo']
'bar'

Metadata

Release files for redistore 0.1.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 redistore 0.1.1
File Size Uploaded Provenance
redistore-0.1.1.tar.gz 3.4 kB Without provenance Details

Release files / redistore-0.1.1.tar.gz

Download URL redistore-0.1.1.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
31f7625a8405ad59706fedf04d8b2b6267f8bd164340a4bcc73a3af6f788bc0a
BLAKE2b-256 checksum
How to use checksums
e1ca86ec6ba1cfcbe19215283f9af70f0f4349aba79447338e30c54ab80c5ba9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for redistore 0.1.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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

1 release file No provenance

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