{"id":23727784,"url":"https://github.com/graphtylove/redis_client_python","last_synced_at":"2026-05-02T01:34:44.886Z","repository":{"id":59145117,"uuid":"532836232","full_name":"GraphtyLove/redis_client_python","owner":"GraphtyLove","description":"Simple Redis client for python","archived":false,"fork":false,"pushed_at":"2022-09-05T11:26:04.000Z","size":18,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-31T23:35:01.136Z","etag":null,"topics":["cache","caching","client","package","python","python-package","python3","redis"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/redis-client/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GraphtyLove.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-09-05T09:43:53.000Z","updated_at":"2022-09-05T11:26:25.000Z","dependencies_parsed_at":"2022-09-13T01:25:37.777Z","dependency_job_id":null,"html_url":"https://github.com/GraphtyLove/redis_client_python","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GraphtyLove%2Fredis_client_python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GraphtyLove%2Fredis_client_python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GraphtyLove%2Fredis_client_python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GraphtyLove%2Fredis_client_python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GraphtyLove","download_url":"https://codeload.github.com/GraphtyLove/redis_client_python/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239825002,"owners_count":19703199,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cache","caching","client","package","python","python-package","python3","redis"],"created_at":"2024-12-31T01:30:18.476Z","updated_at":"2026-02-16T22:30:16.417Z","avatar_url":"https://github.com/GraphtyLove.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Redis client\n\nSimple Redis client for python.\n\nIt has been made to simplify working with Redis in python.\n\n## Usage\nInstantiate `Cache()`, give the Redis `host`, `port` and `db`.\n\nThen you can get a cached entry with `Cache.get_data_from_cache()` and add an entry to Redis with `Cache.save_data_to_cache()`\n\n**⚠️The data send to cache NEEDS TO BE A DICTIONARY! ⚠️**\n\n### Code example\n\n```python\nfrom redis_client.client import Cache\nfrom time import sleep\nfrom tpying import Dict\n\n# Redis Configuration\ncache = Cache(redis_host=\"localhost\", redis_port=6379, redis_db=0, log_level=\"INFO\")\n\ndef username_expander(username: str) -\u003e Dict[str, str]:\n    \"\"\"Example of a function that require caching.\"\"\"\n    \n    # Key that will be use to retrieve cached data\n    # Note that I include the parameter 'username' in the key to make sure we only cache unique value.\n    key = f\"username_expander:{username}\"\n    \n    # Check if the data is already caches\n    cached_data = cache.get_data_from_cache(key)\n    \n    # Return it if yes\n    if cached_data:\n        return cached_data\n    \n    data = {\"expanded_username\": f\"{username}_123\"}\n    \n    # Save data to cache with an expiration time of 12 hours\n    cache.save_data_to_cache(key, data, expiration_in_hours=12)\n    \n    return data\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraphtylove%2Fredis_client_python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgraphtylove%2Fredis_client_python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraphtylove%2Fredis_client_python/lists"}