Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

LazySort

LazySort provides a wrapper around any sequence with random access. It computes and sorts only the necessary chunks of data on-demand when items or slices are accessed.

Installation

Using uv:

uv add lazysort

Or using pip:

pip install lazysort

Usage

from lazysort import LazySort

# An unsorted dataset.
data = [42, 15, 8, 23, 4, 16, 99, 51, 3]

# Wrap the dataset with LazySort.
# work_items_limit defines the maximum number of elements loaded into memory.
ls = LazySort(data, work_items_limit=4)

# Access elements as if the collection were sorted.
print(ls[0]) # Output: 3
print(ls[1]) # Output: 4
print(ls[-1]) # Output: 99

# Slicing is also fully supported.
print(tuple(ls[2:6]))

# Iteration yields elements in sorted order.
for item in ls: print(item)

# Using a custom key function and reverse sorting
complex_ls = LazySort(data, work_items_limit=4, key_fn=lambda x: x, reverse=True)

Changelog

v2

  • Stable production release with improved clustering algorithms and full test coverage.

v1

  • Initial release featuring core lazy sorting capabilities, indexing, and key function support. It has a bug in the processing of equal values.

License

This project is licensed under the MIT License.

Contact

LinkedIn

GitLab

Metadata

Release files for lazysort 2.1.0.dev1791146170

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for lazysort 2.1.0.dev1791146170
File Interpreter ABI Platform Actions
lazysort-2.1.0.dev1791146170-py3-none-any.whl Python 3 none any Details for lazysort-2.1.0.dev1791146170-py3-none-any.whl

Release files / lazysort-2.1.0.dev1791146170-py3-none-any.whl

Download URL lazysort-2.1.0.dev1791146170-py3-none-any.whl
Size 8.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
082d9c24813dfc1b2dd333eeaee8a36946e93e7adcfed8c88e95e75d32a28d42
BLAKE2b-256 checksum
How to use checksums
b7ab7714b8f3fc685255343f9c8ffbf8ff094c308b4275c36136e0feb5f49f23
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for lazysort 2.1.0.dev1791146170

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.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page