{"id":22291662,"url":"https://github.com/voultapher/okofdb","last_synced_at":"2025-07-28T23:32:29.595Z","repository":{"id":57648593,"uuid":"125613153","full_name":"Voultapher/okofdb","owner":"Voultapher","description":"One Key One File Database https://crates.io/crates/okofdb","archived":false,"fork":false,"pushed_at":"2020-06-06T11:17:25.000Z","size":16,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-01T01:53:54.012Z","etag":null,"topics":["database","key-value","rust","simple"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/Voultapher.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-17T09:09:23.000Z","updated_at":"2020-06-06T11:17:27.000Z","dependencies_parsed_at":"2022-09-13T22:01:32.061Z","dependency_job_id":null,"html_url":"https://github.com/Voultapher/okofdb","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Voultapher%2Fokofdb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Voultapher%2Fokofdb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Voultapher%2Fokofdb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Voultapher%2Fokofdb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Voultapher","download_url":"https://codeload.github.com/Voultapher/okofdb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227962202,"owners_count":17847915,"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","key-value","rust","simple"],"created_at":"2024-12-03T17:17:54.589Z","updated_at":"2024-12-03T17:17:55.426Z","avatar_url":"https://github.com/Voultapher.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# One Key One File Database\n\n`okofdb` is a [key value database](https://en.wikipedia.org/wiki/Key-value_database).\n\n### Design Goals:\n\n* Very efficient data storage\n* Small memory footprint\n* Minimal interface\n* ACD | Atomicity Consistency Durability\n* Isolation only for multiple readers, not multiple writers\n* No application state\n\nIf you need multiple concurrent writers,\nsynchronization is your applications responsibility.\nDepending on your use case, possibly a very stupid way of storing your data.\n\nAbove an implementation defined value size threshold it will use\n[snap](https://crates.io/crates/snap) to compress the value.\n\n## Example\n\n```rust\nuse std::path::Path;\nuse okofdb::okof;\n\nfn main() -\u003e Result\u003c(), okof::Error\u003e {\n    let path = Path::new(\"db-dir\");\n    let key = \"plants\";\n    let value = b\"Cucumber:Fluxroot\";\n\n    okof::write(\u0026path, \u0026key, value)?;\n    assert_eq!(okof::read(\u0026path, \u0026key)?, value);\n\n    let other_value = String::from(\"Ironwood\");\n    okof::write(\u0026path, \u0026key, other_value.as_bytes())?;\n    assert_eq!(okof::read(\u0026path, \u0026key)?, other_value.as_bytes());\n\n    okof::delete(\u0026path, \u0026key)?;\n    match okof::read(\u0026path, \u0026key) {\n        Err(okof::Error::NotFound) =\u003e Ok(()),\n        _ =\u003e { panic!(); },\n    }\n}\n```\n\n## Getting Started\n\nAdd [this crate](https://crates.io/crates/okofdb) to your project.\n\n### Prerequisites\n\nRust toolchain and cargo.\n\nNote, some filesystems might struggle with a lot of files in a single directory,\nwhich will happen if there are many keys.\n\nOne key == One File.\n\n### Installing\n\n[See cargo docs](https://doc.rust-lang.org/cargo/guide/).\n\n## Running the tests\n\n```\ncargo test\n```\n\n## Deployment\n\nTBD\n\n## Contributing\n\nPlease read [CONTRIBUTING.md](CONTRIBUTING.md)\nfor details on our code of conduct, and the process for submitting pull requests to us.\n\n## Versioning\n\nWe use [SemVer](http://semver.org/) for versioning. For the versions available,\nsee the [tags on this repository](https://github.com/Voultapher/okofdb/tags).\n\n## Authors\n\n* **Lukas Bergdoll** - *Initial work* - [Voultapher](https://github.com/Voultapher)\n\nSee also the list of [contributors](https://github.com/Voultapher/okofdb/contributors)\nwho participated in this project.\n\n## License\n\nThis project is licensed under the Apache License, Version 2.0 -\nsee the [LICENSE.md](LICENSE.md) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoultapher%2Fokofdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvoultapher%2Fokofdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoultapher%2Fokofdb/lists"}