{"id":15032778,"url":"https://github.com/ruby/sdbm","last_synced_at":"2025-04-07T19:16:24.660Z","repository":{"id":19180500,"uuid":"86426811","full_name":"ruby/sdbm","owner":"ruby","description":"Provides a simple file-based key-value store with String keys and values.","archived":false,"fork":false,"pushed_at":"2024-05-06T04:02:23.000Z","size":148,"stargazers_count":22,"open_issues_count":1,"forks_count":5,"subscribers_count":30,"default_branch":"master","last_synced_at":"2025-03-31T16:15:22.039Z","etag":null,"topics":["ruby","sdbm"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ruby.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2017-03-28T07:09:19.000Z","updated_at":"2024-08-07T14:51:04.000Z","dependencies_parsed_at":"2024-05-05T17:26:11.862Z","dependency_job_id":"a9104799-10d5-41d7-893d-1bc01078cd28","html_url":"https://github.com/ruby/sdbm","commit_stats":{"total_commits":124,"total_committers":22,"mean_commits":5.636363636363637,"dds":0.7580645161290323,"last_synced_commit":"34b3d199d484cef3ac1a69c91ebca817958e69a7"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Fsdbm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Fsdbm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Fsdbm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Fsdbm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ruby","download_url":"https://codeload.github.com/ruby/sdbm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247713258,"owners_count":20983683,"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":["ruby","sdbm"],"created_at":"2024-09-24T20:19:26.018Z","updated_at":"2025-04-07T19:16:24.622Z","avatar_url":"https://github.com/ruby.png","language":"C","readme":"# SDBM\n\n[![test](https://github.com/ruby/sdbm/actions/workflows/test.yml/badge.svg)](https://github.com/ruby/sdbm/actions/workflows/test.yml)\n\nSDBM provides a simple file-based key-value store, which can only store  String keys and values.\n\nNote that Ruby comes with the source code for SDBM, while the DBM and GDBM  standard libraries rely on external libraries and headers.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'sdbm'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install sdbm\n\n## Usage\n\n### Insert values:\n\n```ruby\nrequire 'sdbm'\n\nSDBM.open 'my_database' do |db|\n  db['apple'] = 'fruit'\n  db['pear'] = 'fruit'\n  db['carrot'] = 'vegetable'\n  db['tomato'] = 'vegetable'\nend\n```\n\n### Bulk update:\n\n```ruby\nrequire 'sdbm'\n\nSDBM.open 'my_database' do |db|\n  db.update('peach' =\u003e 'fruit', 'tomato' =\u003e 'fruit')\nend\n```\n\n### Retrieve values:\n\n```ruby\nrequire 'sdbm'\n\nSDBM.open 'my_database' do |db|\n  db.each do |key, value|\n puts \"Key: #{key}, Value: #{value}\"\n  end\nend\n```\n\n### Outputs:\n\n```ruby\nKey: apple, Value: fruit\nKey: pear, Value: fruit\nKey: carrot, Value: vegetable\nKey: peach, Value: fruit\nKey: tomato, Value: fruit\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/ruby/sdbm.\n\n\n## License\n\nThe gem is available as open source under the terms of the [2-Clause BSD License](https://opensource.org/licenses/BSD-2-Clause).\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruby%2Fsdbm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fruby%2Fsdbm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruby%2Fsdbm/lists"}