MiniMindsLab Line Endings
Tiny, offline, pure-Python helpers to detect and normalize text line endings.
Features
- Detect dominant/consistent line ending style in a string:
CRLF(\r\n)LF(\n)CR(\r)NONE(no line breaks)MIXED(more than one style)
- Normalize any mixture of line endings to one target style.
- Optional control of whether output ends with a trailing newline.
Install
This package is standard-library only and has no runtime dependencies.
Usage
from minimindslab_line_endings import detect_line_ending, normalize_text
text = "a\r\nb\r\nc"
print(detect_line_ending(text)) # CRLF
normalized = normalize_text(text)
print(repr(normalized)) # 'a\nb\nc'
normalized_crlf = normalize_text(text, line_ending="CRLF", ensure_trailing_newline=True)
print(repr(normalized_crlf)) # 'a\r\nb\r\nc\r\n'
API
detect_line_ending(text: str) -> strnormalize_text(text: str, line_ending: str = "LF", ensure_trailing_newline: bool | None = None) -> str
License
MIT
Metadata
Release files for minimindslab-line-endings 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_line_endings-0.1.0.tar.gz | 3.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| minimindslab_line_endings-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.1 kB
Release files / minimindslab_line_endings-0.1.0.tar.gz
| Download URL | minimindslab_line_endings-0.1.0.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
885cd6de9e44b7c45c1828d6bb2bc4d9726a0956eec47faef369b154344de7ad
|
|
BLAKE2b-256 checksum How to use checksums |
73e87131a07850769b576792e785affe1dc75e839aba776a597396d02127cc6f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
n8n
|
Release files / minimindslab_line_endings-0.1.0-py3-none-any.whl
| Download URL | minimindslab_line_endings-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
72035cf804cf8394a0f4bf4ff95aa905a99e239a2bc2d2ef2e67f6b14aa0747a
|
|
BLAKE2b-256 checksum How to use checksums |
f487a01939cc01a8a6170770ff5528ae3d4e4f85f0757596e562546cadd96e16
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
n8n
|
Security for minimindslab-line-endings 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.