{"id":22180573,"url":"https://github.com/dcso/flor","last_synced_at":"2025-07-26T17:32:18.398Z","repository":{"id":50228024,"uuid":"96100536","full_name":"DCSO/flor","owner":"DCSO","description":"A Python implementation of our efficient Bloom filter library.","archived":false,"fork":false,"pushed_at":"2020-02-27T12:44:29.000Z","size":26,"stargazers_count":29,"open_issues_count":1,"forks_count":4,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-05-30T00:04:05.412Z","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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DCSO.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":"2017-07-03T10:43:35.000Z","updated_at":"2023-11-24T08:10:33.000Z","dependencies_parsed_at":"2022-09-26T21:01:07.109Z","dependency_job_id":null,"html_url":"https://github.com/DCSO/flor","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DCSO%2Fflor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DCSO%2Fflor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DCSO%2Fflor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DCSO%2Fflor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DCSO","download_url":"https://codeload.github.com/DCSO/flor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227700405,"owners_count":17806365,"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":[],"created_at":"2024-12-02T09:18:44.743Z","updated_at":"2024-12-02T09:18:45.360Z","avatar_url":"https://github.com/DCSO.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flor - A Bloom filter implementation in Python\n\n[![Build Status](https://travis-ci.org/DCSO/flor.svg?branch=master)](https://travis-ci.org/DCSO/flor)\n\nFlor implements a Bloom filter class that is fully compatible with our\n[Go Bloom filter implementation](https://github.com/DCSO/bloom).\n\n# Requirements\n\nFlor is compatible with Python 2.7+ and Python 3.2+ as well as PyPy2/3 and does not require any\nnon-standard modules.\n\n# Installation\n\nFlor can be installed via PyPi/pip:\n\n    pip install flor\n\nAlternatively, you can install it from source:\n\n    git clone https://github.com/DCSO/flor.git\n    cd flor\n\n    #add \"sudo\" if you're not in a virtual environment\n    python setup.py install\n\n# Basics\n\nA Bloom filter has a capacity `n` and a false positive probability `p` that gives the probability\nthat a filter filled to capacity (i.e. with `n` distinct values inserted) will return `True`\nfor an element that is not in the filter.\n\n# Usage\n\nCreating a new Bloom filter:\n\n    from flor import BloomFilter\n\n    bf = BloomFilter(n=100000, p=0.001)\n\n    bf.add(b\"foo\")\n    bf.add(b\"bar\")\n    bf.add(b\"baz\")\n\n    b\"baz\" in bf #returns True\n    b\"nope\" in bf #returns False\n\nWriting a Bloom filter to a file:\n\n    bf = BloomFilter()\n    with open('test.bloom', 'wb') as f:\n        bf.write(f)\n\nReading a Bloom filter from a file:\n\n    bf = BloomFilter()\n    with open('test.bloom', 'rb') as f:\n        bf.read(f)\n\nThe binary format of the filter is compatible with that generated by our Go library, so you can use the two interchangeably.\n\n# License\n\nFlor is licensed under the BSD 3 Clause license (see LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcso%2Fflor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdcso%2Fflor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcso%2Fflor/lists"}