Skip to main content
https://travis-ci.org/moreati/formatist.svg?branch=master

A Python library to convert from older % style format strings, to newer {} style.

>>> import formatist
>>> greeting = "Hello %(name)s. It's %(temp).1f C"
>>> print(greeting % {'name': 'Alice', 'temp': 23.45678})
Hello Alice. It's 23.5 C
>>> greeting2 = formatist.convert(greeting)
>>> print(greeting2)
Hello {name!s:}. It's {temp:>.1f} C
>>> print(greeting2.format(name='Alice', temp=23.45678))
Hello Alice. It's 23.5 C

Metadata

Release files for formatist 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for formatist 0.0.2
File Size Uploaded
formatist-0.0.2.tar.gz 2.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for formatist 0.0.2
File Interpreter ABI Platform
formatist-0.0.2-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 8.4 kB

Release files / formatist-0.0.2.tar.gz

Download URL formatist-0.0.2.tar.gz
Size 2.1 kB
Tags Source
SHA-256 checksum
How to use checksums
90200ee343672ba7cc57ccf102733a50b11f48672551f29f93bdcbb58aa225b3
BLAKE2b-256 checksum
How to use checksums
01a2fc652fc86bbb2c8fea05171b3b07fad0c80a883b20577cf40d9b91c6e634
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / formatist-0.0.2-py2.py3-none-any.whl

Download URL formatist-0.0.2-py2.py3-none-any.whl
Size 6.3 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
39fe9226e6ef6337916a149c9755df1bb1b5f4751452f9a95cf8cfd2ca7369d0
BLAKE2b-256 checksum
How to use checksums
f8e3cb5fa8374e895f1e9fb15ae3f69b53c9fb7a9b406e601ba00d43ef92a81e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page