Skip to main content

fstring_to_format converts Python f-string expressions to .format() for backwards compatibility.

Project description


PyPI version PyPI pyversions Python package codecov Codacy Badge PyPI download month PyPI download week PyPI download day GitHub all releases GitHub contributors CodeFactor Codacy Badge PyPI license

fstring_to_format converts Python f-string expressions to .format() for backwards compatibility.

There are other packages for this too, but this is a regular expression based cleaner solution.


Use the package manager pip to install fstring_to_format.

$ pip install fstring_to_format

# to make sure you have the latest version
$ pip install -U fstring_to_format

# latest available code base
$ pip install -U git+


$ python -m fstring_to_format # for a single file
$ python -m fstring_to_format *.py # for all Python files in a directory


Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.


GNU General Public License v3.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fstring_to_format-0.1.2.tar.gz (15.9 kB view hashes)

Uploaded source

Built Distributions

fstring_to_format-0.1.2-py3.10.egg (6.1 kB view hashes)

Uploaded 0 1 2

fstring_to_format-0.1.2-py3-none-any.whl (16.4 kB view hashes)

Uploaded py3

fstring_to_format-0.1.2-py2.7.egg (5.9 kB view hashes)

Uploaded 0 1 2

fstring_to_format-0.1.2-py2-none-any.whl (16.4 kB view hashes)

Uploaded py2

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