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
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
346e9d7ded5b2053258c8449db50f9c0255570baa191eed013cb6cfded6d7d39
|
|
| MD5 |
2120cde6a86aa90d8092cf339c5ccd20
|
|
| BLAKE2b-256 |
1827d622748b04c708e55cc3a05fbff8706435a924557ad36a9d6f0f14a613bd
|
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: Egg
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
40d8dc24c5102b1d0e9f3777b38535f15abf482e0f9719a0cc3a39e734192e6a
|
|
| MD5 |
04ecff2f80c4146c153110b66f12a87b
|
|
| BLAKE2b-256 |
1ab3147efc90f00d05348c7fdec3748dd658902588008405f05aac8a01c64bd2
|
File details
Details for the file fstring_to_format-0.1.2-py3-none-any.whl.
File metadata
- Download URL: fstring_to_format-0.1.2-py3-none-any.whl
- Upload date:
- Size: 16.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b0a2e7f3a7197a025ebd12a3ad7847490cb8c239fd5cb2f0b2b532e1580938ca
|
|
| MD5 |
fd7685b5af33f22ecb93b11fb4ff3c5e
|
|
| BLAKE2b-256 |
e0cd998fd625ed2764589539acb05229825ea1a9da06a01f4d835914723fe06e
|
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: Egg
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
77b959d53f72bccc85a9bd45350718ddc610cba9790ca15884d5bb82d707d1f2
|
|
| MD5 |
2e02b9674e986ffb206107e9106e0cb6
|
|
| BLAKE2b-256 |
88fc5a1afb99bc35c632f957ab3109b3dd7002ab97c0560c06bb255adf5cffeb
|
File details
Details for the file fstring_to_format-0.1.2-py2-none-any.whl.
File metadata
- Download URL: fstring_to_format-0.1.2-py2-none-any.whl
- Upload date:
- Size: 16.4 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
805141ab0a578a47ba86ec6f7d190b7664c2995f729f595bcbb6fdfd178a6f33
|
|
| MD5 |
9b7eaa5676dc36a350f1fb2dd4031b4e
|
|
| BLAKE2b-256 |
bb86b16a7ccd9307d07e8089466101c6417a1eb06466b962481fad86996d6940
|