{ "info": { "author": "Shay Hill", "author_email": "shay_public@hotmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# paragraphs\n\nIncorporate long strings painlessly, beautifully into Python code.\n\n## Examples\n\n**Easily edited, `gq`-able, `fill-paragraph`-able, comprehensive error messages.**\n```python\nfrom paragraphs import par\n\nclass SuddenDeathError(Exception):\n def __init__(self, cause: str) -> None:\n self.cause = cause\n\n def __str__(self):\n return par(\n f\"\"\"\n Y - e - e - e - es, Lord love you! Why should she die of\n {self.cause}? She come through diphtheria right enough the year\n before.I saw her with my own eyes.Fairly blue with it, she was.They\n all thought she was dead; but my father he kept ladling gin down\n her throat til she came to so sudden that she bit the bowl off the\n spoon. \n\n What call would a woman with that strength in her have to die of\n {self.cause}? What become of her new straw hat that should have\n come to me? Somebody pinched it; and what I say is, them as pinched\n it done her in.\"\"\"\n )\n\nraise SuddenDeathError(\"influenza\")\n```\n\n**Nicely-formatted long string data. Spoilers for some old novels here,\nbut these ARE the original titles.**\n\n```python\nauthor2titles = {\n \"Samuel Penhallow\": [\n par(\n \"\"\"\n The history of the wars of New-England with the Eastern Indians;\n or, a narrative of their continued perfidy and cruelty, from the\n 10th of August, 1703, to the peace renewed 13th of July, 1713. And\n from the 25th of July, 1722, to their submission 15th December,\n 1725, which was ratified August 5th, 1726\"\"\"\n )\n ],\n \"Daniel Defoe\": [\n par(\n \"\"\"\n The Life and Strange Surprizing Adventures of Robinson Crusoe, Of\n York, Mariner: Who lived Eight and Twenty Years, all alone in an\n un-inhabited Island on the Coast of America, near the Mouth of the\n Great River of Oroonoque; Having been cast on Shore by Shipwreck,\n wherein all the Men perished but himself. With An Account how he\n was at last as strangely deliver'd by Pyrates\"\"\"\n ),\n par(\n \"\"\"The Fortunes and Misfortunes of the Famous Moll Flanders Who was\n born in Newgate, and during a life of continu\u00e2\u20ac\u2122d Variety for\n Threescore Years, besides her Childhood, was Twelve Years a Whore,\n five times a Wife (whereof once to her brother) Twelve Years a\n Thief, Eight Years a Transported Felon in Virginia, at last grew\n Rich, liv\u00e2\u20ac\u2122d Honest and died a Penitent\"\"\"\n ),\n ],\n}\n```\n\n## Installation\n```bash\npip install paragraphs\n```\n\n## Use\n\n```python\nfrom paragraphs import par\n\nPARAGRAPH = par(\"\"\"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed\n do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad\n minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex\n ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate\n velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat\n cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id\n est laborum.\"\"\")\n\n# the above is equivalent to\n\nPARAGRAPH = (\n \"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod\"\n \" tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim\"\n \" veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea\"\n \" commodo consequat. Duis aute irure dolor in reprehenderit in voluptate\"\n \" velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint\"\n \" occaecat cupidatat non proident, sunt in culpa qui officia deserunt\"\n \" mollit anim id est laborum.\")\n\n```\n\n## Features\n\nJoins lines. Removes indentation and leading whitespace.\n\n```python\nfrom paragraphs import par\n\npar('''\n Lorem ipsum dolor\n sit amet,'''\n)\n\n# yields\nLorem ipsum dolor sit amet,\n```\n\nSeparates paragraphs with double newline (`'\\n\\n'`).\n\n```python\nfrom paragraphs import par\n\npar '''\n Lorem ipsum dolor\n sit amet,\n\n consectetur\n adipiscing\n elit'''\n\n# yields\nLorem ipsum dolor sit amet,\n\nconsectetur adipiscing elit\n```\n\nRetains one trailing newline (if present).\n\n```python\n>>> par('''retains one trailing newline\n... ''')\nretains one trailing newline\n\n\n>>> par('''no trailing newline''')\nno trailing newline\n```\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ShayHill/paragraphs", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "paragraphs", "package_url": "https://pypi.org/project/paragraphs/", "platform": "", "project_url": "https://pypi.org/project/paragraphs/", "project_urls": { "Homepage": "https://github.com/ShayHill/paragraphs" }, "release_url": "https://pypi.org/project/paragraphs/1.0/", "requires_dist": null, "requires_python": "", "summary": "Incorporate long strings painlessly, beautifully into Python code.", "version": "1.0" }, "last_serial": 5502442, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "e41ddcd3892a767fbc39d4b8547b6413", "sha256": "6cafb01544531227e7f01f08a84905bb5fb3bc15c10a2a7dda0501375324e970" }, "downloads": -1, "filename": "paragraphs-1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "e41ddcd3892a767fbc39d4b8547b6413", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4769, "upload_time": "2019-07-08T18:13:18", "url": "https://files.pythonhosted.org/packages/04/0b/78415378a25b227ffff23a0a169b4072daf16589100837f824b29da881d9/paragraphs-1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8d49555582018d6a2d0750487523dbea", "sha256": "751d5b7abf17af1f5bc7f1e863a80cb0dd0f7640487866afe0f70a18683991ce" }, "downloads": -1, "filename": "paragraphs-1.0.tar.gz", "has_sig": false, "md5_digest": "8d49555582018d6a2d0750487523dbea", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5043, "upload_time": "2019-07-08T18:13:21", "url": "https://files.pythonhosted.org/packages/6c/cc/1443240d9b362ed481717d168ec742472eaf940d1a32eebffcfcbb638dd7/paragraphs-1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e41ddcd3892a767fbc39d4b8547b6413", "sha256": "6cafb01544531227e7f01f08a84905bb5fb3bc15c10a2a7dda0501375324e970" }, "downloads": -1, "filename": "paragraphs-1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "e41ddcd3892a767fbc39d4b8547b6413", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4769, "upload_time": "2019-07-08T18:13:18", "url": "https://files.pythonhosted.org/packages/04/0b/78415378a25b227ffff23a0a169b4072daf16589100837f824b29da881d9/paragraphs-1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8d49555582018d6a2d0750487523dbea", "sha256": "751d5b7abf17af1f5bc7f1e863a80cb0dd0f7640487866afe0f70a18683991ce" }, "downloads": -1, "filename": "paragraphs-1.0.tar.gz", "has_sig": false, "md5_digest": "8d49555582018d6a2d0750487523dbea", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5043, "upload_time": "2019-07-08T18:13:21", "url": "https://files.pythonhosted.org/packages/6c/cc/1443240d9b362ed481717d168ec742472eaf940d1a32eebffcfcbb638dd7/paragraphs-1.0.tar.gz" } ] }