redis-py
redis-py copied to clipboard
Binary value in redis set
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.