MiniMindsLab Textwrap Preserve
Wrap plain text while preserving existing paragraph breaks, bullet indentation, and blank lines.
Features
- Preserves blank-line-separated paragraph boundaries.
- Preserves bullet/list prefixes (including indentation) and aligns continuation lines.
- Normalizes line endings to
\n. - Deterministic output for identical inputs.
- Pure Python (standard library only).
Installation
pip install minimindslab-textwrap-preserve
Usage
from minimindslab_textwrap_preserve import wrap_preserve
text = """
Intro paragraph that is very long and should wrap nicely while keeping structure.
- First bullet item that is also long enough to wrap across multiple lines.
- Second bullet.
""".strip("\n")
result = wrap_preserve(text, width=40)
print(result)
API
wrap_preserve(text: str, width: int = 80) -> str
Reflows each non-blank line to fit width, while:
- keeping blank lines intact,
- preserving paragraph/list boundaries line-by-line,
- preserving indentation and bullet prefixes for list-like lines.
Raises:
TypeErroriftextis not a string.ValueErrorifwidth < 1.
License
MIT
Metadata
Release files for minimindslab-textwrap-preserve 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| minimindslab_textwrap_preserve-0.1.0.tar.gz | 3.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| minimindslab_textwrap_preserve-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.6 kB
Release files / minimindslab_textwrap_preserve-0.1.0.tar.gz
| Download URL | minimindslab_textwrap_preserve-0.1.0.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1a35ce920e9d3f8a34847f0fdf6a05344fe01f1c2f18b48c06938e35dbc17028
|
|
BLAKE2b-256 checksum How to use checksums |
dd910689ce46dd24a4ce1431b194b3c4f206889753479d56e8bec2d0a032c45a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
n8n
|
Release files / minimindslab_textwrap_preserve-0.1.0-py3-none-any.whl
| Download URL | minimindslab_textwrap_preserve-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b708e4da28ee079f816cbe1e5cc981c4bef932fc16ba065744c28a52fcdcc733
|
|
BLAKE2b-256 checksum How to use checksums |
dcfd609431fc874ca553200beb82f83dc6f65dc92fb3ab40407e426238168e93
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
n8n
|
Security for minimindslab-textwrap-preserve 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.