Skip to content

Instantly share code, notes, and snippets.

@ashutoshkarna03
Created January 6, 2020 18:29
Show Gist options
  • Save ashutoshkarna03/2eba2cd2048933d6cf8c698c08c48b4e to your computer and use it in GitHub Desktop.
Save ashutoshkarna03/2eba2cd2048933d6cf8c698c08c48b4e to your computer and use it in GitHub Desktop.
import redis
# connect to redis
client = redis.Redis(host='localhost', port=6379)
# set a key
client.set('test-key', 'test-value')
# get a value
value = client.get('test-key')
print(value)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment