{"id":13463033,"url":"https://github.com/couchrest/couchrest","last_synced_at":"2025-03-25T06:31:29.518Z","repository":{"id":622314,"uuid":"261960","full_name":"couchrest/couchrest","owner":"couchrest","description":"A minimalist CouchDB client in ruby","archived":false,"fork":false,"pushed_at":"2021-11-13T22:11:11.000Z","size":3263,"stargazers_count":475,"open_issues_count":22,"forks_count":133,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-09T12:33:28.747Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://groups.google.com/group/couchrest","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/couchrest.png","metadata":{"files":{"readme":"README.md","changelog":"history.txt","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":"2009-07-27T22:04:22.000Z","updated_at":"2025-03-04T05:09:13.000Z","dependencies_parsed_at":"2022-08-16T10:31:19.753Z","dependency_job_id":null,"html_url":"https://github.com/couchrest/couchrest","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/couchrest%2Fcouchrest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/couchrest%2Fcouchrest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/couchrest%2Fcouchrest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/couchrest%2Fcouchrest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/couchrest","download_url":"https://codeload.github.com/couchrest/couchrest/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242900054,"owners_count":20203704,"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-07-31T13:00:44.545Z","updated_at":"2025-03-25T06:31:29.048Z","avatar_url":"https://github.com/couchrest.png","language":"Ruby","readme":"# CouchRest: CouchDB, close to the metal\n\n[![Build Status](https://travis-ci.org/couchrest/couchrest.png)](https://travis-ci.org/couchrest/couchrest)\n\nCouchRest wraps CouchDB's HTTP API using persistent connections with the [HTTPClient gem](https://github.com/nahi/httpclient) managing servers, databases, and JSON document serialization using CouchDB's API endpoints so you don't have to.\n\nCouchRest is designed to provide a simple base for application and framework-specific object oriented APIs. CouchRest is Object-Mapper agnostic, the JSON objects provided by CouchDB are parsed and returned as Document objects providing a simple Hash-like interface.\n\nFor more complete modelling support based on ActiveModel, please checkout CouchRest's sister project: [CouchRest Model](https://github.com/couchrest/couchrest_model).\n\n## CouchDB Version\n\nTested on latest stable release (1.6.X), but should work on older versions above 1.0. Also known to work on [Cloudant](http://cloudant.com).\n\n### Performance with Persistent Connections\n\nWhen connecting to a CouchDB 1.X server from a Linux system, you may see a big drop in performance due to the change in library to HTTPClient using persistent connections. The issue is caused by the NOWAIT TCP configuration option causing sockets to hang as they wait for more information. The fix is a [simple configuration change](http://docs.couchdb.org/en/1.6.1/maintenance/performance.html#network):\n\n```bash\ncurl -X PUT \"http://localhost:5984/_config/httpd/socket_options\" -d '\"[{nodelay, true}]\"'\n```\n\n## Install\n\n    $ sudo gem install couchrest\n\n## Basic Usage\n\nGetting started with CouchRest is easy. You can send requests directly to a URL using a [RestClient](https://github.com/rest-client/rest-client)-like interface:\n\n```ruby\nCouchRest.put(\"http://localhost:5984/testdb/doc\", 'name' =\u003e 'test', 'date' =\u003e Date.current)\n```\n\nOr use the lean server and database orientated API to take advantage of persistent and reusable connections:\n\n```ruby\nserver = CouchRest.new           # assumes localhost by default!\ndb = server.database!('testdb')  # create db if it doesn't already exist\n\n# Save a document, with ID\ndb.save_doc('_id' =\u003e 'doc', 'name' =\u003e 'test', 'date' =\u003e Date.current)\n\n# Fetch doc\ndoc = db.get('doc')\ndoc.inspect # #\u003cCouchRest::Document _id: \"doc\", _rev: \"1-defa304b36f9b3ef3ed606cc45d02fe2\", name: \"test\", date: \"2015-07-13\"\u003e\n\n# Delete\ndb.delete_doc(doc)\n```\n\n## Running the Specs\n\nThe most complete documentation is the spec/ directory. To validate your\nCouchRest install, from the project root directory use bundler to install \nthe dependencies and then run the tests:\n\n    $ bundle install\n    $ bundle exec rake\n\nTo date, the couchrest specs have been shown to run on:\n\n * MRI Ruby 1.9.3 and later\n * JRuby 1.7.19\n * Rubinius 2.5.7\n\nSee the [Travis Build status](https://travis-ci.org/couchrest/couchrest) for more details.\n\n## Docs\n\nChanges history: [history.txt](./history.txt)\n\nAPI: [http://rdoc.info/projects/couchrest/couchrest](http://rdoc.info/projects/couchrest/couchrest)\n\nCheck the wiki for documentation and examples [http://wiki.github.com/couchrest/couchrest](http://wiki.github.com/couchrest/couchrest)\n\n## Contact\n\nPlease post bugs, suggestions and patches to the bug tracker at [http://github.com/couchrest/couchrest/issues](http://github.com/couchrest/couchrest/issues).\n\nFollow us on Twitter: [http://twitter.com/couchrest](http://twitter.com/couchrest)\n\nAlso, check [https://twitter.com/search?q=couchrest](https://twitter.com/search?q=couchrest)\n\n","funding_links":[],"categories":["Data Persistence","Ruby","others","Libraries and Clients"],"sub_categories":["CouchDB Clients"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcouchrest%2Fcouchrest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcouchrest%2Fcouchrest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcouchrest%2Fcouchrest/lists"}