--- id: paragraphs version: "1.0.1" license: MIT license_treatment: permissive maintenance: dormant --- # paragraphs — Incorporate long strings painlessly, beautifully into Python code. License: permissive · Maintenance: dormant · Downloads: 305.5K/mo ## What it is and what it does paragraphs is a lightweight utility that provides a single function, `par()`, to convert multi-line string literals into clean, single-paragraph text. It removes leading indentation, joins lines with spaces, compresses consecutive whitespace, and handles paragraph breaks (marked by blank lines) by preserving them as double newlines. The function is designed to make long strings readable in source code without sacrificing the final output format. The typical use case is embedding long text—error messages, documentation, data labels, or narrative content—directly in Python code while keeping the code itself well-indented and readable. Instead of concatenating strings or using awkward line continuations, you pass a multi-line triple-quoted string to `par()` and get back a properly formatted result. Use it for: - Format long exception messages or error descriptions that span multiple lines while keeping source code indented. - Store verbose data like book titles, historical records, or narrative text in dictionaries or data structures without line breaks. - Embed multi-paragraph help text or documentation strings in class or function definitions. - Clean up user-facing strings that are easier to edit and review when written across multiple lines in the source. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides a single function that joins multi-line strings into clean, single-paragraph text by removing indentation and normalizing whitespace, making it easier to write readable long strings in Python code. Yes, if you frequently write long strings in Python and want cleaner, more maintainable code. The package is stable (no known vulnerabilities), has no dependencies, and installs easily. However, the dormant maintenance status means you should not expect active support; use it only for straightforward string formatting where you do not need ongoing updates. ## Install pip install paragraphs uv add paragraphs poetry add paragraphs ## Installing paragraphs Before you install: Low friction install with no runtime dependencies. Package is dormant (733 days since last release) but received a recent update on 2024-08-11; maintenance status suggests it may not receive active support for new issues. License in practice: MIT license is permissive; you may use, modify, and distribute this package freely in both open-source and proprietary projects with minimal restrictions. Quickstart: from paragraphs import par text = par( """ Lorem ipsum dolor sit amet, consectetur adipiscing elit. """ ) print(text) Requires Python 3.8 or later. Verify before relying: - Whether the package is actively maintained or if dormant status means bug fixes are unlikely. - Performance characteristics with very large strings or edge cases not covered in the documentation. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: dormant - Downloads: 305.5K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags multiline string formatting, remove indentation from strings, join text lines cleanly, format long strings in code, whitespace normalization, readable string literals, paragraph text processing, string-formatting, code-readability [View on SkillFed](https://skillfed.io/packages/paragraphs) · [View on PyPI](https://pypi.org/project/paragraphs/)