Pyformatting is a collection of useful formatting features.
Project description
pyformatting
Pyformatting is a collection of useful formatting features.
>>> from pyformatting import optional_format, defaultformatter
>>> optional_format('{:.3f}{other:.5f}{}', .12345)
'0.123{other:.5f}{}'
>>> optional_format('{0[0]}{1!a}{2}{0[1]!r}', 'cool')
"c{1!a}{2}'o'"
>>> default_format = defaultformatter(str)
>>> default_format('{nothing}{data}{quotes!r}', data={1: 2})
"{1: 2}''"
Installing Pyformatting
Pyformatting is available on PyPI:
python -m pip install -U pyformatting
Supported Versions
Pyformatting supports Python 3.1+.
Development Status
Pre-Alpha
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
pyformatting-0.3.1.tar.gz
(6.1 kB
view hashes)
Built Distribution
Close
Hashes for pyformatting-0.3.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c602dce1bff3e51a94918a4dd33847c341823c4971efcb185b2b2230fdb3a477 |
|
MD5 | 9e208192937b180db1339428a3891b90 |
|
BLAKE2b-256 | b1a20e1e32d7db4c21162e39c26fa498afb75ace86a8b42ed58de3d3fbeaab38 |