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 Distribution

revar-0.2.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

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

revar-0.2-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file revar-0.2.tar.gz.

File metadata

  • Download URL: revar-0.2.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • 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.2.tar.gz
Algorithm Hash digest
SHA256 4d22c2f062c67c15de229b1eca3a1c315d182de4d79b5e7f6cf3ae0befda716b
MD5 a129f973831cd6c1ef21c89edd95e44f
BLAKE2b-256 a1c35ab0bfe83341d1dda4e457bdbc7cbd543c07a8ad955a3bb71ec76df711cf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: revar-0.2-py3-none-any.whl
  • Upload date:
  • Size: 3.2 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 005dccf2214615d577d531293194484c77f479b80bc17aa18b008acee2aaa131
MD5 d0bfa9f6cf1857c9d8ec4205a855827a
BLAKE2b-256 0705249ebb3b076295af6e4c47de168b3dc6abdd80964baea8f020103085e825

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