Skip to content

Instantly share code, notes, and snippets.

@onelharrison
Last active June 19, 2021 23:46
Show Gist options
  • Save onelharrison/2c70bfdbf6281b781f16d80cbcecf306 to your computer and use it in GitHub Desktop.
Save onelharrison/2c70bfdbf6281b781f16d80cbcecf306 to your computer and use it in GitHub Desktop.
import redis
r = redis.Redis(host='localhost', port=6379, db=1)
r.set('hello', 'world') # True
value = r.get('hello')
print(value) # b'world'
r.delete('hello') # True
print(r.get('hello')) # None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment