{"id":991,"url":"https://github.com/hemantasapkota/SwiftStore","last_synced_at":"2025-08-06T13:32:21.621Z","repository":{"id":31443743,"uuid":"35007443","full_name":"hemantasapkota/SwiftStore","owner":"hemantasapkota","description":"Key-Value store for Swift backed by LevelDB","archived":false,"fork":false,"pushed_at":"2022-01-22T01:31:18.000Z","size":5905,"stargazers_count":123,"open_issues_count":4,"forks_count":35,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-12-01T08:11:36.662Z","etag":null,"topics":["c-plus-plus","carthage","key-value","leveldb","swift"],"latest_commit_sha":null,"homepage":"https://medium.com/@lexsapkota/swiftstore-a-key-value-store-for-swift-backed-by-leveldb-562c8ebd1286","language":"C++","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/hemantasapkota.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":"2015-05-04T01:18:31.000Z","updated_at":"2024-11-02T09:24:01.000Z","dependencies_parsed_at":"2022-09-05T09:40:54.956Z","dependency_job_id":null,"html_url":"https://github.com/hemantasapkota/SwiftStore","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hemantasapkota%2FSwiftStore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hemantasapkota%2FSwiftStore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hemantasapkota%2FSwiftStore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hemantasapkota%2FSwiftStore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hemantasapkota","download_url":"https://codeload.github.com/hemantasapkota/SwiftStore/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228905462,"owners_count":17989771,"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":["c-plus-plus","carthage","key-value","leveldb","swift"],"created_at":"2024-01-05T20:15:36.448Z","updated_at":"2025-08-06T13:32:21.607Z","avatar_url":"https://github.com/hemantasapkota.png","language":"C++","funding_links":[],"categories":["Database","Libs","Data and Storage","Data Management [🔝](#readme)"],"sub_categories":["Getting Started","Data Management","Other free courses","Linter"],"readme":"[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n\n### SwiftStore ###\nKey/Value store for Swift backed by LevelDB.\n\n### Usage ###\n\n#### Create instances of store ####\n\n```swift\nimport SwiftStore\n\n// Create a store.\nlet store = SwiftStore(storeName: \"db\")\n\n// Write value\nstore[\"username\"] = \"jondoe\"\nstore[\"auth-token\"] = \"cdfsd1231sdf12321\"\n\n// Get value\nlet username = store[\"username\"]!\nif !username.isEmpty {\n  println(username)\n}\n\nlet authToken = store[\"auth-token\"]!\nif !authToken.isEmpty {\n  println(authToken)\n}\n```\n\n#### As Singleton ####\n\n```swift\nclass DB : SwiftStore {\n    /* Shared Instance */\n    static let store = DB()\n\n    init() {\n        super.init(storeName: \"db\")\n    }\n\n    override func close() {\n        super.close()\n    }\n}\n\nDB.store[\"username\"] = \"jondoe\"\nDB.store[\"auth-token\"] = \"1231sdfjl123\"\n```\n\n### Installation ###\n\n#### Carthage ####\n* Add ```github \"hemantasapkota/SwiftStore\"``` to your ```cartfile```\n* Execute ```carthage update```\n\n#### Manual Installation ####\n* Clone this repo: ```git clone https://github.com/hemantasapkota/SwiftStore/```\n* Copy ```SwiftStore.xcodeproj``` to your project.\n* Add ```SwiftStore.framework``` to the **Embedded Binaries** secion on the **General** tab of your main target.\n\n### LevelDB Update ###\n\nThis project has been updated to use the latest version of LevelDB from Google's official repository. The integration has been modernized to use XCFramework for better multi-architecture support. See [LEVELDB_UPDATE.md](LEVELDB_UPDATE.md) for details.\n\n### License ###\nThe MIT License (MIT)\n\nCopyright (c) 2022 Hemanta Sapkota\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhemantasapkota%2FSwiftStore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhemantasapkota%2FSwiftStore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhemantasapkota%2FSwiftStore/lists"}