{"id":21672570,"url":"https://github.com/redis-developer/basic-caching-demo-python","last_synced_at":"2025-05-08T21:44:23.594Z","repository":{"id":48289842,"uuid":"325533696","full_name":"redis-developer/basic-caching-demo-python","owner":"redis-developer","description":"This project shows a basic caching demo in Python","archived":false,"fork":false,"pushed_at":"2023-06-27T07:19:24.000Z","size":4229,"stargazers_count":3,"open_issues_count":3,"forks_count":2,"subscribers_count":5,"default_branch":"dev","last_synced_at":"2025-05-08T21:44:19.702Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/redis-developer.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-30T11:31:47.000Z","updated_at":"2023-11-18T16:24:11.000Z","dependencies_parsed_at":"2025-01-25T09:36:02.534Z","dependency_job_id":null,"html_url":"https://github.com/redis-developer/basic-caching-demo-python","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redis-developer%2Fbasic-caching-demo-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redis-developer%2Fbasic-caching-demo-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redis-developer%2Fbasic-caching-demo-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redis-developer%2Fbasic-caching-demo-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/redis-developer","download_url":"https://codeload.github.com/redis-developer/basic-caching-demo-python/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253154124,"owners_count":21862459,"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":[],"created_at":"2024-11-25T13:30:08.890Z","updated_at":"2025-05-08T21:44:23.575Z","avatar_url":"https://github.com/redis-developer.png","language":"Python","readme":"\n\u003cdiv style=\"position: absolute; top: 0px; right: 0px;\"\u003e\n    \u003cimg width=\"200\" height=\"200\" src=\"https://redislabs.com/wp-content/uploads/2020/12/RedisLabs_Illustration_HomepageHero_v4.svg\"\u003e\n\u003c/div\u003e\n\n\u003cdiv style=\"height: 150px\"\u003e\u003c/div\u003e\n\n# Django(python) Redis caching Example\n\nShow how the redis works with Django(Python).\n\n# Overview video\n\nHere's a short video that explains the project and how it uses Redis:\n\n[![Watch the video on YouTube](https://github.com/redis-developer/basic-caching-demo-python/raw/dev/docs/YTThumbnail.png)](https://youtube.com/watch?v=x4dwTM97tBM)\n\n# Redis rate-caching example front\n\n![How it works](https://github.com/redis-developer/basic-caching-demo-python/raw/dev/docs/screenshot001.png)\n\n# Redis rate-caching example (command line)\n\n![How it works](https://github.com/redis-developer/basic-caching-demo-python/raw/dev/docs/radis-ching.png)\n\n## Try it out\n\u003cp\u003e\n    \u003ca href=\"https://heroku.com/deploy\" target=\"_blank\"\u003e\n        \u003cimg src=\"https://www.herokucdn.com/deploy/button.svg\" alt=\"Deploy to Heorku\" width=\"200px\"/\u003e\n    \u003ca\u003e\n\u003c/p\u003e\n\u003cp\u003e\n    \u003ca href=\"https://vercel.com/new/git/external?repository-url=https://github.com/deliveryweb/redis-caching-python/tree/dev\u0026env=REDIS_HOST,REDIS_PORT,REDIS_PASSWORD\" target=\"_blank\"\u003e\n        \u003cimg src=\"https://vercel.com/button\" alt=\"Deploy with Vercel\" width=\"200px\" height=\"50px\"/\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\u003cp\u003e\n    \u003ca href=\"https://deploy.cloud.run/?dir=google-cloud-run\" target=\"_blank\"\u003e\n        \u003cimg src=\"https://deploy.cloud.run/button.svg\" alt=\"Run on Google Cloud\" width=\"200px\"/\u003e\n    \u003c/a\u003e\n    (See notes: How to run on Google Cloud)\n\u003c/p\u003e\n\n## How to run on Google Cloud\n\u003cp\u003e\n    After successful deployment, you need to manually enable the vpc connector as shown in the pictures:\n\u003c/p\u003e\n\n1. Open link google cloud console.\n![1 step](https://github.com/redis-developer/basic-caching-demo-python/raw/dev/docs/1.png)\n2. Click \"Edit and deploy new revision\" button.\n![2 step](https://github.com/redis-developer/basic-caching-demo-python/raw/dev/docs/2.png)\n3. Select vpc-connector and deploy application.\n![3 step](https://github.com/redis-developer/basic-caching-demo-python/raw/dev/docs/3.png)\n\n\u003ca href=\"https://github.com/GoogleCloudPlatform/cloud-run-button/issues/108#issuecomment-554572173\"\u003e\nProblem with unsupported the flags when deploying google cloud run button\n\u003c/a\u003e\n\n---\n\n## How to run it locally?\n\n### Run docker compose or install redis manually\nInstall docker (on mac: https://docs.docker.com/docker-for-mac/install/)\n\n```sh\ndocker network create global\ndocker-compose up -d --build\n```\n\n#### If you install redis manually open django-backend/configuration folder and copy `.env.example` to create `.env`. And provide the values for environment variables\n    - REDIS_HOST: Redis server host\n    - REDIS_PORT: Redis server port\n    - REDIS_DB: Redis server db index\n    - REDIS_PASSWORD: Redis server password\n\n#### Setup and run backend\nInstall python, pip and venv (on mac: https://installpython3.com/mac/)\n\nUse python version: 3.8\n``` sh\npython3 -m venv venv\nsource ./venv/bin/activate\npip3 install -r requirements.txt\npython3 manage.py collectstatic\ngunicorn configuration.asgi:application -b 127.0.0.1:5000 -k uvicorn.workers.UvicornWorker\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredis-developer%2Fbasic-caching-demo-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredis-developer%2Fbasic-caching-demo-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredis-developer%2Fbasic-caching-demo-python/lists"}