Skip to main content

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)

Uploaded Source

Built Distribution

py_lapper-0.9.1-py3-none-any.whl (4.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page