redis-py icon indicating copy to clipboard operation
redis-py copied to clipboard

Binary value in redis set

Open atompie opened this issue 1 year ago • 0 comments

I am attempting to replace the standard Redis client with Upstash Redis. However, I am unsure if this is feasible because the standard Redis client allows binary data as input and leaves serialization and deserialization to the developer. Is there a way to achieve Redis-compatible behavior with Upstash Redis that can handle and store arbitrary binary data?

v = msgpack.packb("some data")
print(redis.set("8504a", v , ex=1800))
value = redis.get("8504")
print(value)

I know I could convert it to v to string but it would take months to redo the app and will break the backward compatibility with redis, which we would like to keep.

atompie avatar Dec 06 '24 06:12 atompie