Skip to main content

Python Sorting Library

Project description

Python Sorting Library

PyPI Downloads Coverage

Sorting algorithms

  • Insert sort
  • Bubble sort
  • Merge sort
  • Selection sort
  • Quick sort
  • Heap sort
  • Counting sort
  • Radix sort

Each sorting algorithm contains a precise implementation with documented time and space complexity.

Install

pip install pysortlib

Usage

from pysortlib import insert_sort

array = [3, 5, 2, 1, 7, 4, 6]
insert_sort(array)  # set a breakpoint and explore \o/
print(array)

Development

Virtual environment

pip install --user poetry
poetry config virtualenvs.in-project true
poety shell
poetry install

Pre-commit

pre-commit clean
pre-commit install --hook-type pre-commit
pre-commit autoupdate

Depenedencies

poetry update
poetry export --with dev --output requirements-dev.txt

SBOM

cyclonedx-py --poetry --format json --purl-bom-ref --output bom.json --force

Coding standards

  • perfectionism
  • black - code formatting
  • ruff - static code analysis
  • mypy - static type checking
  • pytest - unit tests

License

This project is licensed under the terms of the MIT license.

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

pysortlib-0.1.2.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

pysortlib-0.1.2-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file pysortlib-0.1.2.tar.gz.

File metadata

  • Download URL: pysortlib-0.1.2.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.5 Linux/6.2.0-1011-azure

File hashes

Hashes for pysortlib-0.1.2.tar.gz
Algorithm Hash digest
SHA256 127d3f712177f6fcff9c738474ee451cfd524da36f3af354adc10f99d9a9827c
MD5 2df0168c6f19474bc8273418c7caa5ba
BLAKE2b-256 bece1f0d01e33e7d3934929e84cf05c6450631e3ff99be919ed3fd5c1d48e2cb

See more details on using hashes here.

File details

Details for the file pysortlib-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: pysortlib-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.5 Linux/6.2.0-1011-azure

File hashes

Hashes for pysortlib-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1abec8ab8f58c390f46952a5244a5f93767eefce4de0aae36dee2ee0c6af352b
MD5 2ba7504eb6ba3d951f95905f63ea4191
BLAKE2b-256 fcad4fdd9a675d44f6fe27f3de9f5cc3ffa9deeff80030ec1fc2ff2d9125a0d3

See more details on using hashes here.

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