Skip to main content

This module contains some popular sorting algorithms implemented in pure python.

Project description

Normal sorting

PyPI version CI status codecov

Various sorting algorithms implemented in pure python. Now with typing support and for python 3.7/3.8.
Currently implemented following:

  • Bubble (of course just for fun)
  • Quick (with random pivot)
  • Merge
  • Insertion
  • Heap
  • More to go...

Compatibility

Python 3.7+ (test coverage include python 3.7, 3.8)

Usage

  • Install pip install sortpy
  • Import sorting algorithm from sortpy import quick.
    Function doesnt check the output (for the sake of speed), and have correct type annotations, that talk about available types.
  • Use it like quick.sort([3, 2, 1])

Also

Test coverage with fixtures and random generated test cases (reference function is python basic timsort).
Has couple hundred parametrized tests.

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

sortpy-1.0.8.tar.gz (12.5 kB view hashes)

Uploaded Source

Built Distribution

sortpy-1.0.8-py3-none-any.whl (6.8 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