{"id":19272281,"url":"https://github.com/sdslabs/kiwi","last_synced_at":"2025-08-17T19:40:26.609Z","repository":{"id":50141248,"uuid":"275816819","full_name":"sdslabs/kiwi","owner":"sdslabs","description":"A minimalistic in-memory key value store.","archived":false,"fork":false,"pushed_at":"2021-06-02T19:19:30.000Z","size":1353,"stargazers_count":158,"open_issues_count":3,"forks_count":4,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-04-01T16:12:43.859Z","etag":null,"topics":["go","in-memory","key-value"],"latest_commit_sha":null,"homepage":"https://kiwi.sdslabs.co","language":"Go","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/sdslabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-06-29T13:02:33.000Z","updated_at":"2025-01-02T08:27:54.000Z","dependencies_parsed_at":"2022-09-10T22:00:53.851Z","dependency_job_id":null,"html_url":"https://github.com/sdslabs/kiwi","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdslabs%2Fkiwi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdslabs%2Fkiwi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdslabs%2Fkiwi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdslabs%2Fkiwi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sdslabs","download_url":"https://codeload.github.com/sdslabs/kiwi/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250143870,"owners_count":21382103,"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":["go","in-memory","key-value"],"created_at":"2024-11-09T20:36:10.907Z","updated_at":"2025-04-21T22:31:14.854Z","avatar_url":"https://github.com/sdslabs.png","language":"Go","readme":"![Kiwi Logo](./docs/.vuepress/public/kiwi-logo.png)\n\n\u003e A minimalistic in-memory key value store.\n\n![Go CI](https://github.com/sdslabs/kiwi/workflows/Go%20CI/badge.svg) ![Docs CI](https://github.com/sdslabs/kiwi/workflows/Docs%20CI/badge.svg) ![Docs CD](https://github.com/sdslabs/kiwi/workflows/Docs%20CD/badge.svg) [![PkgGoDev](https://pkg.go.dev/badge/github.com/sdslabs/kiwi)](https://pkg.go.dev/github.com/sdslabs/kiwi)\n\n## Overview\n\nYou can think of Kiwi as thread safe global variables. This kind of library\ncomes in helpful when you need to manage state across your application which\ncan be mutated with multiple threads. Kiwi protects your keys with mutex locks\nso you don't have to.\n\nHead over to [kiwi.sdslabs.co](https://kiwi.sdslabs.co) for more details and\ndocumentation.\n\n## Installation\n\n\u003e Kiwi requires [Go](https://golang.org/) \u003e= 1.14\n\nKiwi can be integrated with your application just like any other go library.\n\n```sh\ngo get -u github.com/sdslabs/kiwi\n```\n\nNow you can import kiwi any where in your code.\n\n```go\nimport \"github.com/sdslabs/kiwi\"\n```\n\n## Basic usage\n\nCreate a store, add key and play with it. It's that easy!\n\n```go\nstore := stdkiwi.NewStore()\n\nif err := store.AddKey(\"my_string\", \"str\"); err != nil {\n  // handle error\n}\n\nmyString := store.Str(\"my_string\")\n\nif err := myString.Update(\"Hello, World!\"); err != nil {\n  // handle error\n}\n\nstr, err := myString.Get()\nif err != nil {\n  // handle error\n}\n\nfmt.Println(str) // Hello, World!\n```\n\nCheck out the [tutorial](https://kiwi.sdslabs.co/docs/tutorial-store.html) to\nlearn how to use Kiwi.\n\n## Benchmarks\n\nFollowing are the benchmarks comparing Kiwi with BuntDB on a MacBook Pro (8th gen\nIntel i5 2.4GHz processor, 8GB RAM).\n\n```\n❯ go test -bench=. -test.benchmem ./benchmark\ngoos: darwin\ngoarch: amd64\npkg: github.com/sdslabs/kiwi/benchmark\nBenchmarkBuntDB_Update-8        11777931                96.6 ns/op            48 B/op          1 allocs/op\nBenchmarkBuntDB_View-8          23310963                47.1 ns/op            48 B/op          1 allocs/op\nBenchmarkKiwi_Update-8          10356004               115 ns/op              48 B/op          3 allocs/op\nBenchmarkKiwi_Get-8             21910110                53.2 ns/op             0 B/op          0 allocs/op\nPASS\nok      github.com/sdslabs/kiwi/benchmark       6.216s\n```\n\nFollowing are the key differences due to which Kiwi is a little slow:\n\n1. BuntDB supports transactions, i.e., it locks the database once to apply all\n   the operations (and this is what is tested).\n1. Kiwi supports dynamic data-types, which means, allocation on heap at runtime\n   (`interface{}`) whereas BuntDB is statically typed.\n   \nThe above two differences are what makes Kiwi unique and suitable to use on\nmany occasions. Due to the aforementioned reasons, Kiwi can support typed values\nand not everything is just another \"string\".\n\nThere are places where we could improve more. Some performance issues also lie\nin the implementation of values. For example, when updating a string, not returning\nthe updated string avoids an extra allocation.\n\n## Contributing\n\nWe are always open for contributions. If you find any feature missing, or just\nwant to report a bug, feel free to open an issue and/or submit a pull request\nregarding the same.\n\nFor more information on contribution, check out our\n[docs](https://kiwi.sdslabs.co/docs/contribution-guide.html).\n\n## Contact\n\nIf you have a query regarding the product or just want to say hello then feel\nfree to visit [chat.sdslabs.co](https://chat.sdslabs.co) or drop a mail at\n[contact@sdslabs.co.in](mailto:contact@sdslabs.co.in)\n\n---\n\nMade by [SDSLabs](https://sdslabs.co)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsdslabs%2Fkiwi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsdslabs%2Fkiwi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsdslabs%2Fkiwi/lists"}