Skip to main content

RadishSalad

Radishsalad is simple lib for work with redis datastore in more pythonic way.

Base

It include String, Hash, List and Set classes, that represent redis datatypes. You need to initialize datatype with key:

>>> dt.List('main stream').append('Blogger Navalniy discovered new corruption scheme in Russia!')
1L
>>> list(dt.List('main stream'))
['Blogger Navalniy discovered new corruption scheme in Russia!']
>>> up = dt.Hash('0:user profile')
>>> up['name'] = 'deepwalker'
>>> dict(up)
{'name': 'deepwalker'}
>>> 'name' in up
True
>>> friends = dt.Set('friends')
>>> friends.add(1929340)
>>> set(friends)
set(['1929340'])
>>> 1929340 in friends
True

Models

Radishsalad has models module that is not positioned as Django ORM thing. Its just helper for keys name generation. So you create an model:

>>> from radishsalad import models as m
>>> class User(m.Model):
...      name = m.String()
...      subscribers = m.Set()
...      profile = m.Hash()
...      messages = m.List()
...      read = m.List()
...

And for using you need initialize it with key:

>>> user = User(1000)

Now you have user instance, and you can get keys for it members:

>>> user.name.get_key()
'user:1000:name'

Library does not return you a string instead of String objects for using in redis.mget:

>>> from radishsalad.connection import get_redis
>>> r = get_redis()
>>> r.mset(dict((User(i).name.get_key(), i) for i in xrange(40)))
>>> r.mget(User(i).name.get_key() for i in xrange(40))
['0', '1', '2', '3', '4', '5', '6', '7', ... '38', '39']

Metadata

Release files for radishsalad 0.1.0

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

Source distribution (sdist)

Source distribution for radishsalad 0.1.0
File Size Uploaded Provenance
radishsalad-0.1.0.tar.gz 3.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for radishsalad 0.1.0
File Interpreter ABI Platform
radishsalad-0.1.0.linux-x86_64.tar.gz Details

Total release size: 9.9 kB

Release files / radishsalad-0.1.0.tar.gz

Download URL radishsalad-0.1.0.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
aabbe9fe386f7f9c3d34050940919c86ff5c67f57d0312fef2818889a5e09bd4
BLAKE2b-256 checksum
How to use checksums
f6e1bfd2a5eba085aba1c1ededeafdf9563626894aa1aade563bbe0edbe691e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / radishsalad-0.1.0.linux-x86_64.tar.gz

Download URL radishsalad-0.1.0.linux-x86_64.tar.gz
Size 6.5 kB
Tags Source
SHA-256 checksum
How to use checksums
1827fee1e28648d0e04f34c710ad56ce865a8469bbb4b8996578d614b228c67b
BLAKE2b-256 checksum
How to use checksums
8c569ab36d305b35fead440e3c1aa720e7682d33b1d59eb34e83986b398c9d7c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for radishsalad 0.1.0

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files 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