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.2.tar.gz (15.9 kB view details)

Uploaded Source

Built Distributions

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

Uploaded Source

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

Uploaded Python 3

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

Uploaded Source

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

Uploaded Python 2

File details

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

File metadata

  • Download URL: fstring_to_format-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 346e9d7ded5b2053258c8449db50f9c0255570baa191eed013cb6cfded6d7d39
MD5 2120cde6a86aa90d8092cf339c5ccd20
BLAKE2b-256 1827d622748b04c708e55cc3a05fbff8706435a924557ad36a9d6f0f14a613bd

See more details on using hashes here.

File details

Details for the file fstring_to_format-0.1.2-py3.10.egg.

File metadata

  • Download URL: fstring_to_format-0.1.2-py3.10.egg
  • Upload date:
  • Size: 6.1 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.2-py3.10.egg
Algorithm Hash digest
SHA256 40d8dc24c5102b1d0e9f3777b38535f15abf482e0f9719a0cc3a39e734192e6a
MD5 04ecff2f80c4146c153110b66f12a87b
BLAKE2b-256 1ab3147efc90f00d05348c7fdec3748dd658902588008405f05aac8a01c64bd2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fstring_to_format-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b0a2e7f3a7197a025ebd12a3ad7847490cb8c239fd5cb2f0b2b532e1580938ca
MD5 fd7685b5af33f22ecb93b11fb4ff3c5e
BLAKE2b-256 e0cd998fd625ed2764589539acb05229825ea1a9da06a01f4d835914723fe06e

See more details on using hashes here.

File details

Details for the file fstring_to_format-0.1.2-py2.7.egg.

File metadata

  • Download URL: fstring_to_format-0.1.2-py2.7.egg
  • Upload date:
  • Size: 5.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.2-py2.7.egg
Algorithm Hash digest
SHA256 77b959d53f72bccc85a9bd45350718ddc610cba9790ca15884d5bb82d707d1f2
MD5 2e02b9674e986ffb206107e9106e0cb6
BLAKE2b-256 88fc5a1afb99bc35c632f957ab3109b3dd7002ab97c0560c06bb255adf5cffeb

See more details on using hashes here.

File details

Details for the file fstring_to_format-0.1.2-py2-none-any.whl.

File metadata

File hashes

Hashes for fstring_to_format-0.1.2-py2-none-any.whl
Algorithm Hash digest
SHA256 805141ab0a578a47ba86ec6f7d190b7664c2995f729f595bcbb6fdfd178a6f33
MD5 9b7eaa5676dc36a350f1fb2dd4031b4e
BLAKE2b-256 bb86b16a7ccd9307d07e8089466101c6417a1eb06466b962481fad86996d6940

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