{"id":16217242,"url":"https://github.com/synodriver/pyfilters","last_synced_at":"2026-03-02T06:31:05.421Z","repository":{"id":62580369,"uuid":"350793068","full_name":"synodriver/pyfilters","owner":"synodriver","description":"Bloom filters and other filter algorithms based on memory and redis","archived":false,"fork":false,"pushed_at":"2024-09-17T12:12:56.000Z","size":47,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-27T02:41:34.520Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/synodriver.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2021-03-23T17:05:55.000Z","updated_at":"2024-09-17T12:12:59.000Z","dependencies_parsed_at":"2024-10-27T20:30:51.158Z","dependency_job_id":"5dc6a15d-c781-48c1-94c5-cb5202962978","html_url":"https://github.com/synodriver/pyfilters","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/synodriver/pyfilters","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synodriver%2Fpyfilters","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synodriver%2Fpyfilters/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synodriver%2Fpyfilters/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synodriver%2Fpyfilters/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/synodriver","download_url":"https://codeload.github.com/synodriver/pyfilters/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synodriver%2Fpyfilters/sbom","scorecard":{"id":863399,"data":{"date":"2025-08-11","repo":{"name":"github.com/synodriver/pyfilters","commit":"2571d4cdab8b31aabab4ff165d8bb4b55e0ec63e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.1,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/16 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/upload.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/synodriver/pyfilters/upload.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/upload.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/synodriver/pyfilters/upload.yml/main?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/upload.yml:24","Warn: pipCommand not pinned by hash: .github/workflows/upload.yml:25","Warn: pipCommand not pinned by hash: .github/workflows/upload.yml:26","Warn: pipCommand not pinned by hash: .github/workflows/upload.yml:27","Warn: pipCommand not pinned by hash: .github/workflows/upload.yml:28","Warn: pipCommand not pinned by hash: .github/workflows/upload.yml:29","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   6 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/upload.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-24T01:59:50.943Z","repository_id":62580369,"created_at":"2025-08-24T01:59:50.944Z","updated_at":"2025-08-24T01:59:50.944Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29994121,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-02T01:47:34.672Z","status":"online","status_checked_at":"2026-03-02T02:00:07.342Z","response_time":60,"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":[],"created_at":"2024-10-10T11:26:15.374Z","updated_at":"2026-03-02T06:31:05.392Z","avatar_url":"https://github.com/synodriver.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 由python实现的一系列高效的过滤器算法实现\n[![pypi](https://img.shields.io/pypi/v/pyfilters.svg)](https://pypi.org/project/pyfilters/)\n![python](https://img.shields.io/pypi/pyversions/pyfilters)\n![implementation](https://img.shields.io/pypi/implementation/pyfilters)\n![wheel](https://img.shields.io/pypi/wheel/pyfilters)\n![license](https://img.shields.io/github/license/synodriver/pyfilters.svg)\n\n\n- 基于redis和memory\n- 低时间复杂度\n\n## Useage\n\n```python\nfrom pyfilters import MemoryBloomFilter\n\nbf = MemoryBloomFilter(10000, 0.00001)\nfor i in range(1000):\n    bf.add(i)\nfor i in range(1000):\n    assert i in bf\nassert 1001 not in bf\n```\n\n## Advanced usage\n\n\n- 计数形布隆过滤器，可以删除数据\n\n```python\nfrom pyfilters import CountMemoryBloomFilter\n\ncbf = CountMemoryBloomFilter(10000, 0.00001)\nfor i in range(1000):\n    cbf.add(i)\nfor i in range(1000):\n    assert i in cbf\ncbf.remove(1)\nassert 1 not in cbf\n```\n\n- redis分块布隆过滤器，避免单key过大\n\n```python\nfrom redis import Redis\nfrom pyfilters import ChunkedRedisBloomFilter\n\nbf = ChunkedRedisBloomFilter(Redis(), \"test_bloomfilter\", 10000, 0.00001)\nfor i in range(1000):\n    bf.add(i)\nfor i in range(1000):\n    assert i in bf\nassert 1001 not in bf\n```\n\n\n- 分块计数形redis布隆过滤器,可以删除数据\n\n```python\nfrom redis import Redis\nfrom pyfilters import CountRedisBloomFilter\n\nrcbf = CountRedisBloomFilter(Redis(), \"test_countbloomfilter\", 10000, 0.00001)\nfor i in range(1000):\n    rcbf.add(i)\nfor i in range(1000):\n    assert i in rcbf\nrcbf.remove(1)\nassert 1 not in rcbf\n```\n\n# asyncio兼容\n在pyfilters.asyncio包\n```python\nimport asyncio\n\nfrom redis.asyncio import Redis\nfrom pyfilters.asyncio import CountRedisBloomFilter\n\nasync def main():\n    rcbf = CountRedisBloomFilter(Redis(), \"test_countbloomfilter\", 10000, 0.00001)\n    for i in range(1000):\n        await rcbf.add(i)\n    for i in range(1000):\n        assert await rcbf.contains(i)\n    await rcbf.remove(1)\n    assert not await rcbf.contains(1)\n\nasyncio.run(main())\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsynodriver%2Fpyfilters","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsynodriver%2Fpyfilters","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsynodriver%2Fpyfilters/lists"}