Skip to main content

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:

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

listwrap-0.0.3.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

listwrap-0.0.3-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

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

Hashes for listwrap-0.0.3.tar.gz
Algorithm Hash digest
SHA256 9daf136f01c17062a97bf481ccefb77080e5d3de3fedf1e984e222d7288edbc4
MD5 07c670fceb361afb75d98939c258bab8
BLAKE2b-256 c86341e5f7dddfdae41fd120bb5a87b98430d411ca0c83e2443dc5b23b294224

See more details on using hashes here.

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

Hashes for listwrap-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2c7ed02c8ca4f63af3599d4c82de84fef672f0b3ef30bc218c70f852a6b95b37
MD5 f998b12443718715e5ede8916f75d077
BLAKE2b-256 419e12c965e06d14c4a9543d29412f21e413d00fda5c6e5ea2f5cb93e5835cbe

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page