Bambus Template Engine
Project description
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
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
tambus-0.2.0.tar.gz
(2.9 kB
view details)
Built Distribution
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 tambus-0.2.0.tar.gz.
File metadata
- Download URL: tambus-0.2.0.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
91299c14648405ae60af8fbdcc8ae87e3832812e6bbae04d6788f20174f78886
|
|
| MD5 |
f403e287281c8f2b196313bf2f78bf8c
|
|
| BLAKE2b-256 |
9ea4b7155c14f6a14c0594562ca07d3283dbd96532b5719313b5ac485e1f8c12
|
File details
Details for the file tambus-0.2.0-py3-none-any.whl.
File metadata
- Download URL: tambus-0.2.0-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cbd93d56a2a73a07a1357fee54b0ebc43a73d382c916c4fc73603fd242fefe0a
|
|
| MD5 |
3dc46cfd51f24d21750342b878a72892
|
|
| BLAKE2b-256 |
a875fec2d053e3ad2ef9d7fa81fd79ba99ac6542d97e351139fac89e58a6b219
|