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
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.3.tar.gz
(6.1 kB
view hashes)
Built Distribution
Close
Hashes for pyformatting-0.3.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8044950760ba3c5e922eaa2e066109c4e821a4417fe972998aa4745feb913018 |
|
MD5 | 4c32464e629b6446ae8ff631b0246aa0 |
|
BLAKE2b-256 | 43830130eb43419d274dc2282b81119064015c79ce143aabecb8263b7d761099 |