{"id":19856631,"url":"https://github.com/fgmacedo/soonerdb","last_synced_at":"2025-05-02T01:31:40.474Z","repository":{"id":57469335,"uuid":"321529968","full_name":"fgmacedo/soonerdb","owner":"fgmacedo","description":"A LSM-Tree key/value database in Python.","archived":false,"fork":false,"pushed_at":"2020-12-18T17:17:35.000Z","size":64,"stargazers_count":18,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-04-14T07:12:10.168Z","etag":null,"topics":["key-value","key-value-database","key-value-store","log-structured-merge-tree","lsm-tree","memtable","python","sstable","wal","write-ahead-log"],"latest_commit_sha":null,"homepage":"","language":"Python","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/fgmacedo.png","metadata":{"files":{"readme":"README.rst","changelog":"HISTORY.rst","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-15T02:27:32.000Z","updated_at":"2023-10-13T14:25:05.000Z","dependencies_parsed_at":"2022-09-19T09:30:39.156Z","dependency_job_id":null,"html_url":"https://github.com/fgmacedo/soonerdb","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgmacedo%2Fsoonerdb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgmacedo%2Fsoonerdb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgmacedo%2Fsoonerdb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgmacedo%2Fsoonerdb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fgmacedo","download_url":"https://codeload.github.com/fgmacedo/soonerdb/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251969433,"owners_count":21673203,"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":["key-value","key-value-database","key-value-store","log-structured-merge-tree","lsm-tree","memtable","python","sstable","wal","write-ahead-log"],"created_at":"2024-11-12T14:16:08.952Z","updated_at":"2025-05-02T01:31:40.164Z","avatar_url":"https://github.com/fgmacedo.png","language":"Python","readme":"========\nsoonerdb\n========\n\n\n.. image:: https://img.shields.io/pypi/v/soonerdb.svg\n        :target: https://pypi.python.org/pypi/soonerdb\n\n.. image:: https://img.shields.io/travis/fgmacedo/soonerdb.svg\n        :target: https://travis-ci.com/fgmacedo/soonerdb\n\n.. image:: https://codecov.io/gh/fgmacedo/soonerdb/branch/main/graph/badge.svg\n        :target: https://codecov.io/gh/fgmacedo/soonerdb\n        :alt: Coverage report\n\n.. image:: https://readthedocs.org/projects/soonerdb/badge/?version=latest\n        :target: https://soonerdb.readthedocs.io/en/latest/?badge=latest\n        :alt: Documentation Status\n\n\n\n\nA LSM-Tree key/value database in Python.\n\n\n* Free software: MIT license\n* Documentation: https://soonerdb.readthedocs.io.\n\nThis project started as a learning tool when studing the excelent book\n\"Designing data-intensive applications\" by Martin Kleppmann.\n\n.. note::\n\n    This is a toy project and is not yet tested on production environments.\n    Use at your own risk.\n\nFeatures\n--------\n\n- Pure Python fast LSM-Tree based key/value database.\n- Embedded and zero-conf.\n- Support in-order traversal of all stored keys.\n- On-disk database persistence.\n- Data is durable in the face of application or power failure.\n- Background merge of segment files.\n- **Python 3.6+**.\n\n\n📝 TODO List\n-------------\n- [ ] Deletion of keys.\n\n\nInstallation\n------------\n\nYou can install using ``pip``:\n\n.. code-block:: console\n\n    pip install soonerdb\n\nOr from source:\n\n.. code-block:: console\n\n    git clone https://github.com/fgmacedo/soonerdb\n    cd soonerdb\n    python setup.py install\n\n\nQuick intro\n-----------\n\n``SoonerDB`` has a dict-like API.\n\nShowtime:\n\n.. code-block:: pycon\n\n    In [1]: from soonerdb import SoonerDB\n\n    In [2]: db = SoonerDB('./tmp')\n\n    In [3]: db[\"my key\"] = \"A value\"\n\n    In [4]: db[\"my key\"]\n    Out[4]: 'A value'\n\n    In [5]: \"my key\" in db\n    Out[5]: True\n\n    In [6]: \"other key\" in db\n    Out[6]: False\n\n    In [7]: db[\"other key\"]\n    ---------------------------------------------------------------------------\n    KeyError                                  Traceback (most recent call last)\n    \u003cipython-input-7-bc114493f395\u003e in \u003cmodule\u003e\n    ----\u003e 1 db[\"other key\"]\n    KeyError: \"Key 'other key' not found.\"\n\n    In [8]: db.get(\"other key\", \"default value\")\n    Out[8]: 'default value'\n\n    In [9]: db.set(\"another\", \"value\")\n\n    In [10]: list(db)\n    Out[10]: [('another', 'value'), ('my key', 'A value')]\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffgmacedo%2Fsoonerdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffgmacedo%2Fsoonerdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffgmacedo%2Fsoonerdb/lists"}