Formbar is a python library to layout, render and validate HTML forms in web applications. Formbar renders forms which are compatible with Twitter Bootstrap styles.
In contrast to many other form libraries forms with formbar are configured in XML files to separate the form definition form the implementation and handle it as configuration.
Formbar is the German word for “shapeable” and should emphasise the character of formbar which hopefully makes shaping your forms more easy.
Formbar is available as Pypi package. To install it use the following command:
<venv> pip install formbar
The source is availble on Bitbucket. You can check of the source and install the library with the following command:
(venv)> hg clone https://bitbucket.org/ti/formbar
(venv)> cd formbar
(venv)> python setup.py develop # use develop for development install
Tip
I recommend to install the library for testing issue in the virtual python environment. See Virtualenv documentation for more details.
You will not need much code to include formbar in your application to be able to render nice forms. Only a few lines of code are needed:
from formbar.config import Config, load
from formbar.form import Form
# Simple rendering here, no data submission
# nor validation or saving.
config = Config(load('/path/to/formconfig.xml'))
form_config = config.get_form('example')
form = Form(form_config)
form.render()
Formbar is licensed with under the GNU general public license version 2.
Torsten Irländer <torsten at irlaender dot de>