FirstRedisPython
A tiny python web application based on Flask to set, get, expire, delete keys of Redis database easily with direct link at the browser.
Install / Use
/learn @BaseMax/FirstRedisPythonREADME
First Redis Python (CRUD)
A tiny python web application based on Flask to set, get, expire, delete keys of Redis database easily with direct link at the browser.
Using
flask run
Routes
Set a new key with value:
http://127.0.0.1:5000/set/name/Max
Update the value of a key:
http://127.0.0.1:5000/update/name/NewMax
Get value of a key:
http://127.0.0.1:5000/get/name
Set value to a key with expire time:
http://127.0.0.1:5000/set/name/Max/5
Set expire time on a key:
http://127.0.0.1:5000/expire/name/10
Delete a key:
http://127.0.0.1:5000/delete/name
Note: You do not have to put / at the last of the URL, this is not allowed.
References
- https://redis.io/commands/expire
- https://stackoverflow.com/questions/36000981/storing-keys-with-prefix-that-expire-in-redis
- https://redis-py.readthedocs.io/en/stable/
- https://realpython.com/python-redis/
- https://stackoverflow.com/questions/36000981/storing-keys-with-prefix-that-expire-in-redis
- https://redis-py.readthedocs.io/en/stable/_modules/redis/client.html#Redis.expire
- https://medium.com/@ashok.tankala/how-to-write-your-own-redis-key-expire-listener-in-python-53e531a97f36
© Copyright Max Base, 2021
Related Skills
claude-opus-4-5-migration
108.0kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
model-usage
347.2kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
feishu-drive
347.2k|
things-mac
347.2kManage Things 3 via the `things` CLI on macOS (add/update projects+todos via URL scheme; read/search/list from the local Things database)
