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.0.0

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

v1.3.0

  • 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.0.2.dev1790916810

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.0.2.dev1790916810
File Interpreter ABI Platform Actions
lazysort-2.0.2.dev1790916810-py3-none-any.whl Python 3 none any Details for lazysort-2.0.2.dev1790916810-py3-none-any.whl

Release files / lazysort-2.0.2.dev1790916810-py3-none-any.whl

Download URL lazysort-2.0.2.dev1790916810-py3-none-any.whl
Size 8.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
520d4c04883a927c80cebad8d8cdc3894a45a2da1548adcc658bb7cc199655bf
BLAKE2b-256 checksum
How to use checksums
afb4c4c230c33260fcc3ffc1a820fea000fe3287a903c7acc9270504a63b153a
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.0.2.dev1790916810

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