Name | list-fmt JSON |
Version |
0.0.1
JSON |
| download |
home_page | |
Summary | Format Iterables |
upload_time | 2023-02-02 11:02:38 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.7 |
license | MIT |
keywords |
formatting
human
iterable
list
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
list-fmt
========
Format iterables into human readable text.
Installation
------------
```bash
pip install list-fmt
```
Basic Usage
-----------
```python
>>> from listfmt import join_with
>>> L = ["one", "two", "three"]
>>> join_with(L, join_last = " and ")
'one, two and three'
>>>
>>> from listfmt import strjoin
>>> strjoin(", ", [1, 2, 3])
'1, 2, 3'
>>>
>>> from list import ordered_list
>>> print(ordered_list(["one", "two", "three"], style = "A"))
A. one
B. two
C. three
>>>
>>> from listfmt import unordered_list
>>> print(unordered_list(["one", "two", ["a", "b"], "three"], recursive = True))
* one
* two
* a
* b
* three
>>>
```
Links
-----
* [Repository](https://github.com/phoenixr-codes/list-fmt/)
* [Documentation](https://phoenixr-codes.github.io/list-fmt/)
* [PyPI](https://pypi.org/project/list-fmt)
Raw data
{
"_id": null,
"home_page": "",
"name": "list-fmt",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "Formatting,Human,Iterable,List",
"author": "",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/36/9f/34840595e2e44a7dcba705d56fafac2d2532d5d6a1ea25a2e4ef085e6532/list-fmt-0.0.1.tar.gz",
"platform": null,
"description": "list-fmt\n========\n\nFormat iterables into human readable text.\n\n\nInstallation\n------------\n\n```bash\npip install list-fmt\n```\n\nBasic Usage\n-----------\n\n```python\n>>> from listfmt import join_with\n>>> L = [\"one\", \"two\", \"three\"]\n>>> join_with(L, join_last = \" and \")\n'one, two and three'\n>>> \n>>> from listfmt import strjoin\n>>> strjoin(\", \", [1, 2, 3])\n'1, 2, 3'\n>>> \n>>> from list import ordered_list\n>>> print(ordered_list([\"one\", \"two\", \"three\"], style = \"A\"))\nA. one\nB. two\nC. three\n>>> \n>>> from listfmt import unordered_list\n>>> print(unordered_list([\"one\", \"two\", [\"a\", \"b\"], \"three\"], recursive = True))\n* one\n* two\n * a\n * b\n* three\n>>> \n```\n\nLinks\n-----\n\n* [Repository](https://github.com/phoenixr-codes/list-fmt/)\n* [Documentation](https://phoenixr-codes.github.io/list-fmt/)\n* [PyPI](https://pypi.org/project/list-fmt)\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Format Iterables",
"version": "0.0.1",
"split_keywords": [
"formatting",
"human",
"iterable",
"list"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "86359295c63bf677455d3860d21f66e096a7d58d2f18d637a97b52836219d221",
"md5": "36d72ea2f1a0f6624d0a57ad59ce8370",
"sha256": "1d36d4ff350a1be03f4a214ccd14160d862f20cf45e68930646b4b388e52887b"
},
"downloads": -1,
"filename": "list_fmt-0.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "36d72ea2f1a0f6624d0a57ad59ce8370",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 3594,
"upload_time": "2023-02-02T11:02:36",
"upload_time_iso_8601": "2023-02-02T11:02:36.883858Z",
"url": "https://files.pythonhosted.org/packages/86/35/9295c63bf677455d3860d21f66e096a7d58d2f18d637a97b52836219d221/list_fmt-0.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "369f34840595e2e44a7dcba705d56fafac2d2532d5d6a1ea25a2e4ef085e6532",
"md5": "7777ccfb73a8caea2ba4a18e3521adf3",
"sha256": "c571bc94393c303f4e520ad1539304b834d082865d7de5534d9e122bc5ee7a01"
},
"downloads": -1,
"filename": "list-fmt-0.0.1.tar.gz",
"has_sig": false,
"md5_digest": "7777ccfb73a8caea2ba4a18e3521adf3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 3570,
"upload_time": "2023-02-02T11:02:38",
"upload_time_iso_8601": "2023-02-02T11:02:38.641783Z",
"url": "https://files.pythonhosted.org/packages/36/9f/34840595e2e44a7dcba705d56fafac2d2532d5d6a1ea25a2e4ef085e6532/list-fmt-0.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-02-02 11:02:38",
"github": false,
"gitlab": false,
"bitbucket": false,
"lcname": "list-fmt"
}