
Security News
Deno 2.6 + Socket: Supply Chain Defense In Your CLI
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.
coredis
Advanced tools
coredis is an async redis client with support for redis server, cluster & sentinel.
The client API uses the specifications in the Redis command documentation to define the API by using the following conventions:
Mapping.One of arguments accepting pure tokens are collapsed and accept a PureTokenResponses are mapped between RESP and python types as closely as possible.
For higher level concepts such as Pipelines, LUA Scripts, PubSub & Streams abstractions are provided to encapsulate recommended patterns. See the Handbook and the API Documentation for more details.
To install coredis:
$ pip install coredis
>= Redis 7.0]>= Redis 7.0]import asyncio
from coredis import Redis, RedisCluster
async def example():
client = Redis(host='127.0.0.1', port=6379, db=0)
# or with redis cluster
# client = RedisCluster(startup_nodes=[{"host": "127.0.01", "port": 7001}])
await client.flushdb()
await client.set('foo', 1)
assert await client.exists(['foo']) == 1
assert await client.incr('foo') == 2
assert await client.incrby('foo', increment=100) == 102
assert int(await client.get('foo')) == 102
assert await client.expire('foo', 1)
await asyncio.sleep(0.1)
assert await client.ttl('foo') == 1
assert await client.pttl('foo') < 1000
await asyncio.sleep(1)
assert not await client.exists(['foo'])
asyncio.run(example())
import asyncio
from coredis.sentinel import Sentinel
async def example():
sentinel = Sentinel(sentinels=[("localhost", 26379)])
primary = sentinel.primary_for("myservice")
replica = sentinel.replica_for("myservice")
assert await primary.set("fubar", 1)
assert int(await replica.get("fubar")) == 1
asyncio.run(example())
To see a full list of supported redis commands refer to the Command compatibility documentation
Details about supported Redis modules and their commands can be found here
coredis is tested against redis versions >= 7.0
The test matrix status can be reviewed
here
coredis is additionally tested against:
uvloop >= 0.15.0coredis is known to work with the following databases that have redis protocol compatibility:
FAQs
Python async client for Redis key-value store
We found that coredis 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
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.

Security News
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.