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.2.tar.gz
(6.1 kB
view hashes)
Built Distribution
Close
Hashes for pyformatting-0.3.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0288863ad5d393a8439439bd4e6a77b6ec729a5652772e3d30208d826a72c8c3 |
|
MD5 | 38202785c56e2b75b5f8f7a19f57e7af |
|
BLAKE2b-256 | 0a1de6763f4624a2d4b75ab5329d89bea892d756f599bbb8ff0c137e9c8c8834 |