-
Welcome to Muntjac
Web Application GUI Toolkit
Muntjac is a translation of Vaadin to the Python programming language. It is similar to GUI toolkits for desktop applications, such as PyQT, wxPython and PyGTK. However, it can be used to create dynamic, browser independent, web applications. There is no need to write HTML, Javascript or RPC code, just server-side Python.
Code Examples
-
Hello World – The classic example
HelloWorld.py • Run the app » -
Calculator – Simple logic & event handling
Calc.py • Run the app »
Rich Widget Set
Muntjac includes a wide range of widgets and layout types. Styling is achieved using CSS.
-
Sampler – Core component examples
Run the app » -
Simple Address Book
Run the app » -
Muntjac Tunes – CSS styling example
Run the app »
Add-ons
In addition to the core UI components some useful widgets from the Vaadin add-on directory are provided with Muntjac.-
ColorPicker – Popup window for selecting colors
Run the app » -
GoogleMap
Run the app » -
CodeMirror – Code editor with syntax highlighing
Run the app »
-
-
Download & Install
Python Implementations
Muntjac is written in pure Python and does not currently have any C extensions. It has been tested on:
- CPython v2.7,
- PyPy v1.6 and
- Iron Python v2.7
It is also possible to run Muntjac applications on Google App Engine.
Minimal Dependencies
To run Muntjac you must install:
- Paste – WSGI tools
- Paste WebKit – WSGI servlet implementation
- Babel – Internationalization utilities
To run the test suite you must also install:
- Mox – Mock object framework
All of these libraries are pure Python and available from the PyPI.
Cheese Shop
Muntjac is available from PyPI and can be installed with setuptools, disutils or pip, for example:
$ easy_install muntjac
Alternatively, you can download the Muntjac source archive and run the setup file directly:$ python setup.py install
Windows users may prefer to download and run the installer. -
Quick Start
Running Locally
Installing Muntjac will create a muntjac command on your path. To run the test suite type:
$ muntjac -t
Otherwise, running the command will start a demo server. To list the available options type:$ muntjac -h
Sampler Widget Set
Muntjac includes only a default widget set as standard. The sampler demo requires additional themes and widget sets. To run the sampler first download both the default and sampler widget sets. Then extract them to the same directory.Then point muntjac to the new VAADIN directory using:
$ muntjac --contextRoot=/path/to/VAADIN/directory
Note that the value is not the VAADIN directory itself, but the parent directory that contains it.Simple Application
To create a Muntjac application first define a subclass of Application:
class HelloWorld(Application): def init(self): main = Window('Hello window') self.setMainWindow(main) main.addComponent(Label('Hello World!'))
Pass the new class to ApplicationServlet, wrap the resulting WSGI application in Paste session middleware and serve:wsgi_app = ApplicationServlet(HelloWorld, debug=True) wsgi_app = paste.session.SessionMiddleware(wsgi_app) httpd = make_server('localhost', 8080, wsgi_app) httpd.serve_forever()
Navigate your browser to http://localhost:8080/. For further information please refer to the API documentation and the Vaadin documentation. -
Community & Support
Mailing List
The mailing list a good place to ask questions, help others, discuss ideas or just share new projects.
Issue Tracker
Issues can be reported through the Muntjac issue tracker to ensure new bugs are not lost.
-
License & Copyright
Apache License
Muntjac is available the Apache Software License version 2.0.