Formatting lists of strings.
Project description
listwrap
Formatting lists of strings.
Use cases include subtasks of automatic config generation or any other highly structured context such as programmatically constructing human-readable SQL statements.
Links:
- Documentation
- We're on pypi (so
pip install listwrap)
Examples
>>> from listwrap import align
>>> print(align(["a", "b", "c"]))
"a",
"b",
"c",
>>> print(align(["a", "b", "c"], quote=None))
a,
b,
c,
>>> print(align(["a", "b", "c"], indent=1))
"a",
"b",
"c",
>>> print(align(["a", "b", "c"], indent=0, vertical=False))
"a","b","c",
Several formatting other options are supported; see the align method docstring.
Development
Create and activate a virtual env for dev ops:
git clone git@github.com:zkurtz/listwrap.git
cd listwrap
pip install uv
uv sync
source .venv/bin/activate
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file listwrap-0.0.3.tar.gz.
File metadata
- Download URL: listwrap-0.0.3.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9daf136f01c17062a97bf481ccefb77080e5d3de3fedf1e984e222d7288edbc4
|
|
| MD5 |
07c670fceb361afb75d98939c258bab8
|
|
| BLAKE2b-256 |
c86341e5f7dddfdae41fd120bb5a87b98430d411ca0c83e2443dc5b23b294224
|
File details
Details for the file listwrap-0.0.3-py3-none-any.whl.
File metadata
- Download URL: listwrap-0.0.3-py3-none-any.whl
- Upload date:
- Size: 3.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c7ed02c8ca4f63af3599d4c82de84fef672f0b3ef30bc218c70f852a6b95b37
|
|
| MD5 |
f998b12443718715e5ede8916f75d077
|
|
| BLAKE2b-256 |
419e12c965e06d14c4a9543d29412f21e413d00fda5c6e5ea2f5cb93e5835cbe
|