{"id":37088526,"url":"https://github.com/lucacasonato/scribble","last_synced_at":"2026-01-14T10:52:34.070Z","repository":{"id":57509007,"uuid":"147870815","full_name":"lucacasonato/scribble","owner":"lucacasonato","description":"A tiny Go GOB/JSON database","archived":false,"fork":true,"pushed_at":"2020-05-16T01:15:42.000Z","size":125,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-09T21:37:47.058Z","etag":null,"topics":["database","firestore","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"sdomino/scribble","license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lucacasonato.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":"2018-09-07T20:18:43.000Z","updated_at":"2021-10-10T19:41:51.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/lucacasonato/scribble","commit_stats":null,"previous_names":["creativeguy2013/scribble"],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/lucacasonato/scribble","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucacasonato%2Fscribble","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucacasonato%2Fscribble/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucacasonato%2Fscribble/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucacasonato%2Fscribble/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lucacasonato","download_url":"https://codeload.github.com/lucacasonato/scribble/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucacasonato%2Fscribble/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28417716,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:47:48.104Z","status":"ssl_error","status_checked_at":"2026-01-14T10:46:19.031Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["database","firestore","golang"],"created_at":"2026-01-14T10:52:33.544Z","updated_at":"2026-01-14T10:52:34.063Z","avatar_url":"https://github.com/lucacasonato.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## scribble\n\n[![GoDoc](https://godoc.org/github.com/lucacasonato/scribble/v4?status.svg)](http://godoc.org/github.com/lucacasonato/scribble/v4) [![Go Report Card](https://goreportcard.com/badge/github.com/lucacasonato/scribble/v4)](https://goreportcard.com/report/github.com/lucacasonato/scribble/v4) [![ci](https://github.com/lucacasonato/scribble/workflows/ci/badge.svg)](https://github.com/lucacasonato/scribble/actions)\n\nA tiny GOB (or JSON) based database in Golang - behaviour is very similar to Google Cloud Firestore\n\nDecode into reflect.Value is also supported (only in GOB mode).\n\n### Installation\n\nInstall using `go get github.com/lucacasonato/scribble/v4`.\n\n### Usage\n\n```go\n// a new scribble document, providing the directory where it will be writing to\ndb, err := scribble.New(dir)\nif err != nil {\n  fmt.Println(\"Error\", err)\n}\n\n// open a collection from the base document\nfishCollection := db.Collection(\"fish\")\n\n// open the document we want to write to\nonefishDocument := fishCollection.Document(\"onefish\")\n\n// write the data to the document\nfish := Fish{}\nif err := onefishDocument.Write(fish); err != nil {\n  fmt.Println(\"Error\", err)\n}\n\n// Read a data from the database\nonefish := Fish{}\nif err := onefishDocument.Read(\u0026onefish); err != nil {\n  fmt.Println(\"Error\", err)\n}\n\n// Read all fish from the database, returning an array of documents.\nrecords, err := fishCollection.GetAlDocuments()\nif err != nil {\n  fmt.Println(\"Error\", err)\n}\n\nfishies := []Fish{}\nfor _, f := range records {\n  fishFound := Fish{}\n  if err := f.Read(\u0026onefish); err != nil {\n    fmt.Println(\"Error\", err)\n  }\n  fishies = append(fishies, fishFound)\n}\n\n// Read a select view of the fish from the database, in this case everything from index 1 to 3\nrecords, err = fishCollection.GetDocuments(1, 3)\nif err != nil {\n\tfmt.Println(\"Error 5\", err)\n}\n// records has length 2\nfmt.Println(len(records))\n\nfishies = []Fish{}\nfor _, f := range records {\n\tfishFound := Fish{}\n\tif err := f.Read(\u0026fishFound); err != nil {\n\t\tfmt.Println(\"Error 6\", err)\n\t}\n\tfishies = append(fishies, fishFound)\n}\nfmt.Println(fishies)\n\n// Delete a fish from the database\nif err := onefishDocument.Delete(); err != nil {\n  fmt.Println(\"Error\", err)\n}\n\n// Delete all fish from the database\nif err := fishCollection.Delete(); err != nil {\n  fmt.Println(\"Error\", err)\n}\n\n// Make a subcollection in a document\nfishBabiesCollection := onefishDocument.Collection(\"babies\")\n\n// Make a make a document in a collection\nfirstbabyDocument := Document(\"firstbaby\")\n\n```\n\nIt is also possible to store a subcollection and data in the same document:\n\n```go\nstarFish := db.Collection(\"fish\").Document(\"starFish\")\n\nstarFish.Write(map[string]bool{\n  \"isAwesome\": true,\n})\n\nstarFish.Collection(\"properties\").Document(\"arms\").Write(6)\n```\n\n## JSON mode\n\nScribble also has a JSON mode that writes JSON files instead of GOB. In this mode there is no support for decoding into reflect.Value though.\n\n```go\n// a new scribble document, providing the directory where it will be writing to\ndb, err := scribble.NewJSON(dir)\nif err != nil {\n  fmt.Println(\"Error\", err)\n}\n```\n\n## Documentation\n\n- Complete documentation is available on [godoc](http://godoc.org/github.com/lucacasonato/scribble/v4).\n- Coverage Report is available on [gocover](https://gocover.io/github.com/lucacasonato/scribble/v4)\n\n## Todo/Doing\n\n- Support for windows\n- More methods to allow different types of reads/writes\n- More tests (you can never have enough!)\n- loading part into memory/caching\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucacasonato%2Fscribble","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucacasonato%2Fscribble","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucacasonato%2Fscribble/lists"}