Skip to main content

Bambus Template Engine

Project description

Bambus Template Engine

Usage

To get started, follow the example below to render a template:

import tambus

t = tambus.TambusEngine()

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

Imagine the content of /templates/index.html is as follows:

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

The output would be:

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

Contribution Guidelines

Contributions to Tambus are welcome! If you have any bug fixes, improvements, or new features to add, please submit a pull request. Make sure to follow the coding style and include tests for any new functionality.

License

Tambus is licensed under the MIT License. See the LICENSE file for more information.

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-1.0.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

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

tambus-1.0.0-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for tambus-1.0.0.tar.gz
Algorithm Hash digest
SHA256 f2137b6624281e5883bda87b0f6339e1704a61b096d2da4469e1f94c07c58828
MD5 49c5d4f414d2553b1b4802023672746a
BLAKE2b-256 3c283ea2122240be5076688def464fa09c2cdf8876e68b549aa79a25aac13d3f

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for tambus-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 76ad32a87d6093ffc2d54c44719a45741401e783b18016bd5678ac3adf0d0c88
MD5 584b015aeda89dd2af1fc19bf2590dde
BLAKE2b-256 a086010a4d421d605f999f31a919519781cfbfa71e8de36351fa9e0052be8ac6

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