{"id":20909633,"url":"https://github.com/redisbloom/redisbloom-py","last_synced_at":"2025-05-13T07:31:03.670Z","repository":{"id":42436596,"uuid":"102039628","full_name":"RedisBloom/redisbloom-py","owner":"RedisBloom","description":"Python client for Redisbloom","archived":false,"fork":false,"pushed_at":"2023-02-08T08:30:19.000Z","size":25459,"stargazers_count":77,"open_issues_count":6,"forks_count":11,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-13T11:06:08.436Z","etag":null,"topics":["bloom-filter","python-client","redis","redis-client","redisbloom"],"latest_commit_sha":null,"homepage":"https://redisbloom.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RedisBloom.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-08-31T19:57:12.000Z","updated_at":"2025-04-04T07:22:22.000Z","dependencies_parsed_at":"2024-06-18T18:22:40.992Z","dependency_job_id":"94292fb0-ef27-4533-998a-caebcc959fb0","html_url":"https://github.com/RedisBloom/redisbloom-py","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedisBloom%2Fredisbloom-py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedisBloom%2Fredisbloom-py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedisBloom%2Fredisbloom-py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedisBloom%2Fredisbloom-py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RedisBloom","download_url":"https://codeload.github.com/RedisBloom/redisbloom-py/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253894714,"owners_count":21980389,"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":["bloom-filter","python-client","redis","redis-client","redisbloom"],"created_at":"2024-11-18T14:12:10.257Z","updated_at":"2025-05-13T07:31:03.426Z","avatar_url":"https://github.com/RedisBloom.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![license](https://img.shields.io/github/license/RedisBloom/redisbloom-py.svg)](https://github.com/RedisBloom/redisbloom-py)\n[![PyPI version](https://badge.fury.io/py/redisbloom.svg)](https://badge.fury.io/py/redisbloom)\n[![GitHub issues](https://img.shields.io/github/release/RedisBloom/redisbloom-py.svg)](https://github.com/RedisBloom/redisbloom-py/releases/latest)\n[![Codecov](https://codecov.io/gh/RedisBloom/redisbloom-py/branch/master/graph/badge.svg)](https://codecov.io/gh/RedisBloom/redisbloom-py)\n[![Known Vulnerabilities](https://snyk.io/test/github/RedisBloom/redisbloom-py/badge.svg?targetFile=pyproject.toml)](https://snyk.io/test/github/RedisBloom/redisbloom-py?targetFile=pyproject.toml)\n[![Total alerts](https://img.shields.io/lgtm/alerts/g/RedisBloom/redisbloom-py.svg?logo=lgtm\u0026logoWidth=18)](https://lgtm.com/projects/g/RedisBloom/redisbloom-py/alerts/)\n\n# Python client for RedisBloom\n[![Forum](https://img.shields.io/badge/Forum-RedisBloom-blue)](https://forum.redis.com/c/modules/redisbloom)\n[![Discord](https://img.shields.io/discord/697882427875393627?style=flat-square)](https://discord.gg/wXhwjCQ)\n\n## Deprecation notice\n\nAs of [redis-py 4.0.0](https://pypi.org/project/redis/4.0.0) this library is deprecated. It's features have been merged into redis-py. Please either install it [from pypy](https://pypi.org/project/redis) or [the repo](https://github.com/redis/redis-py).\n\n--------------------------------\n\nredisbloom-py is a package that gives developers easy access to several probabilistic data structures. The package extends [redis-py](https://github.com/andymccurdy/redis-py)'s interface with RedisBloom's API.\n\n### Installation\n```\n$ pip install redisbloom\n```\n\n### Usage example\n\n```python\n# Using Bloom Filter\nfrom redisbloom.client import Client\nrb = Client()\nrb.bfCreate('bloom', 0.01, 1000)\nrb.bfAdd('bloom', 'foo')        # returns 1\nrb.bfAdd('bloom', 'foo')        # returns 0\nrb.bfExists('bloom', 'foo')     # returns 1\nrb.bfExists('bloom', 'noexist') # returns 0\n\n# Using Cuckoo Filter\nfrom redisbloom.client import Client\nrb = Client()\nrb.cfCreate('cuckoo', 1000)\nrb.cfAdd('cuckoo', 'filter')        # returns 1\nrb.cfAddNX('cuckoo', 'filter')      # returns 0\nrb.cfExists('cuckoo', 'filter')     # returns 1\nrb.cfExists('cuckoo', 'noexist')    # returns 0\n\n# Using Count-Min Sketch\nfrom redisbloom.client import Client\nrb = Client()\nrb.cmsInitByDim('dim', 1000, 5)\nrb.cmsIncrBy('dim', ['foo'], [5])\nrb.cmsIncrBy('dim', ['foo', 'bar'], [5, 15])\nrb.cmsQuery('dim', 'foo', 'bar')    # returns [10, 15]\n\n# Using Top-K\nfrom redisbloom.client import Client\nrb = Client()\nrb.topkReserve('topk', 3, 20, 3, 0.9)\nrb.topkAdd('topk', 'A', 'B', 'C', 'D', 'E', 'A', 'A', 'B',\n                   'C', 'G', 'D', 'B', 'D', 'A', 'E', 'E')\nrb.topkQuery('topk', 'A', 'B', 'C', 'D')    # returns [1, 1, 0, 1]\nrb.topkCount('topk', 'A', 'B', 'C', 'D')    # returns [4, 3, 2, 3]\nrb.topkList('topk')                         # returns ['A', 'B', 'E']\nrb.topkListWithCount('topk')                # returns ['A', 4, 'B', 3, 'E', 3]\n```\n\n### API\nFor complete documentation about RedisBloom's commands, refer to [RedisBloom's website](http://redisbloom.io).\n\n### License\n[BSD 3-Clause](https://github.com/RedisBloom/redisbloom-py/blob/master/LICENSE)\n\n### Development\n\n1. Create a virtualenv to manage your python dependencies, and ensure it's active.\n   ```virtualenv -v venv```\n2. Install [pypoetry](https://python-poetry.org/) to manage your dependencies.\n   ```pip install poetry```\n3. Install dependencies.\n   ```poetry install```\n\n[tox](https://tox.readthedocs.io/en/latest/) runs all tests as its default target. Running *tox* by itself will run unit tests. Ensure you have a running redis, with the module loaded.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredisbloom%2Fredisbloom-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredisbloom%2Fredisbloom-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredisbloom%2Fredisbloom-py/lists"}