
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.
redis-rs
Advanced tools
.. image:: https://img.shields.io/badge/License-MIT-blue.svg :target: https://lbesson.mit-license.org/
.. image:: https://img.shields.io/pypi/v/redis-rs.svg :target: https://pypi.org/project/redis-rs
.. image:: https://img.shields.io/pypi/pyversions/redis-rs.svg :target: https://pypi.org/project/redis-rs :alt: Python versions
.. image:: https://readthedocs.org/projects/redis-rs/badge/?version=latest :target: https://github.com/aamalev/redis-rs-py#redis-rs :alt: Documentation Status
.. image:: https://github.com/aamalev/redis-rs-py/workflows/Tests/badge.svg :target: https://github.com/aamalev/redis-rs-py/actions?query=workflow%3ATests
.. image:: https://img.shields.io/pypi/dm/redis-rs.svg :target: https://pypistats.org/packages/redis-rs
|
.. image:: https://img.shields.io/badge/Rustc-1.73.0-blue?logo=rust :target: https://www.rust-lang.org/
.. image:: https://img.shields.io/badge/cargo-clippy-blue?logo=rust :target: https://doc.rust-lang.org/stable/clippy/
.. image:: https://img.shields.io/badge/PyO3-maturin-blue.svg :target: https://github.com/PyO3/maturin
.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json :target: https://github.com/astral-sh/ruff :alt: Linter: ruff
.. image:: https://img.shields.io/badge/code%20style-ruff-000000.svg :target: https://github.com/astral-sh/ruff :alt: Code style: ruff
.. image:: https://img.shields.io/badge/types-Mypy-blue.svg :target: https://github.com/python/mypy :alt: Code style: Mypy
.. image:: https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg :alt: Hatch project :target: https://github.com/pypa/hatch
Python wrapper for:
| redis-rs <https://github.com/redis-rs/redis-rs>,
| bb8 <https://github.com/djc/bb8>,
| bb8-redis,
.. code-block:: shell
pip install redis-rs
.. code-block:: python
import asyncio import redis_rs
async def main(): async with redis_rs.create_client( "redis://redis-node001", "redis://redis-node002", max_size=1, cluster=True, features=[ "mock", # enable implementation for testing ], ) as x: info = await x.execute("INFO", "SERVER", encoding="info") print(info["redis_version"])
# parse value as json
print(await x.get("foo", encoding="json"))
print(await x.execute(b"HSET", "fooh", "a", b"asdfg"))
print(await x.fetch_int("HSET", "fooh", "b", 11234567890))
print(await x.fetch_int("HGET", "fooh", "b"))
print(await x.fetch_str("HGET", "fooh", "a"))
print(await x.fetch_dict("HGETALL", "fooh", encoding="utf-8"))
print(await x.hgetall("fooh", encoding="utf-8"))
print(await x.execute("CLUSTER", "NODES"))
print(await x.fetch_bytes("GET", "foo"))
print(await x.fetch_int("GET", "foo"))
print(await x.execute("HGETALL", "fooh"))
print(await x.execute("ZADD", "fooz", 1.5678, "b"))
print(await x.fetch_scores("ZRANGE", "fooz", 0, -1, "WITHSCORES"))
print(x.status())
stream = "redis-rs"
print("x.xadd", await x.xadd(stream, "*", {"a": "1234", "d": 4567}))
print("x.xadd", await x.xadd(stream, items={"a": "1234", "d": 4567}))
print("x.xadd", await x.xadd(stream, {"a": "1234", "d": 4567}))
print("x.xadd", await x.xadd(stream, "*", "a", "1234", "d", 4567))
print("x.xadd", await x.xadd(stream, "a", "1234", "d", 4567))
print("xadd", await x.fetch_str("XADD", stream, "*", "a", "1234", "d", 4567))
print("xread", await x.execute("XREAD", "STREAMS", stream, 0))
print("xread", await x.fetch_dict("XREAD", "STREAMS", stream, 0, encoding="int"))
print("x.xread", await x.xread({stream: 0}, encoding="int"))
print("x.xread", await x.xread(stream, id=0, encoding="int"))
print("x.xread", await x.xread(stream, stream))
asyncio.run(main())
.. code-block:: python
cargo fmt
cargo clippy
maturin develop
or use hatch envs:
.. code-block:: python
hatch run fmt
hatch run check
hatch run build
FAQs
Python wrapper for redis-rs
We found that redis-rs 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.