{"id":18182971,"url":"https://github.com/lpil/storail","last_synced_at":"2026-06-30T06:30:19.041Z","repository":{"id":259067344,"uuid":"875256640","full_name":"lpil/storail","owner":"lpil","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-22T19:42:58.000Z","size":19,"stargazers_count":18,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-16T01:00:01.051Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Gleam","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lpil.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-10-19T13:59:13.000Z","updated_at":"2025-02-11T12:41:29.000Z","dependencies_parsed_at":"2024-10-22T22:37:54.321Z","dependency_job_id":null,"html_url":"https://github.com/lpil/storail","commit_stats":null,"previous_names":["lpil/storail"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpil%2Fstorail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpil%2Fstorail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpil%2Fstorail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpil%2Fstorail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lpil","download_url":"https://codeload.github.com/lpil/storail/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240364364,"owners_count":19789760,"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-11-02T20:00:25.120Z","updated_at":"2026-06-30T06:30:18.972Z","avatar_url":"https://github.com/lpil.png","language":"Gleam","funding_links":[],"categories":["Packages"],"sub_categories":["Databases"],"readme":"# Stóráil\n\nA simple on-disc JSON based data store.\n\n[![Package Version](https://img.shields.io/hexpm/v/storail)](https://hex.pm/packages/storail)\n[![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://hexdocs.pm/storail/)\n\nA super basic on-disc data store that uses JSON files to persist data.\n\nIt doesn't have transactions, MVCC, or anything like that. It's just\nwriting files to disc. Useful for tiny little projects, and for fun.\n\n```sh\ngleam add storail@3\n```\n```gleam\nimport storail\nimport my_app\n\npub fn main() {\n  // Construct config to specify where your data is written to.\n  let config = storail.Config(\n    data_directory: \"/data\",\n    temporary_directory: \"/tmp/storail\",\n  )\n\n  // Define a collection for a data type in your application.\n  let cats = storail.Collection(\n    name: \"cats\", \n    to_json: my_app.cat_to_json,\n    decoder: my_app.cat_decoder(),\n    config:,\n  )\n\n  // A key points to a specific object within the collection, which \n  // may or may not yet exist.\n  let key = storail.key(collection, \"nubi\")\n\n  // Write some data\n  let assert Ok(Nil) = storail.write(key, my_app.Cat(\"Nubi\", 5))\n\n  // Read some data\n  storail.read(key)\n  // -\u003e Ok(my_app.Cat(\"Nubi\", 5))\n}\n```\n\nFurther documentation can be found at \u003chttps://hexdocs.pm/storail\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flpil%2Fstorail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flpil%2Fstorail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flpil%2Fstorail/lists"}