Skip to main content

A Tabular Helper utility library with general-purpose helpers for the tha-* ecosystem.

Project description

tha-utils-helper

CI

A small Python utility library with general-purpose helpers for the tha-* ecosystem. No dependencies, no classes — just functions.

Install

pip install tha-utils-helper

Quick start

from tha_utils_helper import chunk_list

chunk_list([1, 2, 3, 4, 5], 2)
# [[1, 2], [3, 4], [5]]

API

chunk_list(lst, size)

chunk_list(lst: list[T], size: int) -> list[list[T]]

Splits lst into consecutive chunks of size. The final chunk may be smaller if the list doesn't divide evenly. Raises ValueError if size < 1.

chunk_list([1, 2, 3, 4, 5], 2)   # [[1, 2], [3, 4], [5]]
chunk_list([1, 2, 3], 3)          # [[1, 2, 3]]
chunk_list([], 5)                  # []

License

MIT

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

tha_utils_helper-0.1.0.tar.gz (2.1 kB view details)

Uploaded Source

Built Distribution

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

tha_utils_helper-0.1.0-py3-none-any.whl (2.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tha_utils_helper-0.1.0.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tha_utils_helper-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e3d505e61af470bf056d1bb37f48e533168e2c6e88ef898e507456427c2ce188
MD5 ce204579564ac5b40f9da58da5857969
BLAKE2b-256 3d578b6a8983799f776098a570b42a928e78e7f02c410171c989e899dc082005

See more details on using hashes here.

Provenance

The following attestation bundles were made for tha_utils_helper-0.1.0.tar.gz:

Publisher: publish.yml on tha-guy-nate/tha-utils-helper

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for tha_utils_helper-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 02d5ea09e598d6577a224ee750007c03810a3697bc7ff5595da62424eede4370
MD5 5b1e62633c3e097e52a203e322b9d4af
BLAKE2b-256 10d851286a1e06abd017d37ad55ad947488706419b43e5cf901bee8a82145694

See more details on using hashes here.

Provenance

The following attestation bundles were made for tha_utils_helper-0.1.0-py3-none-any.whl:

Publisher: publish.yml on tha-guy-nate/tha-utils-helper

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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