{"id":25024754,"url":"https://github.com/rebaz94/upstash-redis","last_synced_at":"2025-04-13T10:34:05.177Z","repository":{"id":45460910,"uuid":"510469219","full_name":"rebaz94/upstash-redis","owner":"rebaz94","description":"HTTP based Redis Client for Serverless and Edge Functions","archived":false,"fork":false,"pushed_at":"2023-10-02T19:17:03.000Z","size":301,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T10:56:18.388Z","etag":null,"topics":["dart","redis","serverless","upstash"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/upstash_redis","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rebaz94.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-07-04T18:45:04.000Z","updated_at":"2025-03-11T09:20:42.000Z","dependencies_parsed_at":"2023-10-03T00:03:50.144Z","dependency_job_id":null,"html_url":"https://github.com/rebaz94/upstash-redis","commit_stats":{"total_commits":187,"total_committers":1,"mean_commits":187.0,"dds":0.0,"last_synced_commit":"6bc903a94cca86b38f2190da306f79d42bfdc244"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rebaz94%2Fupstash-redis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rebaz94%2Fupstash-redis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rebaz94%2Fupstash-redis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rebaz94%2Fupstash-redis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rebaz94","download_url":"https://codeload.github.com/rebaz94/upstash-redis/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248698792,"owners_count":21147525,"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":["dart","redis","serverless","upstash"],"created_at":"2025-02-05T16:19:49.401Z","updated_at":"2025-04-13T10:34:05.154Z","avatar_url":"https://github.com/rebaz94.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Upstash Redis\n\n`@upstash/redis` is an HTTP/REST based Redis client for dart, built on top\nof [Upstash REST API](https://docs.upstash.com/features/restapi).\n\nThis Dart package mirrors the design of official upstash-redis typescript library. Find the documentation [here](https://github.com/upstash/upstash-redis).\n\nIt is the only connectionless (HTTP based) Redis client and designed for:\n\n- Serverless functions (AWS Lambda ...)\n- Cloudflare Workers \n- Fastly Compute@Edge \n- Client side web/mobile applications\n- WebAssembly\n- and other environments where HTTP is preferred over TCP.\n\nSee\n[the list of APIs](https://docs.upstash.com/features/restapi#rest---redis-api-compatibility)\nsupported.\n\n## Quick Start\n\n### Install\n\n```bash\ndart pub add upstash_redis\n```\n\n### Create database\n\nCreate a new redis database on [upstash](https://console.upstash.com/)\n\n## Basic Usage:\n\n```dart\nimport 'package:upstash_redis/upstash_redis.dart';\n\nvoid main() async {\n  const redis = new Redis(\n    url: '\u003cUPSTASH_REDIS_REST_URL\u003e',\n    token: '\u003cUPSTASH_REDIS_REST_TOKEN\u003e',\n  );\n\n  // string\n  await redis.set('key', 'value');\n  final value1 = await redis.get('key');\n  print(value1);\n\n  await redis.set('key2', 'value2', ex: 1);\n\n  // sorted set\n  await redis.zadd('scores', score: 1, member: 'team1');\n  final value2 = await redis.zrange('scores', 0, 100);\n  print(value1);\n\n  // list\n  await redis.lpush('elements', ['magnesium']);\n  final value3 = await redis.lrange('elements', 0, 100);\n  print(value3);\n\n  // hash\n  await redis.hset('people', {'name': 'joe'});\n  final value4 = await redis.hget('people', 'name');\n  print(value4);\n\n  // sets\n  await redis.sadd('animals', ['cat']);\n  final value5 = await redis.spop\u003cString\u003e('animals', 1);\n  print(value5);\n  \n  // json\n  print(await redis.json.set('json', $, {'counter': 1, 'hello': '', 'name': 're'}));\n  print(await redis.json.numincrby('json', r'$.counter', 1));\n  print(await redis.json.set('json', r'$.hello', '\"world\"'));\n  print(await redis.json.strappend('json', r'$.name', '\"baz\"'));\n  print(await redis.json.strlen('json', r'$.name'));\n  print(await redis.json.get('json', [r'$.name']));\n}\n```\n\n## Contributing\n\n- Fork the repo on [GitHub](https://github.com/rebaz94/upstash-redis)\n- Clone the project to your own machine\n- Commit changes to your own branch\n- Push your work back up to your fork\n- Submit a Pull request so that we can review your changes and merge\n\n## License\n\nThis repo is licenced under MIT.\n\n## Credits\n\n- https://github.com/upstash/upstash-redis/","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frebaz94%2Fupstash-redis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frebaz94%2Fupstash-redis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frebaz94%2Fupstash-redis/lists"}