Skip to content

Instantly share code, notes, and snippets.

@sanju2
Last active July 1, 2023 09:48
Show Gist options
  • Save sanju2/5ec2764cf73b247c99b30d37a2909ee5 to your computer and use it in GitHub Desktop.
Save sanju2/5ec2764cf73b247c99b30d37a2909ee5 to your computer and use it in GitHub Desktop.
ElastiCache Demo
import redis
cache = redis.StrictRedis(host='Redis-Primary-Endpoint', port=6379, db=0)
cache.set('my-cached-key', 'my-cached-value')
value = cache.get('my-cached-key')
decoded_value = value.decode('utf-8')
print(decoded_value)
#!/bin/bash
curl -O https://bootstrap.pypa.io/get-pip.py
python3 get-pip.py --user
pip install redis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment