Skip to main content

A library for wrapping text

Project description

This is a python library for breaking and wrapping text.

The library provides three functions, wrap, chunk, and break_lines.

chunk breaks a string once, using whitespace, existing hyphens or soft hyphens, or by forcing a hyphen at a given maximum width, returning the head and the tail (as a tuple[str, str], with the second slot of the tuple potentially being an empty string).

break_lines breaks a string into lines of a given maximum width, returning the resulting lines as a list[str].

wrap wraps a text.

Install

pip install tamal

Documentation

See jnthnhrrr.github.io/python-tamal

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

tamal-0.1.2.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

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

tamal-0.1.2-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tamal-0.1.2.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/6.8.0-49-generic

File hashes

Hashes for tamal-0.1.2.tar.gz
Algorithm Hash digest
SHA256 88cd475f926866a4cb8f8f07a967158a27bff634a82c6fd98790d90860068233
MD5 2d821fdb75c0cb1c31c4ce2fa06f4356
BLAKE2b-256 dd0bbc214ce9d1b66e733d13ca53ed10d18310a91dc775fa5623b760d1447e01

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tamal-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/6.8.0-49-generic

File hashes

Hashes for tamal-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8dd339af4fc64dee9e67c82c2590295087bbddfb601a819b1ebaf94a4dcac6ac
MD5 3838d69b234b4ec1831861384f680f9a
BLAKE2b-256 d67b286fd9e821e5e26d93e77d90737d756ec8a9422e9aa27bc362ec433017a0

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