{"library":"paragraphs","title":"Paragraphs","description":"Paragraphs is a Python library designed to simplify the incorporation of long strings into Python code, making them more readable and maintainable. It provides a simple function to format multi-line strings, aiming to prevent common formatting issues that arise with extensive text blocks in code. The current version is 1.0.1, and its release cadence appears to be infrequent, with the last update in 2019.","language":"python","status":"maintenance","last_verified":"Mon May 18","install":{"commands":["pip install paragraphs"],"cli":null},"imports":["from paragraphs import par"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"from paragraphs import par\n\nlong_text = par(\n    \"\"\"\n    This is a very long string that needs to be incorporated\n    into Python code without looking messy. The 'paragraphs'\n    library helps format such text blocks beautifully, handling\n    line breaks and indentation consistently. It's especially\n    useful for error messages, documentation strings, or large\n    text data that needs to be easily editable and readable\n    within the code itself.\n    \"\"\"\n)\n\nprint(long_text)\n# Expected output will be the text, re-wrapped and dedented automatically by 'par'.\n# The exact wrapping depends on the internal logic of 'par'.\n\n# Example of usage within an exception message:\nclass CustomError(Exception):\n    def __init__(self, detail: str):\n        self.detail = detail\n\n    def __str__(self):\n        return par(\n            f\"\"\"\n            An error occurred: {self.detail}. This message is designed\n            to be human-readable and automatically formatted by 'par'.\n            The original issue was due to an unexpected input value.\n            Please review the input and try again.\n            \"\"\"\n        )\n\ntry:\n    raise CustomError(\"Invalid configuration file\")\nexcept CustomError as e:\n    print(e)","lang":"python","description":"The `par` function takes a multi-line string (often a triple-quoted string) and formats it, typically by dedenting and re-wrapping it to remove extraneous whitespace and improve readability. This is particularly useful for constructing human-readable messages or documentation within the code.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-18","installed_version":"1.0.1","pypi_latest":"1.0.1","is_stale":false,"summary":{"python_range":"3.10–3.9","success_rate":100,"avg_install_s":1.5,"avg_import_s":0,"wheel_type":"wheel"},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"paragraphs","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0,"mem_mb":0,"disk_size":"17.8M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"paragraphs","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":1.4,"import_time_s":0,"mem_mb":0,"disk_size":"18M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"paragraphs","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0,"mem_mb":0,"disk_size":"19.6M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"paragraphs","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":1.6,"import_time_s":0,"mem_mb":0,"disk_size":"20M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"paragraphs","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0,"mem_mb":0,"disk_size":"11.5M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"paragraphs","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":1.4,"import_time_s":0,"mem_mb":0,"disk_size":"12M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"paragraphs","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0,"mem_mb":0,"disk_size":"11.2M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"paragraphs","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":1.4,"import_time_s":0,"mem_mb":0,"disk_size":"12M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"paragraphs","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0,"mem_mb":0,"disk_size":"17.3M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"paragraphs","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":1.7,"import_time_s":0,"mem_mb":0,"disk_size":"18M"}]}}