A pure python port of nim-lapper.
Project description
py_lapper
A pure python port of nim-lapper. Please also the rust lib, rust-lapper
Stay tuned for scailist as well
Install
# Not yet on pypi
# 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)
for iv in lapper.find(4, 7):
print(iv)
# Use seek when you will have many queries in sorted order.
cursor = Cursor(0)
for iv in lapper.seek(1, 4, cursor):
print(iv)
print(cursor)
for iv in lapper.seek(5, 7, cursor):
print(iv)
print(curosr)
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.1.tar.gz
(3.2 kB
view hashes)
Built Distribution
Close
Hashes for py_lapper-0.9.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3188d96dbe630c49571ef9c9bc83ab43d3da1c7b9071b24067de3f3afcd890e9 |
|
MD5 | 1ad1947125424272797f3819ba5a7b5e |
|
BLAKE2b-256 | dcd8abff9a0586531120cfad32d761ec892154f8862263a3ff513a29ace86d14 |