Skip to main content

A Python package for sorting dictionaries, lists, tuples, and sets.

Project description

allsort

allsort is a Python utility for sorting various iterable types such as dictionaries, lists, tuples, and sets. It's lightweight, easy to use, and works with custom sorting criteria.

Installation

Install with pip:

pip install allsort

Usage

from allsort.allsort import sortit

# Sorting a list
nums = [3, 1, 4, 1, 5]
print(sortit(nums))  # [1, 1, 3, 4, 5]

# Sorting a dictionary by values
data = {'a': 3, 'b': 1, 'c': 2}
print(sortit(data, key=1))  # {'b': 1, 'c': 2, 'a': 3}

# Sorting a set
nums_set = {3, 1, 4, 1, 5}
print(sortit(nums_set))  # [1, 3, 4, 5]

Features

  1. Sorts lists, tuples, sets, and dictionaries.

  2. Supports ascending and descending orders.

  3. Allows custom sorting keys for flexibility.

Contributions

Contributions are welcome! Fork the repository and submit a pull request.

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

allsort-0.1.0.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

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

allsort-0.1.0-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: allsort-0.1.0.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.1

File hashes

Hashes for allsort-0.1.0.tar.gz
Algorithm Hash digest
SHA256 af19ab1a53145dce86b0d4eec00145d3fe06e262791611034093e5ebcb8e95fd
MD5 e598cae0a2bca4b81469f68af605cb3c
BLAKE2b-256 a0e8c55f1cfb827ee1b746b7723e4431af01227cc41e15ed8dfa6b0fe06e3cae

See more details on using hashes here.

File details

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

File metadata

  • Download URL: allsort-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.1

File hashes

Hashes for allsort-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eafb7353fd890ce529e9496dfe5b3dd00f3169125c9977473e265e198deddc9e
MD5 601eb7bfaead9527a80d12a8d0d9b241
BLAKE2b-256 fa8f48deb1c0adc9e7685c820d80c4d98726e194473fbdcddac53a1330ad2215

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