{"id":26730930,"url":"https://github.com/daedalus/fastbloomfilter","last_synced_at":"2025-08-03T10:06:00.420Z","repository":{"id":52422847,"uuid":"85777221","full_name":"daedalus/fastBloomFilter","owner":"daedalus","description":"A pure, simple and fast pythonic bloom filter","archived":false,"fork":false,"pushed_at":"2025-03-11T16:05:49.000Z","size":129,"stargazers_count":10,"open_issues_count":0,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-14T10:36:55.441Z","etag":null,"topics":["blake2b","bloom-filter","bloomfilter","bz2","cryptography","fast","hash","logging","lz4","lzma","probabilistic","sha256","sha3","zlib"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/daedalus.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-03-22T02:42:51.000Z","updated_at":"2025-03-11T16:05:53.000Z","dependencies_parsed_at":"2025-03-11T17:21:45.571Z","dependency_job_id":"e706f500-bf4c-4da3-932f-d05bc38a23eb","html_url":"https://github.com/daedalus/fastBloomFilter","commit_stats":{"total_commits":153,"total_committers":2,"mean_commits":76.5,"dds":"0.43790849673202614","last_synced_commit":"2cfd4ab8523e2253ddbfd04f9b02738d7a185d4f"},"previous_names":["daedalus/bloomfilter"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/daedalus/fastBloomFilter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daedalus%2FfastBloomFilter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daedalus%2FfastBloomFilter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daedalus%2FfastBloomFilter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daedalus%2FfastBloomFilter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daedalus","download_url":"https://codeload.github.com/daedalus/fastBloomFilter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daedalus%2FfastBloomFilter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268525155,"owners_count":24264114,"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","status":"online","status_checked_at":"2025-08-03T02:00:12.545Z","response_time":2577,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["blake2b","bloom-filter","bloomfilter","bz2","cryptography","fast","hash","logging","lz4","lzma","probabilistic","sha256","sha3","zlib"],"created_at":"2025-03-27T23:33:05.781Z","updated_at":"2025-08-03T10:06:00.369Z","avatar_url":"https://github.com/daedalus.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Libraries.io SourceRank](https://badges.weareopensource.me/librariesio/sourcerank/pypi/fastBloomFilter)](https://libraries.io/pypi/fastBloomFilter)\n![pypi downloads](https://img.shields.io/pypi/dm/fastbloomfilter?label=pypi%20downloads)\n![lint_python](https://github.com/daedalus/fastBloomFilter/workflows/lint_python/badge.svg)\n![Upload Python Package](https://github.com/daedalus/fastBloomFilter/workflows/Upload%20Python%20Package/badge.svg)\n![CodeQL](https://github.com/daedalus/fastBloomFilter/workflows/CodeQL/badge.svg)\n[![GitHub issues](https://img.shields.io/github/issues/daedalus/fastBloomFilter.svg)](https://github.com/daedalus/fastBloomFilter/issues)\n[![GitHub forks](https://img.shields.io/github/forks/daedalus/fastBloomFilter.svg)](https://github.com/daedalus/fastBloomFilter/network)\n[![GitHub stars](https://img.shields.io/github/stars/daedalus/fastBloomFilter.svg)](https://github.com/daedalus/fastBloomFilter/stargazers)\n[![GitHub license](https://img.shields.io/github/license/daedalus/fastBloomFilter.svg)](https://github.com/daedalus/fastBloomFilter)\n\n# Simple and fast pythonic bloomfilter\n\nFrom wikipedia: \"A Bloom filter is a space-efficient probabilistic data structure, conceived by Burton Howard Bloom in 1970, that is used to test whether an element is a member of a set. False positive matches are possible, but false negatives are not – in other words, a query returns either \"possibly in set\" or \"definitely not in set\". Elements can be added to the set, but not removed (though this can be addressed with a \"counting\" filter); the more elements that are added to the set, the larger the probability of false positives.\"\n\n\n### This filter supports: ###\n\n```\n- Saving, reloading with pickle. \n- Stats\n- Entropy analysis\n- Internal and external hashing of data.\n- raw filter merging\n```\n\n\n### Installing: ###\n\n```\nsudo pip install fastbloomfilter\n```\n\n### External creation of the bloom filter file: ###\n\n```\npython mkbloom.py /tmp/filter.blf\n```\n\n### Importing: ###\n\n```\n\u003e\u003e\u003e from fastBloomFilter import bloom\n\u003e\u003e\u003e bf = bloom.BloomFilter(array_size=1024**3)\n```\n\nOr\n\n```\n\u003e\u003e\u003e from fastBloomFilter import bloom\n\u003e\u003e\u003e bf = bloom.BloomFilter(filename='/tmp/filter.blf')\n```\n\n### Adding data to it: ###\n\n```\n\u003e\u003e\u003e bf.add('30000')\n\u003e\u003e\u003e bf.add('1230213')\n\u003e\u003e\u003e bf.add('1')\n```\n\n### Printing stats: ###\n\n```\n\u003e\u003e\u003e bf.stat()\n```\n   \nOr:\n\n```\n\u003e\u003e\u003e bf.info()\n```\n\n### Querying data: ###\n\n```\n\u003e\u003e\u003e print(bf.query('1'))\nTrue\n\u003e\u003e\u003e print(bf.query('1230213'))\nTrue\n\u003e\u003e\u003e print(bf.query('12'))\nFalse\n\u003e\u003e\u003e print(bf['1'])\nTrue\n```   \n\n### Querying data and at the same time adding it: ###\n\n```\n\u003e\u003e\u003e print(bf.update('1'))\nFalse \n# False means the object wasn't existing and was added.\n\u003e\u003e\u003e print(bf.update('1')) \nTrue  \n# True means the object existed and nothing new was added.\n\u003e\u003e\u003e print(bf.update('2'))\nFalse\n\u003e\u003e\u003e print(bf.update('2'))\nTrue\n```\n\n### Merging two filters: ###\nCreate first filter:\n```\n\u003e\u003e\u003e from fastBloomFilter import bloom\n\u003e\u003e\u003e bf1 = bloom.BloomFilter(array_size=1024**3)\n\u003e\u003e\u003e bf1.add(\"1\")\n```\nCreate second filter:\n```\n\u003e\u003e\u003e from fastBloomFilter import bloom\n\u003e\u003e\u003e bf2 = bloom.BloomFilter(array_size=1024**3)\n\u003e\u003e\u003e bf2.add(\"2\")\n```\nMerge the two filters into a third filter:\n```\n\u003e\u003e\u003e bf3 = bf1 + bf2\n```\nCheck the elements in the third filter:\n```\n\u003e\u003e\u003e print(bf3[\"1\"])\nTrue\n\u003e\u003e\u003e print(bf3[\"2\"])\nTrue\n```\n\n### Contributing ###\n```\nContributons:\n    Are welcome!\n    Criteria: - They should not include hidden folders or files of any ide environment.\n              - They should not delete big portions of the project.\n              - They should not include files that does not have anything to do with the project.\n              - They should not change the API. (API changes should be proposed with Issues as enhancements)\n              - They should not include any obfuscated code.\n              - They should not include binaries.\n              - They should be in small PRs for faster reviewing process.\n              - They should include a small testcase.\n              - Any contribution not hornoring this criteria will be rejected until it does.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaedalus%2Ffastbloomfilter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaedalus%2Ffastbloomfilter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaedalus%2Ffastbloomfilter/lists"}