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
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.0.tar.gz
(6.1 kB
view details)
Built Distribution
File details
Details for the file pyformatting-0.3.0.tar.gz
.
File metadata
- Download URL: pyformatting-0.3.0.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.3.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
63c59ad7095b6bcb8a5ab0830ef36e4955171db1ddac85dabe6781d1710cf010
|
|
MD5 |
763b52ce96be9f143802af9d4885c6cb
|
|
BLAKE2b-256 |
ad22e963c6a372e195d42da065ac34802b4b19eb7709683fefa03d1857821313
|
File details
Details for the file pyformatting-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: pyformatting-0.3.0-py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.3.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
0d15c2250865d268d189654f04a786f6d8e281a02ecba93b58638580bec7e56e
|
|
MD5 |
e088f508d44d77e3220fd898cecb3d5f
|
|
BLAKE2b-256 |
6fbae2bb9bd0ee4cbf0229cfa678002e1b44ed20a8bcd8cdb0fdfa9bd09b4979
|