Skip to main content

Replace specific values ​​with custom variables

Project description

revar

PyPI PyPI - License Code style: black

Replace specific values ​​with custom variables

Installation

pip3 install revar

Examples

Input

import revar
text = "Hello, $username$\nNice to meet $who$"
output = revar.replace(text, {"$username$": "decave27", "$who$": "you"})
print(output)

Output

Hello, decave27
Nice to meet you

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

revar-0.1-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

Details for the file revar-0.1-py3-none-any.whl.

File metadata

  • Download URL: revar-0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.9.2

File hashes

Hashes for revar-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 73005c886b54be491ca4a17bee26fd744a85f4357928d3a346ea4017d04831a4
MD5 d91796e5aff0c492b199a15ef0f8a593
BLAKE2b-256 2f6661376dff0ecb152ee1ab485f87c6f05290cc31d8ea9881e9807c02a18ce0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page