Skip to main content

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

Project description

fstring_to_format

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.

Installation

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+https://github.com/eftalgezer/fstring_to_format.git

Usage

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

Contributing

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.

License

GNU General Public License v3.0

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

fstring_to_format-0.1.0.tar.gz (15.9 kB view details)

Uploaded Source

Built Distribution

fstring_to_format-0.1.0-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

File details

Details for the file fstring_to_format-0.1.0.tar.gz.

File metadata

  • Download URL: fstring_to_format-0.1.0.tar.gz
  • Upload date:
  • Size: 15.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.7

File hashes

Hashes for fstring_to_format-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1e2eeaccb81fb64cfccb381a773f4841d6656fe9b6097e3a96b2367f141b6ccc
MD5 55a7ec5cd32f9197f46877416e4f59f9
BLAKE2b-256 77961dda36bdfa97ab7c40e1aa2550f291f2bb149be12370d4fdeb552329c2d6

See more details on using hashes here.

File details

Details for the file fstring_to_format-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for fstring_to_format-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aaba7ccc6439d6818ab8c53864e6045947b177a7a23e9d420e4d15d3b4e2e97e
MD5 cc731c2fb78cc311f86829714e757bfa
BLAKE2b-256 b051b9811c6fb7e0d1aa6ef069b31d64ae02882bcaecd3c7316598135718f972

See more details on using hashes here.

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