fstring_to_format converts Python f-string expressions to .format() for backwards compatibility.
Project description
fstring_to_format
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
Project details
Release history Release notifications | RSS feed
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)
Built Distributions
Close
Hashes for fstring_to_format-0.1.2-py3.10.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 40d8dc24c5102b1d0e9f3777b38535f15abf482e0f9719a0cc3a39e734192e6a |
|
MD5 | 04ecff2f80c4146c153110b66f12a87b |
|
BLAKE2b-256 | 1ab3147efc90f00d05348c7fdec3748dd658902588008405f05aac8a01c64bd2 |
Close
Hashes for fstring_to_format-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0a2e7f3a7197a025ebd12a3ad7847490cb8c239fd5cb2f0b2b532e1580938ca |
|
MD5 | fd7685b5af33f22ecb93b11fb4ff3c5e |
|
BLAKE2b-256 | e0cd998fd625ed2764589539acb05229825ea1a9da06a01f4d835914723fe06e |
Close
Hashes for fstring_to_format-0.1.2-py2.7.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77b959d53f72bccc85a9bd45350718ddc610cba9790ca15884d5bb82d707d1f2 |
|
MD5 | 2e02b9674e986ffb206107e9106e0cb6 |
|
BLAKE2b-256 | 88fc5a1afb99bc35c632f957ab3109b3dd7002ab97c0560c06bb255adf5cffeb |
Close
Hashes for fstring_to_format-0.1.2-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 805141ab0a578a47ba86ec6f7d190b7664c2995f729f595bcbb6fdfd178a6f33 |
|
MD5 | 9b7eaa5676dc36a350f1fb2dd4031b4e |
|
BLAKE2b-256 | bb86b16a7ccd9307d07e8089466101c6417a1eb06466b962481fad86996d6940 |