Skip to main content

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

Project description

MeowSort 😺

PyPI Python License

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

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.2.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.2-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: meowsort-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 50751bea7f07f5585775a389a73f3ca48f0dcc374c1fbf88880af709283a3c38
MD5 a1d81236231cf6047986c4c59cdeea14
BLAKE2b-256 8905cc004535d608ccf995dbe8bbe4e02806d35889f41177bad9679815c5bfdc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: meowsort-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 316a2ef064f9a0d59b45a44cb8b4d339c53c26570749b362b1e81582a3f63f38
MD5 9f6e70a0fd930a6fe6c874f6d5d7e84c
BLAKE2b-256 d0e67dafb3b84a155f94d6b168acf94729fc423c07f0a15f78e253109d97e6cc

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