Skip to main content

brick is a pure python templating system.

Project description

brick is a pure Python block-based templating system.

###Examples

Let’s see some example:

from brick import Block from brick.tags import *

class LikeButton(Block):

def construct(self):

b = []

with Div(class_=[‘like-btn’]).into(b):

b += A(href=”#”)(“Like”)

return b

like_button = LikeButton()

like_button.render_buffer() >> <div class=”like-btn”><a href=”#”>Like</a></div>

###Installation brick is an official PyPi module, so you can use it simply with pip by doing:

pip install brick

###PyPI Page [http://pypi.python.org/pypi/brick](http://pypi.python.org/pypi/brick)

###Inspiration This library is heavily inspired by the public description of Quora’s webnode2 found [here](http://www.quora.com/Shreyes-Seshasai/Posts/Tech-Talk-webnode2-and-LiveNode).

###License MIT 2.0

###Authors - Garindra Prahandono (garindraprahandono@gmail.com)

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

brick-0.0.1.tar.gz (4.4 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: brick-0.0.1.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for brick-0.0.1.tar.gz
Algorithm Hash digest
SHA256 b47915d1b975759a3df69d48e356b35aefe733f9ec971564afa14af58a8f6ff7
MD5 22c9f3e0ca25d349fc65c78bfc44c5d7
BLAKE2b-256 d6c6d2336d51a174bd335517abee7cb2b3a5554d75b4115c5a25c7a2d703eff7

See more details on using hashes here.

Supported by

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