Skip to main content

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 and Supported Versions

Pyformatting is available on PyPI:

python -m pip install -U pyformatting

Pyformatting supports Python 3.1+.

Development Status

Pre-Alpha

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

pyformatting-0.3.0.tar.gz (6.1 kB view hashes)

Uploaded Source

Built Distribution

pyformatting-0.3.0-py3-none-any.whl (9.1 kB view hashes)

Uploaded Python 3

Supported by

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