A pure python port of nim-lapper.
Project description
py_lapper
A pure python port of nim-lapper. Please also see the rust lib, rust-lapper
Stay tuned for a pyO3 wrapper for the rust lib.
Documentation can be found here.
Install
pip install py_lapper
Usage
from py_lapper import Interval, Lapper, Cursor
intervals = [Interval(0, 5, True), Interval(4, 8, True), Interval(9, 12, True)]
lapper = Lapper(intervals)
found = [iv for iv in lapper.find(4, 7)]
# found = [Interval(0, 5, True), Interval(4, 8, True)]
# Use seek when you will have many queries in sorted order.
cursor = Cursor(0)
found = [iv for iv in lapper.seek(1, 4, cursor)]
# found = [Interval(0, 5, True)]
# cursor = Cursor(2)
found = [iv for iv in lapper.seek(5, 7, cursor)]
# found = [Interval(4, 8, True)]
# cursor = Cursor(3)
Changelog
1/16/2020 -- 0.9.3
* Added type hints
* Added documentation
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
py_lapper-0.9.3.tar.gz
(4.1 kB
view hashes)
Built Distribution
Close
Hashes for py_lapper-0.9.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7dc149b5e04b4f9fd520eb0c3b65ccb9c6aeb03ec9f5b2626ae59b5984011bca |
|
MD5 | 382e0af3adf0ff960357dece37f8eee2 |
|
BLAKE2b-256 | 9635063112c2838c1e422a178dd315e4927e97ce2e079cb419b105f8c994e05c |