Skip to main content

Lightweight Python sorting utility

Project description

MeowSort 😺

MeowSort is a lightweight Python utility library that provides a simple and reliable interface for sorting iterables. It automatically selects the appropriate sorting algorithm depending on the dataset size.

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


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.0.tar.gz (2.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.0-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: meowsort-0.1.0.tar.gz
  • Upload date:
  • Size: 2.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.0.tar.gz
Algorithm Hash digest
SHA256 12aafc0055fea5e0af15dff551b50581656f1dff9bb1c51a24d68c6efccd639d
MD5 fffab2543934e34d06cd3e461afd2bca
BLAKE2b-256 65825a24825509fdc7fce4ea98711c05c1d0eeb79bc30cfef6824afe25a8b012

See more details on using hashes here.

File details

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

File metadata

  • Download URL: meowsort-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.5 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 11e6cd2b797a9d6e091721a139f2d7726297cdec4a5b8c5779c5fdb88a708e44
MD5 eb8ee772f589554d1020d5e0cc4f3d18
BLAKE2b-256 77f206ff481a717475f3823bcb3ff0ca60a073ede683a018b8cf020d6a20c7a4

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