
Security News
CISA Kills Off RSS Feeds for KEVs and Cyber Alerts
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.
To install redis-cooker, simply:
$ pip install redis-cooker
or from source:
$ python setup.py install
>>> from redis_cooker.clients import set_connection_url
>>> from redis_cooker.collections import RedisList
>>>
>>> set_connection_url('redis://:@127.0.0.1:6379/15')
>>> for i in RedisList("Testing:RedisList", init=['Hello', 'World']):
>>> print(i)
Hello
World
By default, all data will use the built-in json serializer.
redis-cooker provide 6 datastructures in current version:
>>> from typing import List
>>>
>>> from pydantic import BaseModel
>>> from redis_cooker.clients import set_connection_url
>>> from redis_cooker.collections import RedisList
>>>
>>> set_connection_url('redis://:@127.0.0.1:6379/15')
>>>
>>>
>>> class Person(BaseModel):
name: str
age: int
>>>
>>>
>>> data = [{"name": "A", "age": 15},{"name": "B", "age": "16"}]
>>> for i in RedisList("Testing:Pydantic", init=data, schema=Person):
>>> print(i)
{'name': 'A', 'age': 15}
{'name': 'B', 'age': '16'}
>>> from typing import List
>>>
>>> from rest_framework import serializers
>>> from redis_cooker.clients import set_connection_url
>>> from redis_cooker.collections import RedisList
>>>
>>> set_connection_url('redis://:@127.0.0.1:6379/15')
>>>
>>>
>>> class DRFPerson(serializers.Serializer):
name = serializers.CharField()
age = serializers.IntegerField()
>>>
>>>
>>> data = [{"name": "A", "age": 15},{"name": "B", "age": "16"}]
>>> for i in RedisList("Testing:DRF", init=data, schema=DRFPerson):
>>> print(i)
OrderedDict([('name', 'A'), ('age', 15)])
OrderedDict([('name', 'B'), ('age', 16)])
>>> from redis_cooker.abn_test import ABNTest, Choice
>>> from redis_cooker.clients import current_redis_client, set_connection_url
>>>
>>> set_connection_url('redis://:@127.0.0.1:6379/15')
>>> client = current_redis_client()
>>>
>>> topic = "lead comment"
>>> choices = [Choice(name="A", value=5), Choice(name="B", value=5), Choice(name="C", value=2)]
>>> abn_test = ABNTest(topic, choices)
>>> choice = abn_test.fetch()
FAQs
An redis python datastructures package.
We found that redis-cooker demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.