src/hydra.py
def ReadingBloomFilter(filename, want_lock=False):
    """
    Create a read-only bloom filter with an upperbound of
    (num_elements, max_fp_prob) as a specification and using filename
    as the backing datastore.
    """
    with open('{}.desc'.format(filename), 'r') as descriptor:
        num_elements = int(descriptor.readline())
        max_fp_prob = float(descriptor.readline())
        ignore_case = int(descriptor.readline())

    return _hydra.BloomFilter.getFilter(
        num_elements, max_fp_prob,
        filename=filename, ignore_case=ignore_case,
        read_only=True, want_lock=want_lock)
def ReadingBloomFilter(filename, want_lock=False):
    """
    Create a read-only bloom filter with an upperbound of
    (num_elements, max_fp_prob) as a specification and using filename
    as the backing datastore.
    """
    with open('{}.desc'.format(filename), 'r') as descriptor:
        num_elements = int(descriptor.readline())
        max_fp_prob = float(descriptor.readline())
        ignore_case = int(descriptor.readline())

    return _hydra.BloomFilter.getFilter(
        num_elements, max_fp_prob,
        filename=filename, ignore_case=ignore_case,
        read_only=True, want_lock=want_lock)
Create a read-only bloom filter with an upperbound of
    (num_elements, max_fp_prob) as a specification and using filename
    as the backing datastore.