{"id":25269947,"url":"https://github.com/aymenjd/rocksdb-python","last_synced_at":"2025-10-27T07:32:06.493Z","repository":{"id":63140180,"uuid":"565542550","full_name":"AYMENJD/rocksdb-python","owner":"AYMENJD","description":"Easy-to-use asynchronous rocksdb client for python.","archived":false,"fork":false,"pushed_at":"2023-08-11T09:06:13.000Z","size":22,"stargazers_count":13,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-08-10T07:35:35.287Z","etag":null,"topics":["async","asyncio","client","database","pybind11","python","python3","rocksdb"],"latest_commit_sha":null,"homepage":"","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/AYMENJD.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":"2022-11-13T18:28:13.000Z","updated_at":"2024-03-22T15:12:34.000Z","dependencies_parsed_at":"2023-02-07T15:00:23.185Z","dependency_job_id":null,"html_url":"https://github.com/AYMENJD/rocksdb-python","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/AYMENJD%2Frocksdb-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AYMENJD%2Frocksdb-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AYMENJD%2Frocksdb-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AYMENJD%2Frocksdb-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AYMENJD","download_url":"https://codeload.github.com/AYMENJD/rocksdb-python/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238463126,"owners_count":19476647,"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":["async","asyncio","client","database","pybind11","python","python3","rocksdb"],"created_at":"2025-02-12T11:28:03.152Z","updated_at":"2025-10-27T07:32:01.188Z","avatar_url":"https://github.com/AYMENJD.png","language":"C++","readme":"# rocksdb-python [![version](https://img.shields.io/pypi/v/rocksdb-python?style=flat\u0026logo=pypi)](https://pypi.org/project/rocksdb-python) [![downloads](https://img.shields.io/pypi/dm/rocksdb-python?style=flat)](https://pypistats.org/packages/rocksdb-python)\n\nSimple and easy rocksdb client for python.\n\u003e NOTE: This client dosen't fully support rocksdb. Only the basic usage of rocksdb is supported.\n\n### Requirements\n\n- python3.8+\n- [rocksdb](https://github.com/facebook/rocksdb)\n\nInstallation\n------------\n\nWe need to [install](https://github.com/facebook/rocksdb/blob/master/INSTALL.md) and build rocksdb alongside rocksdb-python.\n\nBuild rocksdb\n-------------\n\nFrom source:\n***********\n```bash\napt-get install build-essential libgflags-dev libsnappy-dev zlib1g-dev libbz2-dev liblz4-dev libzstd-dev\ngit clone https://github.com/facebook/rocksdb.git\ncd rocksdb\nmkdir build\ncd build\nmake shared_lib\n```\nChoose where to install rocksdb after building\n*******************************\n- You can install rocksdb shared library in `/usr/lib/` (systemwide) using:\n  ```bash\n  make install-shared INSTALL_PATH=/usr\n  ```\n  - If you wish to uninstall it use:\n    ```bash\n    make uninstall INSTALL_PATH=/usr\n    ```\n\n- If you don't like to install it systemwide you can set the following environment variables which will help the compiler to find rocksdb:\n  ```bash\n    export CPLUS_INCLUDE_PATH=${CPLUS_INCLUDE_PATH}:`pwd`/../include\n    export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:`pwd`\n    export LIBRARY_PATH=${LIBRARY_PATH}:`pwd`\n  ```\n\nInstall rocksdb-python\n----------------------\nUsing pip:\n```bash\npip install rocksdb-python\n```\n\nFrom source (development version):\n```bash\npip install git+https://github.com/AYMENJD/rocksdb-python\n```\n\nUsage\n-----\n```python\nimport rocksdb, asyncio\n\nasync def main():\n    db = rocksdb.RocksDB(db_path=\"myrocksdb/\", options=rocksdb.Options(create_if_missing=True))\n\n    key = \"123-456-789\"\n    response = await db.put(rocksdb.WriteOptions(), key, \"Hello world. Bye!\")\n\n    if response.status.ok: # You always need to check if the request success.\n        get_value = await db.get(rocksdb.ReadOptions(), key)\n\n        print(get_value.value) # Hello world. Bye!\n\n        await db.delete(rocksdb.WriteOptions(), key)\n    else:\n        print(get_value.status.to_dict())\n\n\n    await db.close()\n\nasyncio.run(main())\n```\nCheck [Documentation](https://github.com/AYMENJD/rocksdb-python/wiki) for more.\n\nContributing\n------------\nPull requests are always welcome!!\n\nLicense\n-------\n\nMIT [License](https://github.com/AYMENJD/rocksdb-python/blob/main/LICENSE)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faymenjd%2Frocksdb-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faymenjd%2Frocksdb-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faymenjd%2Frocksdb-python/lists"}