{"id":13504365,"url":"https://github.com/sdomino/scribble","last_synced_at":"2025-03-29T21:30:33.357Z","repository":{"id":31484847,"uuid":"35048983","full_name":"sdomino/scribble","owner":"sdomino","description":"A tiny Golang JSON database","archived":false,"fork":false,"pushed_at":"2023-07-17T15:10:34.000Z","size":50,"stargazers_count":262,"open_issues_count":5,"forks_count":75,"subscribers_count":14,"default_branch":"master","last_synced_at":"2024-11-01T01:33:34.430Z","etag":null,"topics":["database","go","golang","json"],"latest_commit_sha":null,"homepage":"","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/sdomino.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2015-05-04T17:30:47.000Z","updated_at":"2024-10-04T19:55:28.000Z","dependencies_parsed_at":"2024-01-13T19:20:14.076Z","dependency_job_id":"7da060d3-9df2-4c44-8fc6-aadf76aaf731","html_url":"https://github.com/sdomino/scribble","commit_stats":null,"previous_names":["sdomino/golang-scribble"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdomino%2Fscribble","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdomino%2Fscribble/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdomino%2Fscribble/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdomino%2Fscribble/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sdomino","download_url":"https://codeload.github.com/sdomino/scribble/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246249132,"owners_count":20747164,"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":["database","go","golang","json"],"created_at":"2024-08-01T00:00:35.449Z","updated_at":"2025-03-29T21:30:33.115Z","avatar_url":"https://github.com/sdomino.png","language":"Go","funding_links":[],"categories":["Databases","Go"],"sub_categories":["Key-Value Databases"],"readme":"Scribble [![GoDoc](https://godoc.org/github.com/boltdb/bolt?status.svg)](http://godoc.org/github.com/sdomino/scribble) [![Go Report Card](https://goreportcard.com/badge/github.com/sdomino/scribble)](https://goreportcard.com/report/github.com/sdomino/scribble)\n--------\n\nA tiny JSON database in Golang\n\n### Installation\n\nInstall using `go get github.com/sdomino/scribble`.\n\n### Usage\n\n```go\n// a new scribble driver, providing the directory where it will be writing to,\n// and a qualified logger if desired\ndb, err := scribble.New(dir, nil)\nif err != nil {\n  fmt.Println(\"Error\", err)\n}\n\n// Write a fish to the database\nfish := Fish{}\nif err := db.Write(\"fish\", \"onefish\", fish); err != nil {\n  fmt.Println(\"Error\", err)\n}\n\n// Read a fish from the database (passing fish by reference)\nonefish := Fish{}\nif err := db.Read(\"fish\", \"onefish\", \u0026onefish); err != nil {\n  fmt.Println(\"Error\", err)\n}\n\n// Read all fish from the database, unmarshaling the response.\nrecords, err := db.ReadAll(\"fish\")\nif err != nil {\n  fmt.Println(\"Error\", err)\n}\n\nfishies := []Fish{}\nfor _, f := range records {\n  fishFound := Fish{}\n  if err := json.Unmarshal([]byte(f), \u0026fishFound); err != nil {\n    fmt.Println(\"Error\", err)\n  }\n  fishies = append(fishies, fishFound)\n}\n\n// Delete a fish from the database\nif err := db.Delete(\"fish\", \"onefish\"); err != nil {\n  fmt.Println(\"Error\", err)\n}\n\n// Delete all fish from the database\nif err := db.Delete(\"fish\", \"\"); err != nil {\n  fmt.Println(\"Error\", err)\n}\n```\n\n## Documentation\n- Complete documentation is available on [godoc](http://godoc.org/github.com/sdomino/scribble).\n- Coverage Report is available on [gocover](https://gocover.io/github.com/sdomino/scribble)\n\n## Todo/Doing\n- Support for windows\n- Better support for concurrency\n- Better support for sub collections\n- More methods to allow different types of reads/writes\n- More tests (you can never have enough!)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsdomino%2Fscribble","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsdomino%2Fscribble","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsdomino%2Fscribble/lists"}