boolmerge - Tools for merging sorted iterables according to boolean operators.
This module provides 4 efficient iterator types for merging sorted iterables according to boolean operators (AND, NOT, OR, XOR), in a lazy fashion. All code is written is C for performance reasons.
Installation
$ python setup.py install
Usage
First import the module:
>>> import boolmerge
All the iterator types have the same interface. They should be called with two argument, each one being a sorted iterable (be it of any kind), which items should be orderable. If this is not the case, the result is undefined.
boolmerge.andmerge returns an iterator which yields all items present in both of the iterables it is given as arguments:
>>> list(boolmerge.andmerge("acd", "abc"))
['a', 'c']
boolmerge.ormerge returns an iterator which yields all items present in any of the iterables it is given as arguments:
>>> list(boolmerge.ormerge("abcd", "cef"))
['a', 'b', 'c', 'd', 'e', 'f']
boolmerge.notmerge returns an iterator which yields all items present in the first iterable it is given as argument, but not in the second:
>>> list(boolmerge.notmerge("bdf", "abcf"))
['d']
boolmerge.xormerge returns an iterator which yields all items present in either of the iterables it is given as arguments, but not in both:
>>> list(boolmerge.xormerge("adf", "abcd"))
['b', 'c', 'f']
Metadata
Release files for BoolMerge 1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| boolmerge-1.0.1.tar.gz | 86.5 kB | Without provenance | Details for boolmerge-1.0.1.tar.gz |
Release files / boolmerge-1.0.1.tar.gz
| Download URL | boolmerge-1.0.1.tar.gz |
|---|---|
| Size | 86.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
12413490fa5b3462ba983e6aed3d7ddf132b9e43d2dde78b62be22ec41bb205c
|
|
BLAKE2b-256 checksum How to use checksums |
d55eca6b3ac5950d1189d59244d999051dfb06aeae4ac5073119cb00aceb37de
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for BoolMerge 1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.