https://github.com/0dminnimda/pyformatting
Pyformatting is a collection of useful formatting features.
https://github.com/0dminnimda/pyformatting
default-format default-formatting format formatter formatting optional-format optional-formatting python-format python-formatter python-formatting
Last synced: 18 days ago
JSON representation
Pyformatting is a collection of useful formatting features.
- Host: GitHub
- URL: https://github.com/0dminnimda/pyformatting
- Owner: 0dminnimda
- License: mit
- Created: 2020-08-27T14:40:34.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-02-07T13:20:29.000Z (over 4 years ago)
- Last Synced: 2025-05-26T17:06:11.080Z (about 1 month ago)
- Topics: default-format, default-formatting, format, formatter, formatting, optional-format, optional-formatting, python-format, python-formatter, python-formatting
- Language: Python
- Homepage:
- Size: 48.8 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# pyformatting
**Pyformatting** is a collection of useful formatting features.
```python
>>> 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:
```console
python -m pip install -U pyformatting
```## Supported Versions
Pyformatting supports Python 3.1+.
## Development Status
Alpha