Skip to main content

Lightweight Python sorting utility that automatically selects the best sorting algorithm.

Project description

MeowSort 😺

PyPI Python License Downloads

A lightweight Python sorting utility that automatically selects the best algorithm for your dataset.

The goal of this library is to provide a minimal, easy-to-use sorting tool for developers and students.


Links

📦 PyPI: https://pypi.org/project/meowsort/
💻 GitHub: https://github.com/ShauryaSingh1709/meowsort


Features

  • Simple and clean API
  • Automatic algorithm selection
  • Supports any comparable Python data type
  • Lightweight with no external dependencies
  • Safe error handling

Installation

Install directly from PyPI:

pip install meowsort

Install

Verify installation:

pip show meowsort

Quick Start

from meowsort import sort_array

data = [5, 3, 9, 1]

sorted_data = sort_array(data)

print(sorted_data)

Output:

[1, 3, 5, 9]

Sorting Different Data Types

The library works with any comparable data type.

Numbers

from meowsort import sort_array

numbers = [8, 2, 6, 1]

print(sort_array(numbers))

Output

[1, 2, 6, 8]

Strings

from meowsort import sort_array

words = ["banana", "apple", "orange"]

print(sort_array(words))

Output

['apple', 'banana', 'orange']

Error Handling

The library validates input and raises clear exceptions if invalid data is provided.

Example:

from meowsort import sort_array

sort_array(None)

Raises:

InvalidInputError

Algorithms Used

MeowSort currently includes:

  • Bubble Sort — optimized for small datasets
  • Quick Sort — used for larger datasets

The algorithm is selected automatically based on the size of the input.


Requirements

  • Python 3.8 or newer

Project Structure

meowsort
│
├── meowsort
│   ├── __init__.py
│   ├── sorter.py
│   ├── algorithms.py
│   └── exceptions.py
│
├── tests
│   └── test_basic.py
│
├── pyproject.toml
├── README.md
└── LICENSE

Author

Shaurya Singh


License

This project is released under 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

meowsort-0.1.1.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

meowsort-0.1.1-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file meowsort-0.1.1.tar.gz.

File metadata

  • Download URL: meowsort-0.1.1.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for meowsort-0.1.1.tar.gz
Algorithm Hash digest
SHA256 bf588b690a5c416925fd236d97cd355598643fce729e0c1e45d1c744486b416e
MD5 7e3f53e1ce49c3c3f5f60a7d29f66e3f
BLAKE2b-256 ff7afa287130d067906709cdb645fe2ddb95f1163e65741e799fb5b09e1988dc

See more details on using hashes here.

File details

Details for the file meowsort-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: meowsort-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for meowsort-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 062792ef4f8d481de219443cf51c83630ea1fd70d79a9e9de2fb1542c3ae4ec3
MD5 847fb705f001ffeb3bbe200604c103a5
BLAKE2b-256 9a97cb11e6e2570036c3f21e909a880df05c505ad0ac7bad867fc3a73b9837ae

See more details on using hashes here.

Supported by

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