Skip to main content

Python wrapper for redis-rs and redis_cluster_async

Project description

redis-rs

Python wrapper for redis-rs and redis_cluster_async

Install

pip install redis-rs

Using

import asyncio
import redis_rs

x = redis_rs.create_client([
    "redis://redis-node001",
    "redis://redis-node002",
], 1)
async def main():
    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"))
    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"))


asyncio.run(main())

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

redis_rs-0.3.0.tar.gz (10.1 kB view hashes)

Uploaded Source

Built Distributions

redis_rs-0.3.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.0 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

redis_rs-0.3.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.0 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

redis_rs-0.3.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.0 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

redis_rs-0.3.0-cp311-none-win_amd64.whl (784.5 kB view hashes)

Uploaded CPython 3.11 Windows x86-64

redis_rs-0.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.0 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

redis_rs-0.3.0-cp311-cp311-macosx_10_9_x86_64.macosx_10_9_arm64.macosx_10_9_universal2.whl (2.0 MB view hashes)

Uploaded CPython 3.11 macOS 10.9+ ARM64 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64

redis_rs-0.3.0-cp310-none-win_amd64.whl (784.5 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

redis_rs-0.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.0 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

redis_rs-0.3.0-cp310-cp310-macosx_10_9_x86_64.macosx_10_9_arm64.macosx_10_9_universal2.whl (2.0 MB view hashes)

Uploaded CPython 3.10 macOS 10.9+ ARM64 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64

redis_rs-0.3.0-cp39-none-win_amd64.whl (784.9 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

redis_rs-0.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.0 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

redis_rs-0.3.0-cp39-cp39-macosx_10_9_x86_64.macosx_10_9_arm64.macosx_10_9_universal2.whl (2.0 MB view hashes)

Uploaded CPython 3.9 macOS 10.9+ ARM64 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64

redis_rs-0.3.0-cp38-none-win_amd64.whl (785.1 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

redis_rs-0.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.0 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

redis_rs-0.3.0-cp38-cp38-macosx_10_9_x86_64.macosx_10_9_arm64.macosx_10_9_universal2.whl (2.0 MB view hashes)

Uploaded CPython 3.8 macOS 10.9+ ARM64 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64

redis_rs-0.3.0-cp37-none-win_amd64.whl (785.0 kB view hashes)

Uploaded CPython 3.7 Windows x86-64

redis_rs-0.3.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.0 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

redis_rs-0.3.0-cp37-cp37m-macosx_10_9_x86_64.macosx_10_9_arm64.macosx_10_9_universal2.whl (2.0 MB view hashes)

Uploaded CPython 3.7m macOS 10.9+ ARM64 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page