{
"info": {
"author": "Philip Olson",
"author_email": "philip.olson@pm.me",
"bugtrack_url": null,
"classifiers": [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7"
],
"description": "# Tedent\n\nKeep your multi-line templated strings lookin' good :sunglasses:\n\n*This is a python version of [tedent](https://github.com/olsonpm/tedent)*\n\n
\n\n\n\n**Table of Contents**\n\n- [What is it?](#what-is-it)\n- [What does the name stand for?](#what-does-the-name-stand-for)\n- [Why create it?](#why-create-it)\n- [Simple Usage](#simple-usage)\n- [Questions about how the indentation works?](#questions-about-how-the-indentation-works)\n- [Important Usage Notes](#important-usage-notes)\n - [input requirements](#edge-cases-and-input-requirements)\n- [Test](#test)\n\n\n\n
\n\n### What is it?\n\n- A function similar to [dedent](https://docs.python.org/3.7/library/textwrap.html#textwrap.dedent)\n just with different semantics\n\n
\n\n### What does the name stand for?\n\n- `Te`mplate string\n- in`dent`ation\n\nnames are hard\n\n
\n\n### Why create it?\n\n- dedent didn't handle the following case like I wanted\n\n```py\nformattedBoroughs = f\"\"\"\\\n[\n 'Brooklyn',\n 'Manhattan',\n]\n\"\"\"\n\nprint(\n dedent(\n f\"\"\"\\\n New York boroughs\n ${formattedBoroughs}\n \"\"\"\n )\n)\n\n#\n# expected:\n# New York boroughs\n# [\n# 'Brooklyn',\n# 'Manhattan',\n# ]\n#\n# actual:\n# New York boroughs\n# [\n# 'Brooklyn',\n# 'Manhattan',\n# ]\n#\n```\n\n
\n\n### Simple Usage\n\n```py\nimport tedent from 'tedent'\n\n#\n# *note the lack of the backslash\n#\nprint(\n tedent(\n \"\"\"\n This will be indented\n as you expect\n \"\"\"\n )\n)\n\n# writes:\n# This will be indented\n# as you expect\n```\n\n
\n\n### Questions about how the indentation works?\n\nBecause the indentation logic is both young and convoluted, please refer to\n[the code](tedent/index.py) and [tests](tests/simple.py) for details. The\nlibrary is not that big and if you have any questions please create a\ngithub issue.\n\n
\n\n### Important Usage Notes\n\n- First of all, this library doesn't handle tabs. I will accept a PR\n with support\n\n- Secondly, if you always use `tedent` like the following\n\n ```py\n tedent(\n \"\"\"\n some text\n \"\"\"\n )\n ```\n\n then you shouldn't run into any issues. However we all know input can be\n tricky so `tedent` has a few input requirements in order to format your\n string properly.\n\n#### input requirements\n\n- if the argument isn't a string then an error will be thrown\n- if you pass a string with three or more newlines, then\n - the first and last lines must contain only whitespace\n - the second line must contain a non-whitespace character\n - _an error will be thrown if the above two conditions are not met_\n- if you pass a string with fewer than 3 newlines\n - if they only contain whitespace then an empty string is returned\n - otherwise an error is thrown\n- finally, all trailing whitespace from the result is stripped\n\nIf you have questions please raise a github issue.\n\n
\n\n### Test\n\n```py\n#\n# you must have poetry installed\n#\n$ poetry shell\n$ poetry install\n$ python runTests.py\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/olsonpm/py_tedent",
"keywords": "",
"license": "",
"maintainer": "Philip Olson",
"maintainer_email": "philip.olson@pm.me",
"name": "tedent",
"package_url": "https://pypi.org/project/tedent/",
"platform": "",
"project_url": "https://pypi.org/project/tedent/",
"project_urls": {
"Homepage": "https://github.com/olsonpm/py_tedent",
"Repository": "https://github.com/olsonpm/py_tedent"
},
"release_url": "https://pypi.org/project/tedent/0.1.5/",
"requires_dist": null,
"requires_python": ">=3.7,<4.0",
"summary": "like dedent but more flexible",
"version": "0.1.5"
},
"last_serial": 5289413,
"releases": {
"0.1.0": [
{
"comment_text": "",
"digests": {
"md5": "5463f6b5fea743df378ae8b56386e57d",
"sha256": "390e0bfea7ee723053f00e4fc6a3ba3d0996792c368045fde1dcada3c49605b9"
},
"downloads": -1,
"filename": "tedent-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5463f6b5fea743df378ae8b56386e57d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7,<4.0",
"size": 31893,
"upload_time": "2019-01-21T03:23:58",
"url": "https://files.pythonhosted.org/packages/84/43/e97f091a946ef4e8d3b7ce960d269557d5e0ac8e6a3a9c3f5246c9c8f3a3/tedent-0.1.0-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "be0734eb4cf7133070e227cf96a9e003",
"sha256": "380547c77fe6ea412df311f03d90833d3395da113bb7d9e49f484cf656d439c3"
},
"downloads": -1,
"filename": "tedent-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "be0734eb4cf7133070e227cf96a9e003",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7,<4.0",
"size": 10954,
"upload_time": "2019-01-21T03:24:01",
"url": "https://files.pythonhosted.org/packages/26/7a/196fb04883c989a66c99857d02a3903a10011d2f2640b3f1a0b1c14e4472/tedent-0.1.0.tar.gz"
}
],
"0.1.1": [
{
"comment_text": "",
"digests": {
"md5": "6d7d279fed7f4615144cf3cc6e7d3068",
"sha256": "b83bb8eba0a8c53b1597e3c18a0cefdaeeb83cf64d3f6ca5e5973195778a9eec"
},
"downloads": -1,
"filename": "tedent-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6d7d279fed7f4615144cf3cc6e7d3068",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7,<4.0",
"size": 31889,
"upload_time": "2019-01-21T03:36:01",
"url": "https://files.pythonhosted.org/packages/e8/7f/5f710eb2f77bc2368e52b98fb09f5b5eb55314d5324fcab65c3405165c0e/tedent-0.1.1-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "8f0ce7e9fc1c4e740504355ada31e2b6",
"sha256": "a2565f469f9044c9f6117962bea67da6ee3b71e112d055128414ba86c15ca1ae"
},
"downloads": -1,
"filename": "tedent-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "8f0ce7e9fc1c4e740504355ada31e2b6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7,<4.0",
"size": 10951,
"upload_time": "2019-01-21T03:36:03",
"url": "https://files.pythonhosted.org/packages/08/66/30a58c3ad7d56d9e18b150251f006d5a9a2f16aa554af546ae126fc12d6e/tedent-0.1.1.tar.gz"
}
],
"0.1.2": [
{
"comment_text": "",
"digests": {
"md5": "89f2bcefed27f5679002a18de86f302f",
"sha256": "fc74bfede76890598da5d9398732c5b6c473ad63773b941d2065f2187d61ba2e"
},
"downloads": -1,
"filename": "tedent-0.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "89f2bcefed27f5679002a18de86f302f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7,<4.0",
"size": 104951,
"upload_time": "2019-05-19T18:42:44",
"url": "https://files.pythonhosted.org/packages/68/3a/7b1158f81ab574a6dde421ed04a7edcce83feb44d79aba2dea3881abfe41/tedent-0.1.2-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "d453cc2a2b622c0d69b0565128904f01",
"sha256": "5bff5383a0998cc85441a168139386e2ab90bab4eea399b9cd3170420d776dd3"
},
"downloads": -1,
"filename": "tedent-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "d453cc2a2b622c0d69b0565128904f01",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7,<4.0",
"size": 92561,
"upload_time": "2019-05-19T18:42:46",
"url": "https://files.pythonhosted.org/packages/2e/df/58508ba5ddd9184104516cec8424e0657a05b72ce2bb1fb0125f12a6b7b1/tedent-0.1.2.tar.gz"
}
],
"0.1.3": [
{
"comment_text": "",
"digests": {
"md5": "937b3d68eabbbf42606585398bda467a",
"sha256": "cfb8b82cba4bb695921f0df731487ab0360e776ccf6dd1dd039dc79374de7eb7"
},
"downloads": -1,
"filename": "tedent-0.1.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "937b3d68eabbbf42606585398bda467a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7,<4.0",
"size": 104950,
"upload_time": "2019-05-19T19:12:13",
"url": "https://files.pythonhosted.org/packages/eb/0d/3729b577b306834823e38837ff04f0bbb1382e87a049865e71ad298e196c/tedent-0.1.3-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "2b254a88de0bbb76ef427647a086769b",
"sha256": "ef15105222265d4b9d0cdb75bc05be234c76434b63217a8d069cf8cba5f60078"
},
"downloads": -1,
"filename": "tedent-0.1.3.tar.gz",
"has_sig": false,
"md5_digest": "2b254a88de0bbb76ef427647a086769b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7,<4.0",
"size": 92572,
"upload_time": "2019-05-19T19:12:14",
"url": "https://files.pythonhosted.org/packages/95/18/d3d444a8fdd042ddb92497830abe58b9ad2e571fa1406127bd1f4c25f76a/tedent-0.1.3.tar.gz"
}
],
"0.1.4": [
{
"comment_text": "",
"digests": {
"md5": "971e07a4105964b1d12a8720bc2af712",
"sha256": "5b51ec6392fe71853bdb12babeb93eb8ae1cadc8a7461531890deba1a9d84393"
},
"downloads": -1,
"filename": "tedent-0.1.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "971e07a4105964b1d12a8720bc2af712",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7,<4.0",
"size": 105106,
"upload_time": "2019-05-19T19:56:22",
"url": "https://files.pythonhosted.org/packages/36/36/7ebf6d01f5a606d1f3e693f142ccb210ce4455020450dd3716aa039d5eb2/tedent-0.1.4-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "0fcf11870f2ced7d7b4aec37f64ad516",
"sha256": "b14f5fdaec74a9caef96c843bdbdc70626e288cbd9143f34f52aa9df64154b42"
},
"downloads": -1,
"filename": "tedent-0.1.4.tar.gz",
"has_sig": false,
"md5_digest": "0fcf11870f2ced7d7b4aec37f64ad516",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7,<4.0",
"size": 92574,
"upload_time": "2019-05-19T19:56:24",
"url": "https://files.pythonhosted.org/packages/53/72/384f04f5b070e03b8f50dc27bc374fa774e67d3f088216cc9c42de605ed8/tedent-0.1.4.tar.gz"
}
],
"0.1.5": [
{
"comment_text": "",
"digests": {
"md5": "6802b965b3ca19929e64ad5db1d73d85",
"sha256": "18a7a63a2b1fe0bf9d082fad91c25b74594a619726ed0115bbec840670f6f07c"
},
"downloads": -1,
"filename": "tedent-0.1.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6802b965b3ca19929e64ad5db1d73d85",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7,<4.0",
"size": 105106,
"upload_time": "2019-05-19T20:05:20",
"url": "https://files.pythonhosted.org/packages/52/57/97acbfdd8ef41d412c2003bf2b5543e8c49a10521f0cfda45063d6a5077a/tedent-0.1.5-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "599e45891fe9a9b8e5fbaf1ab22e21d1",
"sha256": "3042e20657db02c0dd55a6a1df566a18280b1dd6713aeeb25f62e42aceae8a14"
},
"downloads": -1,
"filename": "tedent-0.1.5.tar.gz",
"has_sig": false,
"md5_digest": "599e45891fe9a9b8e5fbaf1ab22e21d1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7,<4.0",
"size": 92570,
"upload_time": "2019-05-19T20:05:21",
"url": "https://files.pythonhosted.org/packages/2d/22/3154eb0e3b645e35214d2ac1ee7cf5963ec2007b155093dd4fc1935175f9/tedent-0.1.5.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "6802b965b3ca19929e64ad5db1d73d85",
"sha256": "18a7a63a2b1fe0bf9d082fad91c25b74594a619726ed0115bbec840670f6f07c"
},
"downloads": -1,
"filename": "tedent-0.1.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6802b965b3ca19929e64ad5db1d73d85",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7,<4.0",
"size": 105106,
"upload_time": "2019-05-19T20:05:20",
"url": "https://files.pythonhosted.org/packages/52/57/97acbfdd8ef41d412c2003bf2b5543e8c49a10521f0cfda45063d6a5077a/tedent-0.1.5-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "599e45891fe9a9b8e5fbaf1ab22e21d1",
"sha256": "3042e20657db02c0dd55a6a1df566a18280b1dd6713aeeb25f62e42aceae8a14"
},
"downloads": -1,
"filename": "tedent-0.1.5.tar.gz",
"has_sig": false,
"md5_digest": "599e45891fe9a9b8e5fbaf1ab22e21d1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7,<4.0",
"size": 92570,
"upload_time": "2019-05-19T20:05:21",
"url": "https://files.pythonhosted.org/packages/2d/22/3154eb0e3b645e35214d2ac1ee7cf5963ec2007b155093dd4fc1935175f9/tedent-0.1.5.tar.gz"
}
]
}