Skip to main content

Bambus Template Engine

Project description

Bambus Template Engine

Usage

import tambus

t = tambus.TambusEngine()

# rendering HTML
with open("/templates/index.html") as f:
    print(t.translate(f.read(), hello="world!"))

And if we assume that the content of /templates/index.html is:

<!DOCTYPE html>
<html lang="en">
<head>
    <title>MyPage</title>
</head>
<body>
    <h1> Hello {hello} </h1>
</body>
</html>

The output would be:

<!DOCTYPE html>
<html lang="en">
<head>
    <title>MyPage</title>
</head>
<body>
    <h1> Hello world! </h1>
</body>
</html>

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

tambus-0.0.1.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

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

tambus-0.0.1-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file tambus-0.0.1.tar.gz.

File metadata

  • Download URL: tambus-0.0.1.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for tambus-0.0.1.tar.gz
Algorithm Hash digest
SHA256 7f2ac5994b0dfc9a41dd844886b7687f7edf30fe2e5bd36a8ed69d94a11841a6
MD5 1f99422ddda7af2d5ea8de499d808ec9
BLAKE2b-256 e95840fc0c15fc9b6d1749069bf28e7ac0a7e46ba438ee16f9b9c548852514ac

See more details on using hashes here.

File details

Details for the file tambus-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: tambus-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for tambus-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ca13abfde89cbe6943fe5d3e506664389b32274a3f05a81c0c616b91f46ea26d
MD5 00884a088c9f16c73e1df66b8a637994
BLAKE2b-256 1d784a9533dc26f6dfba06751fa4220c661b0c126571b793d9441b92f79030ec

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