Skip to content

Instantly share code, notes, and snippets.

@sagar290
Last active November 14, 2023 17:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sagar290/969005dfde07471bca0ddacc135a23a2 to your computer and use it in GitHub Desktop.
Save sagar290/969005dfde07471bca0ddacc135a23a2 to your computer and use it in GitHub Desktop.
import redis
source = redis.Redis(host='localhost', port=63790, db=1)
#destination = redis.Redis(host='localhost', port=63790, db=5)
keys = source.keys('auth-service:*')
print("key,vallue,ttl")
for key in keys:
#destination.set(key, source.get(key), source.ttl(key))
print('%,%,%', key, source.get(key), source.ttl(key))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment