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

Uploaded Python 3

File details

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

File metadata

  • Download URL: tamal-0.1.0.tar.gz
  • Upload date:
  • Size: 3.5 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.0.tar.gz
Algorithm Hash digest
SHA256 d0da0972edf04ef4140ed10987f7d10f55eab341ae6f4257bd30b9d257a07a5f
MD5 7905e24f05dcd230b46eb724867adc53
BLAKE2b-256 19bba9c2b85a537da6321df35e62714278027a9afef1d9818bcb915bfbe269bd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tamal-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.8 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6ed690b6de282d54bfb3dc087b8fd6383b5054d18cd7fd25fa8c01ed8699e1b6
MD5 ee44234415e35b20392d45ddc8c7cfe2
BLAKE2b-256 84b081d13b048a2068d8037ab770e98944397ba74f53a5c0cadc20d800ab1f0f

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